/* 全局变量 */
:root {
    --primary-color: #4f96c0;
    --secondary-color: #3a7ca5;
    --accent-color: #f39c12;
    --light-color: #e6f2f9;
    --dark-color: #2c5d7c;
    --text-color: #333;
    --text-light: #666;
    --background-color: #f5f9fc;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-strong: 0 6px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 12px;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --primary-color-rgb: 79, 150, 192;
    --secondary-color-rgb: 58, 124, 165;
}

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

html, body {
    height: 100%;
    width: 100%;
}

body {
    background-color: var(--bg-color);
    padding: 20px;
    min-height: 100vh;
    background-image: url('../../页面图片/background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 主容器样式 */
.container {
    position: relative;
    width: 95%;
    max-width: 1100px;
    background-color: rgba(255, 255, 255, 0.97);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-strong);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0 auto;
}

/* 返回按钮样式 */
.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow);
    z-index: 100;
    transition: var(--transition);
    text-decoration: none;
}

.back-btn:hover {
    background-color: var(--dark-color);
    transform: scale(1.05);
    box-shadow: var(--shadow-strong);
}

/* 标题样式 */
header {
    text-align: center;
    margin-bottom: 15px;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 2.2rem;
    font-weight: 700;
}

.subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 1.4rem;
    font-weight: 600;
}

h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

p {
    color: var(--text-color);
    margin-bottom: 12px;
    font-size: 1rem;
    line-height: 1.5;
}

/* 内容区域样式 */
.info-panel {
    background-color: #f7faff;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.info-box {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 12px 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
    flex: 0 0 auto;
    width: 130px;
}

.info-box h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.info-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 5px;
}

#points-count {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--accent-color);
}

.explanation-box {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    flex: 1;
}

.content-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 5px;
}

.action-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.action-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

.action-btn:disabled {
    background-color: #b0b0b0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.detection-area {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.media-container {
    position: relative;
    width: 500px;
    height: 375px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background-color: #f0f0f0;
}

#video, #uploaded-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#take-picture-btn {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

/* 加载指示器 */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 辅助类 */
.hidden {
    display: none !important;
}

/* 关键点信息区域样式 */
.landmark-info {
    background-color: rgba(238, 242, 255, 0.5);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

.landmark-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.landmark-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.landmark-count p {
    font-size: 1.2rem;
    margin-bottom: 0;
}

.landmark-types {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.landmark-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.color-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
}

.landmark-type p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.eyes-dot {
    background-color: #FF9800;
}

.eyebrows-dot {
    background-color: #4CAF50;
}

.nose-dot {
    background-color: #E91E63;
}

.mouth-dot {
    background-color: #2196F3;
}

.jawline-dot {
    background-color: #9C27B0;
}

/* 解释框样式 */
.explanation-content {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
}

#explanation-text {
    margin-bottom: 0;
    font-size: 1rem;
    transition: opacity 0.5s ease;
}

/* 有趣事实区域样式 */
.fun-facts {
    background-color: rgba(238, 242, 255, 0.5);
    border-radius: 15px;
    padding: 20px;
}

.facts-carousel {
    margin: 25px 0;
    position: relative;
    overflow: hidden;
}

.fact-items {
    position: relative;
    height: 100px;
}

.fact-item {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    visibility: hidden;
}

.fact-item.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.fact-item p {
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-color);
}

.fact-navigation {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.fact-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: var(--transition);
}

.fact-dot.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

.instructions-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 25px 0;
}

.instruction-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.instruction-icon {
    font-size: 24px;
    background-color: var(--light-color);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.instruction-text {
    flex-grow: 1;
}

.instruction-text h3 {
    margin-bottom: 5px;
    color: var(--dark-color);
}

.instruction-text p {
    margin-bottom: 0;
    color: var(--text-light);
}

#start-exploring-btn {
    display: block;
    margin: 25px auto 0;
    padding: 12px 30px;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 1100;
    position: relative;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#start-exploring-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

#start-exploring-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 15px;
    color: white;
    font-size: 0.9rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 50;
}

/* 响应式布局 */
@media (max-width: 768px) {
    body {
        padding: 10px;
        align-items: flex-start;
    }
    
    .container {
        width: 100%;
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .media-container {
        width: 100%;
        height: auto;
        aspect-ratio: 4/3;
    }
    
    .back-btn {
        top: 15px;
        left: 15px;
        width: 40px;
        height: 40px;
    }
    
    .modal-content {
        padding: 20px;
        margin: 10% auto;
    }
    
    .instruction-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .info-panel {
        flex-direction: column;
    }
    
    .info-box {
        width: 100%;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .prev-btn, .next-btn {
        width: auto;
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .tabs {
        flex-direction: column;
        gap: 15px;
    }
    
    .action-btn {
        width: 100%;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .info-panel {
        padding: 15px;
    }
    
    body {
        padding: 5px;
    }
    
    .container {
        padding: 15px;
        margin: 10px auto;
    }
}

/* 模态窗口样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow: auto;
    animation: modalFadeIn 0.3s;
    text-align: center;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: var(--border-radius);
    max-width: 700px;
    width: 90%;
    box-shadow: var(--shadow-strong);
    position: relative;
    display: inline-block;
    text-align: left;
    pointer-events: auto; /* 确保内容可点击 */
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--dark-color);
}

.fact-items {
    position: relative;
    height: 100px;
}

/* 导航按钮容器样式 */
.navigation-buttons {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 15px auto 10px !important;
    text-align: center !important;
}

.next-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    margin: 0 auto !important;
}

.next-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.next-btn svg {
    transition: transform 0.3s ease;
}

.next-btn:hover svg {
    transform: translateX(5px);
} 