/* ==========================================
   畅感浮空岛 - 响应式手游推广网站样式
   ========================================== */

/* CSS Custom Properties */
:root {
    --primary: #1a73e8;
    --primary-dark: #0d47a1;
    --primary-light: #4a9af5;
    --accent: #ff6b35;
    --accent-dark: #e5551f;
    --gold: #ffc107;
    --gold-dark: #e5a800;
    --bg-dark: #0a0e1a;
    --bg-section: #0f1525;
    --bg-card: #1a2238;
    --bg-card-hover: #1e2d4a;
    --text-primary: #ffffff;
    --text-secondary: #b0bec5;
    --text-muted: #607d8b;
    --border: #2a3a5c;
    --shadow: rgba(0, 0, 0, 0.3);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s ease;
    --max-width: 1200px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
    color: var(--accent);
}

/* Accessibility: Skip Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--primary);
    color: var(--text-primary);
    padding: 8px 16px;
    z-index: 1000;
    font-size: 14px;
    border-radius: var(--radius-sm);
}

.skip-link:focus {
    top: 8px;
}

/* ==========================================
   Navigation
   ========================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.site-header.scrolled {
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    border-radius: var(--radius-sm);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--gold);
    white-space: nowrap;
}



.nav-menu {
    display: flex;
    list-style: none;
    gap: 24px;
}

.nav-menu a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 4px 0;
    position: relative;
    transition: color var(--transition);
}

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

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--text-primary);
}

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

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}

.nav-toggle-icon {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: background var(--transition);
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: transform var(--transition);
}

.nav-toggle-icon::before {
    top: -7px;
}

.nav-toggle-icon::after {
    top: 7px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

/* ==========================================
   Hero Section
   ========================================== */
.hero-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-carousel {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.carousel-track {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide {
    width: 33.333%;
    height: 100%;
    flex-shrink: 0;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.carousel-controls {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 2;
    pointer-events: none;
}

.carousel-prev,
.carousel-next {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: background var(--transition);
    backdrop-filter: blur(4px);
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

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

.indicator.active {
    background: var(--accent);
    transform: scale(1.2);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10, 14, 26, 0.3) 0%,
        rgba(10, 14, 26, 0.6) 50%,
        rgba(10, 14, 26, 0.95) 100%
    );
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    padding: 40px 20px;
    max-width: 700px;
}

.hero-game-name {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 2px 30px rgba(255, 193, 7, 0.4);
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.hero-game-tag {
    font-size: clamp(16px, 2.5vw, 22px);
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.hero-title {
    font-size: clamp(28px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--gold);
    margin-bottom: 16px;
    text-shadow: 0 2px 20px rgba(255, 193, 7, 0.3);
}

.hero-subtitle {
    font-size: clamp(14px, 2.5vw, 20px);
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.4;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* QR Popup on Hero Download Button (desktop only) */
.btn-qr-trigger {
    position: relative;
}

.qr-popup {
    position: absolute;
    bottom: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    opacity: 0;
    visibility: hidden;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 10;
    pointer-events: none;
    min-width: 160px;
}

.qr-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--bg-card);
}

.btn-qr-trigger:hover .qr-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
    pointer-events: auto;
}

.qr-popup-tip {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

#heroQrCode canvas,
#heroQrCode img {
    display: block;
    margin: 0 auto;
}

/* Download Section QR Code */
.download-qr {
    margin-top: 32px;
    text-align: center;
}

.download-qr-tip {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 12px;
}

#downloadQrCode canvas,
#downloadQrCode img {
    display: block;
    margin: 0 auto;
    border-radius: var(--radius-sm);
    background: white;
    padding: 8px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
    color: var(--text-primary);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary-light);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-download {
    padding: 16px 40px;
    font-size: 18px;
    border-radius: var(--radius);
    gap: 12px;
}

.btn-ios {
    background: linear-gradient(135deg, #333, #111);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-ios:hover {
    background: linear-gradient(135deg, #444, #222);
    transform: translateY(-2px);
    color: var(--text-primary);
}

.btn-android {
    background: linear-gradient(135deg, #3ddc84, #2bb866);
    box-shadow: 0 4px 15px rgba(61, 220, 132, 0.3);
}

.btn-android:hover {
    background: linear-gradient(135deg, #4ee896, #3ddc84);
    transform: translateY(-2px);
    color: var(--text-primary);
}

.btn-icon {
    font-size: 24px;
}

.btn-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

/* ==========================================
   Section Shared Styles
   ========================================== */
.section-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 80px 20px;
}

.section-title {
    text-align: center;
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 8px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin: 16px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: 12px;
}

/* ==========================================
   Features Section
   ========================================== */
.features-section {
    background: var(--bg-section);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all var(--transition);
    overflow: hidden;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow);
    border-color: var(--primary-light);
}

.feature-icon {
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 16px;
    aspect-ratio: 3/2;
}

.feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.feature-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==========================================
   Benefits Section
   ========================================== */
.benefits-section {
    background: var(--bg-dark);
}

.benefits-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.benefit-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    position: relative;
    transition: all var(--transition);
}

.benefit-item:hover {
    background: var(--bg-card-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px var(--shadow);
}

.benefit-item[data-highlight="true"] {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), var(--bg-card));
}

.benefit-item[data-highlight="true"]:hover {
    box-shadow: 0 6px 24px rgba(255, 107, 53, 0.2);
}

.benefit-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.benefit-badge.hot {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--text-primary);
}

