:/* 今年会 (中国)官方网站登录入口-JNH GAME - style.css */
/* 版本: 生产级 v1.0 */

/* ===== CSS变量 ===== */
:root {
    --brand-primary: #1a73e8;
    --brand-secondary: #0d47a1;
    --brand-accent: #ff6f00;
    --brand-light: #e3f2fd;
    --brand-dark: #0a1929;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f7fa;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ===== 暗色模式变量 ===== */
body.dark-mode {
    --bg-primary: #0a1929;
    --bg-secondary: #112240;
    --text-primary: #e6f1ff;
    --text-secondary: #8892b0;
    --bg-glass: rgba(10, 25, 41, 0.8);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--brand-secondary);
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== 工具类 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
    margin: 12px auto 0;
    border-radius: 2px;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: #fff;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(26, 115, 232, 0.4);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--brand-primary);
    color: var(--brand-primary);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--brand-primary);
    color: #fff;
}

/* ===== 卡片 ===== */
.card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* ===== 网格系统 ===== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
}

.grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 24px;
}

/* ===== 渐变动画背景 ===== */
.gradient-bg {
    background: linear-gradient(135deg, var(--brand-light) 0%, #ffffff 50%, var(--brand-light) 100%);
}

body.dark-mode .gradient-bg {
    background: linear-gradient(135deg, #112240 0%, #0a1929 50%, #112240 100%);
}

/* ===== 滚动动画 ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Header ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition);
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.logo svg {
    width: 40px;
    height: 40px;
}

nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 4px 0;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand-primary);
    transition: var(--transition);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

nav a.active {
    color: var(--brand-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    color: var(--text-primary);
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--bg-secondary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-primary);
}

/* ===== 搜索框 ===== */
.search-box {
    position: relative;
}

.search-box input {
    padding: 8px 16px 8px 36px;
    border-radius: 50px;
    border: 1px solid rgba(0,0,0,0.1);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 200px;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--brand-primary);
    width: 260px;
}

.search-box svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

/* ===== Hero区域 ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #0d47a1 0%, #1a73e8 50%, #42a5f5 100%);
    overflow: hidden;
    padding-top: 72px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255,111,0,0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 650px;
    color: #fff;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
}

.hero-content h1 span {
    background: linear-gradient(90deg, #ff6f00, #ffab00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    background: #fff;
    color: var(--brand-primary);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.hero-buttons .btn:hover {
    background: var(--brand-accent);
    color: #fff;
}

.hero-buttons .btn-outline {
    border-color: #fff;
    color: #fff;
}

.hero-buttons .btn-outline:hover {
    background: #fff;
    color: var(--brand-primary);
}

.hero-visual {
    position: absolute;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
    width: 45%;
    opacity: 0.1;
    pointer-events: none;
}

/* ===== Banner轮播 ===== */
.banner-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    margin-top: 40px;
}

.banner-slide {
    display: none;
    animation: fadeSlide 0.6s ease;
}

.banner-slide.active {
    display: block;
}

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

.banner-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.banner-dots button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: var(--transition);
}

.banner-dots button.active {
    background: #fff;
    width: 32px;
    border-radius: 6px;
}

/* ===== 数据统计 ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stat-item {
    text-align: center;
    padding: 24px;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--brand-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ===== FAQ ===== */
.faq-item {
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding: 16px 0;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.faq-question svg {
    transition: var(--transition);
    flex-shrink: 0;
}

.faq-item.open .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding-top: 0;
    color: var(--text-secondary);
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding-top: 12px;
}

/* ===== Footer ===== */
footer {
    background: var(--brand-dark);
    color: #8892b0;
    padding: 60px 0 30px;
}

footer .container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

footer h4 {
    color: #e6f1ff;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

footer a {
    color: #8892b0;
    display: block;
    margin-bottom: 8px;
}

footer a:hover {
    color: #e6f1ff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 24px;
    margin-top: 40px;
    text-align: center;
    font-size: 0.9rem;
    grid-column: 1 / -1;
}

/* ===== 返回顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 999;
    transition: var(--transition);
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    transform: translateY(-3px);
}

/* ===== 移动端菜单 ===== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 999;
    padding: 40px 20px;
    flex-direction: column;
    gap: 24px;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== 面包屑 ===== */
.breadcrumb {
    padding-top: 20px;
    padding-bottom: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--brand-primary);
}

/* ===== 表单样式 ===== */
.form-input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.1);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

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

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    footer .container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section {
        padding: 60px 0;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    footer .container {
        grid-template-columns: 1fr;
    }

    .search-box input {
        width: 140px;
    }

    .search-box input:focus {
        width: 180px;
    }

    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }

    .hero-visual {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .container {
        padding: 0 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .section {
        padding: 40px 0;
    }

    .section-title {
        margin-bottom: 40px;
    }

    .card {
        padding: 24px;
    }

    .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
}

/* ===== 打印样式 ===== */
@media print {
    header,
    footer,
    .back-to-top,
    .mobile-menu,
    .mobile-menu-btn,
    .theme-toggle,
    .search-box {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: 40px 0;
        background: #fff !important;
        color: #333 !important;
    }

    .hero-content h1 {
        color: #333 !important;
    }

    .hero-content h1 span {
        -webkit-text-fill-color: #333 !important;
        color: #333 !important;
    }

    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ===== 暗色模式微调 ===== */
body.dark-mode .card {
    border-color: rgba(255,255,255,0.05);
}

body.dark-mode .faq-item {
    border-color: rgba(255,255,255,0.08);
}

body.dark-mode .form-input {
    border-color: rgba(255,255,255,0.1);
}

body.dark-mode .search-box input {
    border-color: rgba(255,255,255,0.1);
}

/* ===== 高对比度模式 ===== */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #000000;
        --text-secondary: #222222;
        --brand-primary: #0050b3;
        --brand-secondary: #003a8c;
    }

    body.dark-mode {
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --brand-primary: #4dabf7;
        --brand-secondary: #339af0;
    }
}

/* ===== 减少动画模式 ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .fade-in,
    .scroll-animate {
        opacity: 1;
        transform: none;
    }
}

/* ===== 自定义滚动条 ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--brand-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-secondary);
}

/* ===== 选中文本样式 ===== */
::selection {
    background: var(--brand-primary);
    color: #fff;
}

/* ===== 焦点样式 ===== */
:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* ===== 禁用状态 ===== */
.btn:disabled,
.form-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}