/* ===== 抢庄牛牛 - 完整样式表 ===== */
/* 全局重置与基础 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f8f9fc;
    color: #1a1a2e;
    transition: background 0.3s ease, color 0.3s ease;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 暗色模式 */
body.dark {
    background: #0d1117;
    color: #e6edf3;
}

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

/* ===== 头部导航 ===== */
header {
    background: linear-gradient(135deg, #fff 0%, #f0f4ff 100%);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

body.dark header {
    background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    flex-wrap: wrap;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    color: #FF6B35;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo svg {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

/* 导航链接 */
.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
    flex-wrap: wrap;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    text-decoration: none;
    color: #1a1a2e;
    font-weight: 500;
    font-size: 15px;
    padding: 6px 0;
    position: relative;
    transition: color 0.3s ease;
}

body.dark .nav-links a {
    color: #c9d1d9;
}

.nav-links a:hover,
.nav-links a.active {
    color: #FF6B35;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #FF6B35;
    transition: width 0.3s ease;
}

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

/* 菜单切换按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #1a1a2e;
    transition: color 0.3s ease;
    padding: 4px;
}

body.dark .menu-toggle {
    color: #c9d1d9;
}

.menu-toggle:hover {
    color: #FF6B35;
}

/* 暗色模式按钮 */
.dark-mode-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 30px;
    padding: 6px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #1a1a2e;
    transition: all 0.3s ease;
    white-space: nowrap;
}

body.dark .dark-mode-btn {
    color: #c9d1d9;
    border-color: #30363d;
}

.dark-mode-btn:hover {
    background: #FF6B35;
    color: #fff;
    border-color: #FF6B35;
    transform: translateY(-1px);
}

/* ===== 移动端菜单 ===== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.open {
    display: block;
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    background: #fff;
    width: 80%;
    max-width: 320px;
    height: 100%;
    padding: 30px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

body.dark .mobile-menu-content {
    background: #161b22;
}

.mobile-menu.open .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 30px;
    float: right;
    cursor: pointer;
    color: #1a1a2e;
    transition: color 0.3s ease;
    padding: 4px;
}

body.dark .mobile-menu-close {
    color: #f0f6fc;
}

.mobile-menu-close:hover {
    color: #FF6B35;
}

.mobile-menu-links {
    list-style: none;
    margin-top: 40px;
    clear: both;
}

.mobile-menu-links li {
    margin-bottom: 16px;
}

.mobile-menu-links a {
    text-decoration: none;
    font-size: 18px;
    color: #1a1a2e;
    font-weight: 500;
    transition: color 0.3s ease;
    display: block;
    padding: 8px 0;
}

body.dark .mobile-menu-links a {
    color: #c9d1d9;
}

.mobile-menu-links a:hover {
    color: #FF6B35;
}

/* ===== Hero 区域 ===== */
.hero {
    background: linear-gradient(135deg, #FF6B35 0%, #f7931e 50%, #FF6B35 100%);
    padding: 80px 0 60px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 40px 40px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
    animation: heroGlow 8s infinite alternate;
    pointer-events: none;
}

@keyframes heroGlow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

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

.hero-slide {
    display: none;
    animation: fadeInUp 0.8s ease forwards;
}

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

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

.hero h1 {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 16px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
}

.hero p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.95;
    line-height: 1.6;
}

.hero-cta {
    display: inline-block;
    background: #fff;
    color: #FF6B35;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.hero-cta:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    background: #fff;
    color: #e55a2b;
}

.hero-cta:active {
    transform: translateY(-2px);
}

.hero-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    z-index: 2;
    position: relative;
}

.hero-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dots span.active {
    background: #fff;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.hero-dots span:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* ===== 通用区块样式 ===== */
.section {
    padding: 70px 0;
}

.section-title {
    text-align: center;
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 12px;
    color: #1a1a2e;
    line-height: 1.3;
}

body.dark .section-title {
    color: #f0f6fc;
}

.section-sub {
    text-align: center;
    font-size: 17px;
    color: #555;
    max-width: 700px;
    margin: 0 auto 50px;
    line-height: 1.6;
}

body.dark .section-sub {
    color: #8b949e;
}

/* ===== 网格布局 ===== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

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

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

/* ===== 卡片样式 ===== */
.card {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

body.dark .card {
    background: #161b22;
    border-color: #21262d;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    border-color: #FF6B35;
}

body.dark .card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    border-color: #FF6B35;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FF6B35, #f7931e);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: #fff;
    font-size: 28px;
    transition: transform 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.05);
}

.card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 700;
}

.card p {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
}

body.dark .card p {
    color: #8b949e;
}

/* ===== 毛玻璃效果 ===== */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
}

body.dark .glass {
    background: rgba(22, 27, 34, 0.7);
    border-color: rgba(48, 54, 61, 0.5);
}

