/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}

/* 基础样式 */
body {
    font-family: 'Arial', sans-serif;
    background-color: #0a0a23;
    background-image: url('static/images/bg-bannerpic.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: white;
    overflow: visible;
    min-height: 100vh;
}

p {
    color: white;
}

/* 容器样式 */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 36px;
    color: #00BFA5;
    margin-bottom: 10px;
}

.header .english-name {
    font-size: 24px;
    color: #9c27b0;
    font-style: italic;
    margin-bottom: 10px;
}

.header .spanish-name {
    font-size: 20px;
    color: #9c27b0;
    font-style: italic;
    margin-bottom: 20px;
}

.header p {
    font-size: 18px;
    color: white;
    margin-bottom: 10px;
}

/* 语言选项卡 */
.language-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 10px;
}

.language-tab {
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    color: white;
}

.language-tab.active {
    background-color: #f3e5f5;
    color: #6a1b9a;
    font-weight: bold;
}

/* 星座详情 */
.constellation-detail {
    background-color: transparent;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.info-section {
    margin-bottom: 30px;
}

.info-section h2 {
    font-size: 24px;
    color: #651FFF;
    margin-bottom: 15px;
    padding-bottom: 10px;
}

.info-section p {
    color: white;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* 关键词 */
.keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.keyword {
    padding: 8px 16px;
    background-color: #f3e5f5;
    border-radius: 20px;
    font-size: 14px;
    color: #6a1b9a;
}

/* 返回链接 */
.back-link {
    display: none;
    padding: 12px 24px;
    background-color: #6a1b9a;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.back-link:hover {
    background-color: #4a148c;
}

.back-link.active {
    display: inline-block;
}

.back-section {
    text-align: center;
    margin-top: 40px;
}

/* 语言内容 */
.language-content,
.header-description,
.constellation-name {
    display: none;
}

.language-content.active,
.header-description.active,
.constellation-name.active {
    display: block;
}

/* 弹窗样式 */
.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 10, 35, 0.95);
    border: 2px solid #00ffcc;
    border-radius: 12px;
    padding: 2rem;
    z-index: 1000;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 255, 204, 0.5);
    animation: popupFade 0.5s ease-in-out;
}

.popup h2 {
    color: #00ffcc;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.popup p {
    white-space: nowrap;
}

.popup .loading {
    width: 50px;
    height: 50px;
    border: 3px solid #00ffcc;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* 雷达扫描区域 */
.radar-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    display: none;
}

.radar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #333;
    box-shadow: 0 0 0 1px rgba(0, 255, 204, 0.5) inset;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle, rgba(0, 255, 204, 0.1) 0%, rgba(0, 255, 204, 0.05) 50%, transparent 100%);
}

.radar::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.radar .circle {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(0, 255, 204, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.radar .circle:nth-child(1) {
    width: 60%;
    height: 60%;
}

.radar .circle:nth-child(2) {
    width: 40%;
    height: 40%;
}

.radar .circle:nth-child(3) {
    width: 20%;
    height: 20%;
}

/* 星座符文 */
.constellation {
    position: absolute;
    width: 30px;
    height: 30px;
    color: #00ffcc;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 0 10px #00ffcc;
    animation: rotateAround 20s linear infinite;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* 结果展示区 */
.result-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: none;
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    background: rgba(10, 10, 35, 0.8);
    border: 1px solid #00ffcc;
    border-radius: 12px;
}

.result-container h2 {
    color: #00ffcc;
    margin-bottom: 1.5rem;
}

.hardware-info,
.metaphysics-info,
.interaction-info {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(0, 255, 204, 0.1);
}

.hardware-info p,
.metaphysics-info p,
.interaction-info p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.highlight {
    color: #ffcc00;
    font-weight: bold;
}

/* 加载文本动画 */
.scan-text {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 20px;
    font-size: 1.2rem;
    color: #00ffcc;
    animation: blink 1.5s ease-in-out infinite;
    white-space: nowrap;
}

/* 安全自检相关样式 */
.radar-sweep {
    position: absolute;
    width: 50%;
    height: 50%;
    top: 0;
    left: 0;
    background: linear-gradient(45deg, rgba(0, 255, 204, 0.6) 0%, rgba(0, 255, 204, 0.1) 80%);
    border-radius: 100% 0 0 0;
    transform-origin: bottom right;
    animation: sweep 2s ease-in-out infinite;
}

/* 状态显示样式 */
.status-text {
    font-size: 1.2rem;
    color: #00ffcc;
    font-weight: bold;
}

.temp-display {
    font-size: 3rem;
    margin: 10px 0;
    font-family: monospace;
}

.tips {
    font-size: 0.9rem;
    color: #888;
    line-height: 1.4;
    height: 50px;
}

/* 按钮样式 */
.btn {
    margin-top: 30px;
    padding: 15px 40px;
    border: 1px solid #00ffcc;
    background: transparent;
    color: #00ffcc;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background: rgba(0, 255, 204, 0.1);
    transform: translateY(-2px);
}

.warning {
    color: #ff3300 !important;
    border-color: #ff3300 !important;
}

/* 动画定义 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes popupFade {
    0% { opacity: 0; transform: translate(-50%, -55%); }
    100% { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes rotateAround {
    0% { transform: translate(-50%, -50%) rotate(0deg) translateX(140px) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg) translateX(140px) rotate(-360deg); }
}

@keyframes sweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
}