/* ===== 基础样式 ===== */
:root {
    --deep-indigo: #1a1a2e;
    --nailong-yellow: #FFD93D;
    --antique-gold: #C9A227;
    --cream: #F5F5DC;
    --dark-overlay: rgba(26, 26, 46, 0.95);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: var(--deep-indigo);
    color: var(--cream);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 全屏模式支持 */
body:fullscreen { width: 100vw; height: 100vh; }
body:-webkit-full-screen { width: 100vw; height: 100vh; }
body:-moz-full-screen { width: 100vw; height: 100vh; }

/* 星空奶龙背景 */
.museum-bg {
    contain: layout style paint;
    content-visibility: auto;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url('../assets/images/starry-nailong-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* ===== 通用动画 ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes breathe {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.02) translateY(-5px); }
}

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

@keyframes glow {
    0%, 100% { text-shadow: 0 0 30px rgba(255, 217, 61, 0.5); }
    50% { text-shadow: 0 0 50px rgba(255, 217, 61, 0.8), 0 0 80px rgba(255, 217, 61, 0.4); }
}

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

/* ===== 加载动画 ===== */
.auth-loading {
    position: relative;
    color: transparent !important;
}
.auth-loading::after {
    content: '';
    position: absolute;
    width: 20px; height: 20px;
    top: 50%; left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--deep-indigo);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ===== 图片懒加载样式 ===== */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}
img[loading="lazy"].loaded {
    opacity: 1;
}

/* ===== 响应式基础 ===== */
@media (max-width: 768px) {
    .title-main { font-size: 2rem; }
    .nailong-img { width: 200px; height: 200px; }
    .explanation-section { flex-direction: column; align-items: center; }
    .speech-bubble::before { display: none; }
    .final-message { font-size: 1.8rem; }
    .fullscreen-btn, .audio-control { width: 40px; height: 40px; font-size: 1rem; }
}

/* 全屏模式下的样式优化 */
:fullscreen .container { max-width: 100%; padding: 1rem; }
:fullscreen .painting-img { max-height: 50vh; }
