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

/* Large Laptops & Desktops (max 1280px) */
@media (max-width: 1280px) {
    .nav-links {
        gap: 16px;
        padding: 0 10px;
    }
    
    .nav-links a {
        font-size: 0.85rem;
        padding: 6px 0;
    }
    
    .nav-actions {
        gap: 8px;
    }
    
    .nav-actions .nav-icon-btn {
        width: 34px;
        height: 34px;
    }
    
    .btn-glow-nav {
        font-size: 0.85rem;
        padding: 0 16px;
    }
    
    .container {
        padding: 0 32px;
    }
    
    .hero-container {
        gap: 40px;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Tablets & Small Laptops (max 1024px) */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100vw;
        background: rgba(5, 5, 8, 0.98);
        backdrop-filter: blur(20px);
        padding: 0;
        border-bottom: 1px solid var(--border-light);
        z-index: 10001;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        margin: 0;
        flex-direction: column;
        gap: 0;
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }
    
    .menu-toggle {
        display: flex;
        margin-left: 20px;
    }
    
    .nav-actions {
        margin-left: auto;
    }
    
    .nav-actions .nav-icon-btn:nth-child(n+4) {
        display: none;
    }
    
    /* Mobile Menu Overlay - Active State */
    .nav-links.active {
        display: flex !important;
    }
    
    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        display: block;
    }
    
    .nav-links a {
        display: block;
        padding: 16px 20px;
        font-size: 1.1rem;
        color: #FFFFFF;
        text-decoration: none;
    }
    
    .nav-links a::after {
        display: none !important;
    }
    
    /* Submenu in mobile */
    .nav-links li ul {
        position: static;
        display: none;
        background: rgba(0, 0, 0, 0.3);
        padding: 0;
        margin: 0;
        box-shadow: none;
        border: none;
    }
    
    .nav-links li:hover ul,
    .nav-links li:focus-within ul {
        display: block;
    }
    
    .nav-links li ul li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    }
    
    .nav-links li ul a {
        padding-left: 40px;
        font-size: 1rem;
        color: var(--text-muted);
    }
    
    /* Hero Section - Tablet */
    .hero-container {
        grid-template-columns: 1fr;
        gap: 60px;
        padding: 40px 32px;
    }
    
    .hero-content {
        text-align: center;
        align-items: center;
    }
    
    .panel-header {
        margin: 0 auto var(--space-sm);
    }
    
    .hero-download-simple {
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px 20px;
    }
    
    .download-label {
        font-size: 0.95rem;
    }
    
    .simple-link {
        padding: 10px 18px;
        font-size: 0.95rem;
    }
    
    /* Story Section - Tablet */
    .story-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .story-image {
        max-width: 600px;
        margin: 0 auto;
    }
    
    /* Features Grid - Tablet */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    /* Architecture Grid - Tablet */
    .arch-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    /* Scenes Grid - Tablet */
    .scenes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    /* Timeline - Tablet */
    .timeline {
        padding-left: 30px;
    }
    
    .timeline-item {
        padding-left: 40px;
    }
}