/* ===== 徽章 ===== */
.badge {
    display: inline-block;
    background: linear-gradient(135deg, #FF6B35, #f7931e);
    color: #fff;
    padding: 4px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

/* ===== 数字展示 ===== */
.number {
    font-size: 42px;
    font-weight: 900;
    color: #FF6B35;
    display: block;
    margin-bottom: 4px;
    line-height: 1.2;
}

.number-label {
    font-size: 15px;
    color: #666;
}

body.dark .number-label {
    color: #8b949e;
}

/* ===== FAQ 折叠 ===== */
.faq-item {
    border-bottom: 1px solid #e9ecef;
    padding: 18px 0;
    cursor: pointer;
    transition: background 0.3s ease;
}

body.dark .faq-item {
    border-color: #21262d;
}

.faq-item:hover {
    background: rgba(255, 107, 53, 0.03);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 17px;
    color: #1a1a2e;
    user-select: none;
}

body.dark .faq-question {
    color: #f0f6fc;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    color: #555;
    padding-top: 0;
    font-size: 15px;
    line-height: 1.7;
}

body.dark .faq-answer {
    color: #8b949e;
}

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

.faq-toggle {
    font-size: 22px;
    transition: transform 0.3s ease;
    color: #FF6B35;
    font-weight: 300;
    line-height: 1;
}

.faq-item.open .faq-toggle {
    transform: rotate(45deg);
}

/* ===== HowTo 步骤 ===== */
.howto-step {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    align-items: flex-start;
}

.howto-step .step-num {
    background: #FF6B35;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 16px;
}

.howto-step div:last-child {
    flex: 1;
}

.howto-step p {
    font-size: 15px;
    color: #555;
    margin-top: 4px;
    line-height: 1.6;
}

body.dark .howto-step p {
    color: #8b949e;
}

/* ===== 新闻卡片 ===== */
.news-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

body.dark .news-card {
    background: #161b22;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

body.dark .news-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.news-card .news-img {
    height: 180px;
    background: linear-gradient(135deg, #FF6B35, #f7931e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 40px;
}

.news-card .news-body {
    padding: 20px;
}

.news-card .news-body h4 {
    font-size: 17px;
    margin-bottom: 8px;
    font-weight: 700;
}

.news-card .news-body p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

body.dark .news-card .news-body p {
    color: #8b949e;
}

/* ===== 搜索栏 ===== */
.search-bar {
    display: flex;
    max-width: 400px;
    margin: 0 auto 30px;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid #eee;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.search-bar:focus-within {
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.15);
    border-color: #FF6B35;
}

body.dark .search-bar {
    background: #161b22;
    border-color: #30363d;
}

body.dark .search-bar:focus-within {
    border-color: #FF6B35;
}

.search-bar input {
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 15px;
    outline: none;
    background: transparent;
    color: #1a1a2e;
}

body.dark .search-bar input {
    color: #f0f6fc;
}

.search-bar input::placeholder {
    color: #999;
}

body.dark .search-bar input::placeholder {
    color: #6e7681;
}

.search-bar button {
    background: #FF6B35;
    color: #fff;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.search-bar button:hover {
    background: #e55a2b;
}

.search-bar button:active {
    background: #d44a1a;
}

/* ===== 页脚 ===== */
.footer {
    background: #1a1a2e;
    color: #b0b8c8;
    padding: 50px 0 20px;
    margin-top: 20px;
}

body.dark .footer {
    background: #0d1117;
}

.footer a {
    color: #b0b8c8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #FF6B35;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer h4 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 16px;
    font-weight: 700;
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.footer-bottom {
    border-top: 1px solid #2d3748;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
}

/* ===== 回到顶部按钮 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #FF6B35;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
    border: none;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.5);
    background: #e55a2b;
}

.back-to-top:active {
    transform: translateY(-2px);
}

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

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 响应式布局 ===== */
/* 平板及以下 */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero h1 {
        font-size: 40px;
    }
}

/* 手机端 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero {
        padding: 60px 0 40px;
        border-radius: 0 0 30px 30px;
    }
    
    .hero h1 {
        font-size: 30px;
    }
    
    .hero p {
        font-size: 16px;
        margin-bottom: 24px;
    }
    
    .hero-cta {
        padding: 12px 32px;
        font-size: 16px;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 26px;
    }
    
    .section-sub {
        font-size: 15px;
        margin-bottom: 30px;
    }
    
    .number {
        font-size: 32px;
    }
    
    .card {
        padding: 24px;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .back-to-top {
        width: 44px;
        height: 44px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
    
    .search-bar {
        max-width: 100%;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 26px;
    }
    
    .hero p {
        font-size: 15px;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 22px;
    }
    
    .card {
        padding: 20px;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        gap: 20px;
    }
}

/* ===== 工具类 ===== */
.text-center {
    text-align: center;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 过渡动画增强 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* 选中样式 */
::selection {
    background: rgba(255, 107, 53, 0.3);
    color: #1a1a2e;
}

body.dark ::selection {
    background: rgba(255, 107, 53, 0.4);
    color: #f0f6fc;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 53, 0.4);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, 0.6);
}

body.dark ::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 53, 0.3);
}

body.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, 0.5);
}

/* 焦点样式 */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid #FF6B35;
    outline-offset: 2px;
}

/* 打印样式 */
@media print {
    .back-to-top,
    .mobile-menu,
    .menu-toggle,
    .dark-mode-btn {
        display: none !important;
    }
    
    header {
        position: static;
        box-shadow: none;
    }
    
    .hero {
        border-radius: 0;
        padding: 40px 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .section {
        padding: 30px 0;
        page-break-inside: avoid;
    }
}