.benefit-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 8px;
}

.benefit-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.benefit-desc strong {
    color: var(--accent);
}

/* ==========================================
   Intro Section
   ========================================== */
.intro-section {
    background: var(--bg-section);
}

.intro-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
    align-items: start;
}

.intro-text p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.intro-text strong {
    color: var(--gold);
}

.intro-video video {
    width: 100%;
    border-radius: var(--radius);
    background: var(--bg-card);
}

/* ==========================================
   Gallery Section
   ========================================== */
.gallery-section {
    background: var(--bg-dark);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 9/16;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: linear-gradient(to top, rgba(10, 14, 26, 0.9), transparent);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    transform: translateY(100%);
    transition: transform var(--transition);
}

.gallery-item:hover figcaption {
    transform: translateY(0);
}

/* ==========================================
   Game Info Section
   ========================================== */
.game-info-section {
    background: var(--bg-section);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.info-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.info-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.info-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ==========================================
   Download Section
   ========================================== */
.download-section {
    background: linear-gradient(135deg, var(--bg-dark), var(--primary-dark));
    text-align: center;
    padding: 80px 20px;
}

.download-subtitle {
    color: var(--text-secondary);
    font-size: 18px;
    margin-top: 16px;
}

.download-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.download-note {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 24px;
}

/* ==========================================
   Footer
   ========================================== */
.site-footer {
    background: var(--bg-section);
    border-top: 1px solid var(--border);
    padding: 40px 20px;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gold);
    font-weight: 600;
}

.footer-brand img {
    border-radius: var(--radius-sm);
}

.footer-nav {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}

.footer-nav a {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-nav a:hover {
    color: var(--text-primary);
}

.footer-links-title {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
}

.footer-links-list {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links-list a {
    color: var(--text-secondary);
    font-size: 13px;
    transition: color var(--transition);
}

.footer-links-list a:hover {
    color: var(--text-primary);
}

.footer-copy {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* ==========================================
   Back to Top
   ========================================== */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: var(--text-primary);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    transform: translateY(-3px);
}

/* ==========================================
   Animations
   ========================================== */
.animate-fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* ==========================================
   Responsive Design
   ========================================== */

/* Tablet: 768px - 1024px */
@media (max-width: 1024px) {
    .intro-content {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile: under 768px */
@media (max-width: 768px) {
    .nav-container {
        position: relative;
    }

    /* 隐藏首屏按钮二维码浮层（移动端无hover） */
    .qr-popup {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10, 14, 26, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 32px;
        transform: translateX(100%);
        transition: transform 0.4s ease;
    }

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

    .nav-menu a {
        font-size: 20px;
        padding: 8px 0;
    }

    .hero-section {
        min-height: 60vh;
    }

    .hero-title {
        margin-bottom: 12px;
    }

    .section-container {
        padding: 60px 16px;
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 16px;
    }

    .feature-card {
        padding: 16px;
    }

    .benefits-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .download-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-download {
        width: 80%;
        max-width: 280px;
    }
}

/* Small Mobile: under 480px */
@media (max-width: 480px) {
    .logo-text {
        font-size: 16px;
    }

    .hero-section {
        min-height: 50vh;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .feature-card {
        padding: 12px;
    }

    .feature-title {
        font-size: 15px;
    }

    .feature-desc {
        font-size: 12px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

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

    .section-container {
        padding: 48px 12px;
    }

    .carousel-prev,
    .carousel-next {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
    }

    .hero-content {
        padding: 20px;
    }
}

/* High contrast mode support */
@media (forced-colors: active) {
    .btn {
        border: 2px solid ButtonText;
    }

    .benefit-badge {
        border: 1px solid ButtonText;
    }
}

/* Print styles */
@media print {
    .site-header,
    .hero-carousel,
    .carousel-controls,
    .carousel-indicators,
    .nav-toggle,
    .btn-download,
    .intro-video,
    .site-footer {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .hero-overlay {
        background: rgba(255, 255, 255, 0.8);
    }

    .hero-title,
    .section-title,
    .benefit-title {
        color: black;
    }

    .section-container {
        padding: 20px 0;
    }
}
