/* ============================================
   星辰影视 - 完整样式表
   风格：科技感深色主题 + 渐变 + 毛玻璃 + 圆角卡片
   响应式 + 暗色模式 + 滚动动画 + hover动画
   ============================================ */

/* ---------- 全局重置与基础 ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: #0f0f1a;
    color: #e0e0e0;
    line-height: 1.7;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

/* ---------- 暗色模式 ---------- */
@media (prefers-color-scheme: light) {
    body {
        background: #f5f5fa;
        color: #1a1a2e;
    }
}

/* ---------- 滚动条美化 ---------- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1a2e;
}
::-webkit-scrollbar-thumb {
    background: #f5c518;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ffd966;
}

/* ---------- 通用动画 ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(245, 197, 24, 0.3); }
    50% { box-shadow: 0 0 20px rgba(245, 197, 24, 0.6); }
}

/* ---------- 渐变Banner背景 ---------- */
#home {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #1a1a2e 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    padding: 100px 20px 80px;
    text-align: center;
    overflow: hidden;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
#home::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(245,197,24,0.08) 0%, transparent 60%),
                radial-gradient(circle at 70% 30%, rgba(15,52,96,0.2) 0%, transparent 50%);
    pointer-events: none;
    animation: rotateGlow 30s linear infinite;
}
@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
#home h1 {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(90deg, #f5c518, #ffd966, #f5c518);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}
#home p {
    max-width: 800px;
    margin: 0 auto 15px;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    position: relative;
    z-index: 1;
}

/* ---------- 通用section样式 ---------- */
section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease both;
}
section:nth-child(even) {
    animation-name: fadeInLeft;
}
section:nth-child(odd) {
    animation-name: fadeInRight;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #f5c518;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}
h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #f5c518, #ff8c00);
    margin-top: 8px;
    border-radius: 2px;
}
h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #e0e0e0;
    margin: 25px 0 12px;
}

p {
    margin-bottom: 15px;
    color: #c0c0c0;
}
a {
    color: #f5c518;
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
}
a:hover {
    color: #ffd966;
    text-shadow: 0 0 8px rgba(245,197,24,0.4);
}

/* ---------- 圆角卡片毛玻璃效果 ---------- */
.card, section, details, article, .glass-card {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.card:hover, section:hover, details:hover, article:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(245,197,24,0.15);
    border-color: rgba(245,197,24,0.3);
}

/* ---------- Header 导航 ---------- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15,15,26,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background 0.3s;
}
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    flex-wrap: wrap;
}
nav a[title="星辰影视首页"] {
    flex-shrink: 0;
}
nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    flex-wrap: wrap;
}
nav ul li a {
    padding: 8px 14px;
    border-radius: 30px;
    font-weight: 500;
    color: #c0c0c0;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
nav ul li a:hover {
    background: rgba(245,197,24,0.15);
    color: #f5c518;
    box-shadow: 0 0 15px rgba(245,197,24,0.2);
}
nav button {
    background: transparent;
    border: none;
    color: #c0c0c0;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s, color 0.3s, transform 0.3s;
}
nav button:hover {
    background: rgba(245,197,24,0.15);
    color: #f5c518;
    transform: scale(1.1);
}

/* ---------- 移动菜单按钮默认隐藏 ---------- */
nav button[aria-label="移动菜单"] {
    display: none;
}

/* ---------- Footer ---------- */
footer {
    background: rgba(15,15,26,0.9);
    backdrop-filter: blur(10px);
    padding: 40px 20px 30px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 40px;
}
footer p {
    margin: 8px 0;
    font-size: 0.9rem;
    color: #888;
}
footer a {
    color: #aaa;
    margin: 0 5px;
}
footer a:hover {
    color: #f5c518;
}

/* ---------- 列表、细节、文章等增强 ---------- */
ul, ol {
    padding-left: 20px;
    margin-bottom: 15px;
}
li {
    margin-bottom: 8px;
}
details {
    cursor: pointer;
    padding: 20px 25px;
    margin-bottom: 12px;
}
details summary {
    font-weight: 600;
    font-size: 1.1rem;
    outline: none;
    color: #e0e0e0;
    transition: color 0.3s;
}
details summary::-webkit-details-marker {
    color: #f5c518;
}
details[open] summary {
    color: #f5c518;
}
details p {
    margin-top: 15px;
    padding-left: 10px;
    border-left: 3px solid #f5c518;
}

article {
    padding: 25px;
    margin-bottom: 20px;
}
article h3 {
    margin-top: 0;
}
article a {
    display: inline-block;
    margin-top: 10px;
    font-weight: 600;
}

/* ---------- 图片自适应 ---------- */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ---------- 按钮通用 ---------- */
button, .btn {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
    transition: all 0.3s;
}

/* ---------- 响应式布局 ---------- */
@media (max-width: 1024px) {
    #home h1 { font-size: 2.2rem; }
    #home p { font-size: 1rem; }
    h2 { font-size: 1.7rem; }
}

@media (max-width: 768px) {
    html { font-size: 15px; }
    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background: rgba(15,15,26,0.95);
        backdrop-filter: blur(20px);
        padding: 15px 0;
        border-radius: 0 0 20px 20px;
        margin-top: 10px;
    }
    nav ul.show {
        display: flex;
    }
    nav button[aria-label="移动菜单"] {
        display: block;
    }
    nav ul li a {
        padding: 12px 20px;
        display: block;
        text-align: center;
    }
    #home { padding: 80px 15px 60px; }
    #home h1 { font-size: 1.8rem; }
    section { padding: 40px 15px; }
    .card, section, details, article {
        padding: 20px;
    }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
}

@media (max-width: 480px) {
    #home h1 { font-size: 1.5rem; }
    #home p { font-size: 0.95rem; }
    nav { padding: 8px 12px; }
    footer p { font-size: 0.8rem; }
}

/* ---------- 滚动动画（配合Intersection Observer，这里提供基础样式） ---------- */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- 其他hover动画补充 ---------- */
nav ul li a:active {
    transform: scale(0.95);
}
details:hover {
    background: rgba(255,255,255,0.08);
}
button:active {
    transform: scale(0.9);
}

/* ---------- 暗色模式适配（light模式覆盖） ---------- */
@media (prefers-color-scheme: light) {
    header {
        background: rgba(245,245,250,0.85);
        border-bottom-color: rgba(0,0,0,0.06);
    }
    nav ul li a { color: #333; }
    nav button { color: #333; }
    h2 { color: #1a1a2e; }
    h2::after { background: linear-gradient(90deg, #1a1a2e, #f5c518); }
    h3 { color: #1a1a2e; }
    p, li { color: #444; }
    .card, section, details, article {
        background: rgba(255,255,255,0.6);
        border-color: rgba(0,0,0,0.06);
        box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    }
    footer {
        background: rgba(245,245,250,0.9);
        border-top-color: rgba(0,0,0,0.06);
    }
    footer p { color: #666; }
    footer a { color: #555; }
    #home {
        background: linear-gradient(135deg, #f5f5fa 0%, #e8e8f0 40%, #d0d0e0 70%, #f5f5fa 100%);
    }
    #home p { color: #333; }
    details summary { color: #333; }
    details[open] summary { color: #1a1a2e; }
    details p { border-left-color: #1a1a2e; }
    ::-webkit-scrollbar-track { background: #e0e0e8; }
    ::-webkit-scrollbar-thumb { background: #1a1a2e; }
}

/* ---------- 性能优化：减少重排 ---------- */
* {
    -webkit-tap-highlight-color: transparent;
}

/* ---------- 安全说明 ---------- */
footer p:last-of-type {
    opacity: 0.7;
}