/* ============================================
   style.css - 开云电竞官网 | Kaiyun Esports
   Generated for to-app-kaiyun.com
   ============================================ */

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

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

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #f5f7fa;
    color: #1a1a2e;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    line-height: 1.6;
}

body.dark {
    background: #0a0a23;
    color: #e0e0e0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: #ff6b35;
}

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

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

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

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

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

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
    line-height: 1.4;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b35, #ff3c00);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid #ff6b35;
    color: #ff6b35;
}

.btn-outline:hover {
    background: #ff6b35;
    color: #fff;
    border-color: #ff6b35;
}

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

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 50px;
    font-size: 1.1rem;
}

body.dark .section-subtitle {
    color: #aaa;
}

/* ===== 卡片 ===== */
.card {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.dark .card {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

body.dark .card:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ===== 网格与弹性布局 ===== */
.grid {
    display: grid;
    gap: 30px;
}

.flex {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

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

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

/* ===== 响应式网格 ===== */
@media (min-width: 769px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr;
    }
    .grid-3 {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .grid-4 {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 50px 0;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .grid {
        grid-template-columns: 1fr !important;
    }
    .flex {
        flex-direction: column;
    }
}

/* ===== 头部导航 ===== */
header {
    background: rgba(245, 247, 250, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.3s ease;
}

body.dark header {
    background: rgba(10, 10, 35, 0.95);
}

header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
}

header nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
    transition: all 0.3s ease;
}

header nav ul li a {
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

header nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #ff6b35;
    transition: width 0.3s ease;
}

header nav ul li a:hover::after {
    width: 100%;
}

/* ===== Hero Banner ===== */
#hero {
    background: linear-gradient(135deg, #0a0a23 0%, #1a1a3e 50%, #2a1a4e 100%);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 150%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

#hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 1;
}

#hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 20px;
}

#hero h1 span {
    color: #ff6b35;
}

#hero p {
    color: #ccc;
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 30px;
}

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

#hero .btn-outline:hover {
    background: #fff;
    color: #0a0a23;
}

/* ===== 面包屑导航 ===== */
.breadcrumb {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-top: 20px;
}

.breadcrumb ol {
    display: flex;
    list-style: none;
    gap: 10px;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb ol li a {
    color: #666;
}

.breadcrumb ol li a:hover {
    color: #ff6b35;
}

body.dark .breadcrumb {
    background: rgba(255, 255, 255, 0.03);
}

body.dark .breadcrumb ol li,
body.dark .breadcrumb ol li a {
    color: #aaa;
}

/* ===== 品牌介绍图标 ===== */
.icon-wrapper {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== 核心优势数字 ===== */
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ff6b35;
    display: block;
    margin-bottom: 5px;
}

/* ===== 新闻时间 ===== */
article time {
    display: block;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 8px;
}

body.dark article time {
    color: #777;
}

/* ===== FAQ ===== */
#faq .card h3 {
    cursor: pointer;
    position: relative;
    padding-right: 30px;
}

#faq .card h3::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #ff6b35;
    transition: transform 0.3s ease;
}

#faq .card h3.active::after {
    transform: translateY(-50%) rotate(45deg);
}

#faq .card p {
    display: none;
    margin-top: 10px;
    line-height: 1.8;
    color: #666;
}

body.dark #faq .card p {
    color: #bbb;
}

/* ===== 页脚 ===== */
footer {
    background: #0a0a23;
    color: #ccc;
    padding: 40px 0;
}

footer h3,
footer h4 {
    color: #fff;
    margin-bottom: 15px;
}

footer a {
    color: #ff6b35;
}

footer a:hover {
    text-decoration: underline;
}

footer ul {
    list-style: none;
    line-height: 2;
}

footer hr {
    border-color: #333;
    margin: 30px 0;
}

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

@media (max-width: 768px) {
    footer .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 返回顶部 ===== */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ff6b35;
    color: #fff;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    z-index: 999;
    transition: all 0.3s ease;
    line-height: 50px;
    text-align: center;
}

#backToTop:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.5);
}

/* ===== 暗黑模式切换按钮 ===== */
#darkToggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
    transition: transform 0.3s ease;
}

#darkToggle:hover {
    transform: rotate(20deg);
}

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

#searchInput {
    padding: 8px 15px;
    border-radius: 50px;
    border: 1px solid #ddd;
    background: transparent;
    color: inherit;
    width: 180px;
    transition: all 0.3s ease;
}

body.dark #searchInput {
    border-color: #444;
    color: #e0e0e0;
}

#searchInput:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

#searchBtn {
    position: absolute;
    right: 5px;
    top: 5px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: inherit;
}

/* ===== 移动端菜单 ===== */
#mobileMenu {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: inherit;
}

@media (max-width: 768px) {
    #mobileMenu {
        display: block;
    }

    header nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(245, 247, 250, 0.98);
        backdrop-filter: blur(10px);
        padding: 20px;
        gap: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    body.dark header nav ul {
        background: rgba(10, 10, 35, 0.98);
    }

    header nav ul.show {
        display: flex;
    }
}

/* ===== 图片懒加载 ===== */
img[data-src] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img[data-src].visible {
    opacity: 1;
}

/* ===== 响应式 Hero ===== */
@media (max-width: 768px) {
    #hero {
        padding: 80px 0 50px;
    }

    #hero .container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    #hero h1 {
        font-size: 2rem;
    }

    #hero p {
        font-size: 1rem;
    }

    #hero .flex {
        flex-direction: column;
        gap: 15px;
    }

    #hero svg {
        height: 250px;
    }
}

/* ===== 卡片内联样式覆盖 ===== */
.card h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.card p {
    line-height: 1.8;
    color: #666;
}

body.dark .card p {
    color: #bbb;
}

/* ===== 表单与按钮通用 ===== */
button:focus-visible {
    outline: 2px solid #ff6b35;
    outline-offset: 2px;
}

/* ===== 响应式调整 ===== */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ===== 打印样式 ===== */
@media print {
    header,
    footer,
    #backToTop,
    #darkToggle,
    .search-wrapper,
    #mobileMenu {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }
}