/* Mobile Devices (max 768px) */
@media (max-width: 768px) {
    :root {
        --header-height: 64px;
        --space-xs: 8px;
        --space-sm: 16px;
        --space-md: 24px;
        --space-lg: 32px;
        --space-xl: 48px;
    }
    
    .container {
        padding: 0 20px;
    }
    
    /* Navigation - Mobile */
    .logo {
        font-size: 1.1rem;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
    }
    
    
    .nav-actions .nav-icon-btn {
        width: 32px;
        height: 32px;
    }
    
    .nav-actions .nav-icon-btn i {
        font-size: 0.9rem;
    }
    
    .nav-actions .btn-glow-nav {
        display: none; /* Hide CTA button on very small screens */
    }
    
    .nav-actions .nav-icon-btn:nth-child(n+3) {
        display: none; /* Only show first 2 icon buttons on mobile */
    }
    
    .menu-toggle {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: 12px;
    }
    
    /* Typography - Mobile */
    h1 {
        font-size: 2.25rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    h4 {
        font-size: 1.1rem;
    }
    
    p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    /* Hero Section - Mobile */
    .hero {
        min-height: auto;
        padding: 20px 0 40px;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 20px;
    }
    
    .hero-content {
        text-align: center;
        align-items: center;
    }
    
    .hero h1 {
        font-size: 2rem;
        margin-bottom: 16px;
    }
    
    .hero p {
        font-size: 0.9rem;
        max-width: 100%;
    }
    
    .panel-header {
        font-size: 0.7rem;
        padding: 6px 16px;
    }
    
    .hero-download-simple {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        width: 100%;
        padding: 20px 0;
        margin-top: var(--space-lg);
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        backdrop-filter: none;
    }
    
    .hero-download-simple::before {
        display: none;
    }
    
    .download-label {
        width: 100%;
        text-align: center;
        font-size: 1rem;
        margin-bottom: 4px;
    }
    
    .simple-link {
        padding: 14px 20px;
        font-size: 1rem;
        width: 100%;
        justify-content: center;
        border-radius: 12px;
        background: rgba(0, 240, 255, 0.1);
        border: 1.5px solid rgba(0, 240, 255, 0.3);
        min-height: 48px; /* 增加触摸区域 */
    }
    
    .simple-link i {
        font-size: 1.2em;
    }
    
    .divider {
        display: none;
    }
    
    /* Gallery/Slider - Mobile */
    .gallery-visual {
        margin-top: 20px;
    }
    
    .main-image-frame {
        height: 280px;
    }
    
    .slider-btn {
        width: 36px;
        height: 36px;
    }
    
    .slider-dots {
        bottom: 12px;
    }
    
    /* Story Section - Mobile */
    .brand-story {
        padding: 60px 0;
    }
    
    .story-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .story-image {
        order: -1; /* Move image to top on mobile */
    }
    
    .story-content h2 {
        font-size: 1.75rem;
    }
    
    /* Features Section - Mobile */
    .features {
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
        margin-bottom: 12px;
    }
    
    .section-header p {
        font-size: 0.9rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .feature-card {
        padding: 24px;
    }
    
    .feature-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .feature-card h3 {
        font-size: 1.15rem;
    }
    
    /* Architecture Section - Mobile */
    .architecture {
        padding: 60px 0;
    }
    
    .arch-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .arch-card {
        padding: 24px;
    }
    
    /* Scenes Section - Mobile */
    .scenes {
        padding: 60px 0;
    }
    
    .scenes-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .scene-card {
        padding: 24px;
    }
    
    /* Timeline - Mobile */
    .timeline {
        padding-left: 20px;
    }
    
    .timeline-item {
        padding-left: 30px;
        margin-bottom: 40px;
    }
    
    .timeline-item::before {
        left: -20px;
        width: 12px;
        height: 12px;
    }
    
    .timeline-item::after {
        left: -14px;
        width: 2px;
    }
    
    .timeline-year {
        font-size: 1.5rem;
    }
    
    /* Buttons - Mobile */
    .btn, .btn-primary, .btn-secondary {
        padding: 12px 24px;
        font-size: 0.9rem;
        height: auto;
        min-height: 44px; /* Touch-friendly size */
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    /* Cards - Mobile */
    .card, .glass-panel {
        padding: 0px;
        margin-bottom: 20px;
    }
    
    /* Modal - Mobile */
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 20px auto;
        padding: 24px;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    /* Footer - Mobile */
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    /* Chat Widget - Mobile */
    .chat-widget {
        width: 100%;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    
    .chat-toggle {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }
}

/* Small Mobile Devices (max 480px) */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .nav-actions .nav-icon-btn:not(:first-child) {
        display: none; /* Only show first icon button */
    }
    
    .main-image-frame {
        height: 240px;
    }
    
    .feature-card,
    .arch-card,
    .scene-card {
        padding: 20px;
    }
    
    .hero-download-simple {
        padding: 16px 0;
        gap: 12px;
        margin-top: var(--space-md);
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }
    
    .download-label {
        font-size: 0.9rem;
    }
    
    .simple-link {
        padding: 12px 16px;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    .simple-link i {
        font-size: 1.1em;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0 40px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .main-image-frame {
        height: 300px;
    }
}
