/* WeTheNorth Space Station - Enhanced Responsive Design */

/* Enhanced Large Desktop (1600px+) */
@media (min-width: 1600px) {
    .section-container {
        max-width: 1800px;
        padding: 0 var(--space-2xl);
    }
    
    .hero-title .title-main {
        font-size: 7rem;
    }
    
    .space-station-model {
        width: 450px;
        height: 450px;
    }
    
    .feature-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-2xl);
    }
    
    .cosmic-button {
        padding: var(--space-lg) var(--space-2xl);
        font-size: 1rem;
    }
    
    .status-panel {
        min-width: 320px;
        padding: var(--space-2xl);
    }
    
    .stats-hologram {
        padding: var(--space-3xl);
    }
}

/* Enhanced Desktop (1200px - 1599px) */
@media (max-width: 1599px) and (min-width: 1200px) {
    .nav-constellation {
        gap: var(--space-xl);
    }
    
    .hero-content {
        gap: var(--space-3xl);
    }
    
    .space-station-model {
        width: 320px;
        height: 320px;
    }
    
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-lg);
    }
    
    .section-container {
        padding: 0 var(--space-xl);
    }
}

/* Enhanced Large Tablet/Small Desktop (1024px - 1199px) */
@media (max-width: 1199px) and (min-width: 1024px) {
    /* Navigation adjustments */
    .nav-container {
        padding: 0 var(--space-lg);
    }
    
    .nav-constellation {
        gap: var(--space-lg);
    }
    
    .nav-star {
        width: 12px;
        height: 12px;
    }
    
    .star-label {
        font-size: 0.8rem;
        bottom: -30px;
    }
    
    /* Layout changes for better tablet experience */
    .hero-content,
    .trading-overview,
    .security-overview {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
        text-align: center;
    }
    
    .space-station-model {
        width: 300px;
        height: 300px;
    }
    
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
    
    /* Sticky elements become static */
    .status-panel {
        position: static;
        margin: var(--space-2xl) auto 0;
        right: auto;
        bottom: auto;
        max-width: 400px;
    }
    
    .trading-stats {
        position: static;
        top: auto;
        margin-top: var(--space-2xl);
    }
    
    /* Enhanced touch targets */
    .cosmic-button {
        min-height: 48px;
        padding: var(--space-md) var(--space-xl);
    }
    
    .nav-star {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-star::before {
        content: '';
        width: 12px;
        height: 12px;
        background: currentColor;
        border-radius: 50%;
    }
}

/* Enhanced Tablet Portrait (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    /* Enhanced navigation for tablet */
    .nav-container {
        flex-direction: column;
        gap: var(--space-lg);
        padding: var(--space-lg);
    }
    
    .nav-logo {
        order: 1;
    }
    
    .nav-constellation {
        order: 2;
        gap: var(--space-md);
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .nav-controls {
        order: 3;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .logo-subtitle {
        font-size: 0.7rem;
    }
    
    /* Enhanced typography for tablet */
    .hero-title .title-main {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }
    
    .section-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }
    
    /* Enhanced layout */
    .space-section {
        padding: var(--space-3xl) 0;
    }
    
    .section-container {
        padding: 0 var(--space-lg);
    }
    
    .space-station-model {
        width: 280px;
        height: 280px;
    }
    
    .hero-actions {
        justify-content: center;
        gap: var(--space-md);
    }
    
    /* Enhanced components */
    .feature-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .feature-card {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
    
    /* Enhanced interface elements */
    .cosmic-button {
        width: 100%;
        max-width: 300px;
        min-height: 52px;
    }
    
    /* Enhanced status panel */
    .status-panel {
        max-width: 500px;
        margin: var(--space-2xl) auto 0;
    }
    
    /* Enhanced animations for tablet */
    .space-station-model {
        animation-duration: 30s;
    }
    
    .ring-outer {
        animation-duration: 20s;
    }
    
    .ring-middle {
        animation-duration: 18s;
    }
    
    .ring-inner {
        animation-duration: 12s;
    }
}

/* Enhanced Mobile Landscape (481px - 767px) */
@media (max-width: 767px) and (min-width: 481px) {
    /* Enhanced mobile navigation */
    .space-nav {
        padding: var(--space-sm) 0;
    }
    
    .nav-container {
        flex-direction: column;
        gap: var(--space-md);
        padding: var(--space-md);
    }
    
    .nav-constellation {
        gap: var(--space-sm);
        justify-content: center;
    }
    
    .nav-star {
        width: 40px;
        height: 40px;
        border-radius: var(--radius-md);
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .nav-star::before {
        content: '';
        width: 8px;
        height: 8px;
        background: currentColor;
        border-radius: 50%;
    }
    
    .star-label {
        font-size: 0.7rem;
        bottom: -25px;
    }
    
    .logo-text {
        font-size: 1.4rem;
    }
    
    .logo-subtitle {
        font-size: 0.65rem;
    }
    
    /* Enhanced typography */
    .hero-title .title-main {
        font-size: clamp(2rem, 10vw, 3.5rem);
        line-height: 1;
    }
    
    .title-line {
        font-size: clamp(0.9rem, 3vw, 1.1rem);
    }
    
    .title-subtitle {
        font-size: clamp(0.8rem, 2.5vw, 0.9rem);
        letter-spacing: 2px;
    }
    
    /* Enhanced layout */
    .space-main {
        margin-top: 100px;
    }
    
    .space-section {
        padding: var(--space-2xl) 0;
    }
    
    .section-container {
        padding: 0 var(--space-md);
    }
    
    .space-station-model {
        width: 240px;
        height: 240px;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
        width: 100%;
    }
    
    /* Enhanced buttons */
    .cosmic-button {
        width: 100%;
        max-width: 280px;
        min-height: 48px;
        font-size: 0.9rem;
        padding: var(--space-md) var(--space-lg);
    }
    
    /* Enhanced components */
    .feature-card {
        padding: var(--space-lg);
        text-align: left;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .stat-module {
        padding: var(--space-lg);
    }
    
    /* Enhanced text blocks */
    .hero-text,
    .overview-text,
    .security-text {
        padding: var(--space-lg);
        margin-bottom: var(--space-lg);
    }
    
    /* Enhanced status panel */
    .status-panel {
        margin: var(--space-xl) auto 0;
        padding: var(--space-lg);
    }
    
    .status-grid {
        gap: var(--space-sm);
    }
    
    .status-item {
        font-size: 0.85rem;
    }
}

/* Enhanced Mobile Portrait (320px - 480px) */
@media (max-width: 480px) {
    /* Enhanced base adjustments */
    :root {
        --space-xs: 0.2rem;
        --space-sm: 0.4rem;
        --space-md: 0.8rem;
        --space-lg: 1.2rem;
        --space-xl: 1.6rem;
        --space-2xl: 2.4rem;
        --space-3xl: 3.2rem;
        --space-4xl: 4rem;
        --space-5xl: 4.8rem;
    }
    
    /* Enhanced mobile navigation */
    .space-nav {
        padding: var(--space-xs) 0;
    }
    
    .nav-container {
        padding: var(--space-sm);
        gap: var(--space-sm);
    }
    
    .nav-constellation {
        gap: var(--space-xs);
        flex-wrap: wrap;
        justify-content: center;
        max-width: 100%;
    }
    
    .nav-star {
        width: 36px;
        height: 36px;
        border-radius: var(--radius-sm);
        margin: var(--space-xs);
    }
    
    .nav-star::before {
        width: 6px;
        height: 6px;
    }
    
    .star-label {
        font-size: 0.6rem;
        bottom: -20px;
        white-space: nowrap;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .logo-subtitle {
        font-size: 0.55rem;
        letter-spacing: 1px;
    }
    
    /* Enhanced typography */
    .hero-title .title-main {
        font-size: clamp(1.8rem, 12vw, 3rem);
        line-height: 0.9;
        margin-bottom: var(--space-sm);
    }
    
    .title-line {
        font-size: clamp(0.8rem, 4vw, 1rem);
        margin-bottom: var(--space-xs);
    }
    
    .title-subtitle {
        font-size: clamp(0.7rem, 3vw, 0.8rem);
        letter-spacing: 1px;
    }
    
    .section-title {
        font-size: clamp(1.5rem, 8vw, 2rem);
        line-height: 1.1;
    }
    
    .section-subtitle {
        font-size: clamp(0.9rem, 4vw, 1rem);
    }
    
    /* Enhanced layout */
    .space-main {
        margin-top: 80px;
    }
    
    .space-section {
        padding: var(--space-xl) 0;
    }
    
    .section-container {
        padding: 0 var(--space-sm);
    }
    
    .hero-content {
        gap: var(--space-xl);
    }
    
    .space-station-model {
        width: 200px;
        height: 200px;
    }
    
    .station-core {
        width: 50px;
        height: 50px;
    }
    
    .ring-outer {
        width: 180px;
        height: 180px;
        border-width: 2px;
    }
    
    .ring-middle {
        width: 140px;
        height: 140px;
        border-width: 2px;
    }
    
    .ring-inner {
        width: 100px;
        height: 100px;
        border-width: 1px;
    }
    
    .module {
        width: 14px;
        height: 14px;
    }
    
    /* Enhanced text content */
    .hero-text {
        font-size: clamp(0.9rem, 4vw, 1rem);
        line-height: 1.6;
        padding: var(--space-md);
    }
    
    .overview-text,
    .security-text {
        font-size: clamp(0.9rem, 4vw, 1rem);
        line-height: 1.6;
        padding: var(--space-md);
    }
    
    /* Enhanced buttons */
    .cosmic-button {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.8rem;
        width: 100%;
        max-width: 260px;
        min-height: 44px;
        letter-spacing: 1px;
    }
    
    .hero-actions {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    /* Enhanced components */
    .feature-card {
        padding: var(--space-md);
        border-radius: var(--radius-lg);
    }
    
    .feature-icon {
        font-size: 2rem;
        margin-bottom: var(--space-md);
    }
    
    .feature-title {
        font-size: clamp(1rem, 5vw, 1.2rem);
        margin-bottom: var(--space-sm);
    }
    
    .feature-description {
        font-size: clamp(0.85rem, 4vw, 0.95rem);
        line-height: 1.5;
    }
    
    /* Enhanced stats */
    .stats-hologram {
        padding: var(--space-lg);
    }
    
    .stats-title {
        font-size: 0.9rem;
        margin-bottom: var(--space-lg);
    }
    
    .stats-grid {
        gap: var(--space-sm);
    }
    
    .stat-module {
        padding: var(--space-md);
    }
    
    .stat-value {
        font-size: 1.6rem;
        margin-bottom: var(--space-xs);
    }
    
    .stat-label {
        font-size: 0.8rem;
        margin-bottom: var(--space-xs);
    }
    
    .stat-trend {
        font-size: 0.7rem;
        padding: var(--space-xs);
    }
    
    /* Enhanced security layers */
    .security-layer {
        border-radius: var(--radius-lg);
    }
    
    .layer-header {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
        padding: var(--space-md);
    }
    
    .layer-title {
        font-size: clamp(0.9rem, 5vw, 1.1rem);
    }
    
    .layer-content {
        padding: var(--space-md);
    }
    
    .layer-description {
        font-size: clamp(0.85rem, 4vw, 0.95rem);
        line-height: 1.5;
    }
    
    /* Enhanced status panel */
    .status-panel {
        margin: var(--space-lg) auto 0;
        padding: var(--space-md);
        min-width: auto;
        width: 100%;
        max-width: 320px;
    }
    
    .panel-header h3 {
        font-size: 0.85rem;
    }
    
    .status-indicator {
        width: 12px;
        height: 12px;
    }
    
    .status-item {
        font-size: 0.8rem;
        padding: var(--space-xs) 0;
    }
    
    .status-value {
        font-size: 0.75rem;
        padding: var(--space-xs);
    }
    
    /* Enhanced touch interactions */
    .feature-card,
    .security-layer,
    .stat-module {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(0, 212, 255, 0.2);
    }
    
    .cosmic-button {
        -webkit-tap-highlight-color: rgba(0, 255, 136, 0.3);
    }
    
    .nav-star {
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
    }
    
    /* Enhanced animations for mobile */
    .space-station-model {
        animation-duration: 40s;
    }
    
    .ring-outer {
        animation-duration: 25s;
    }
    
    .ring-middle {
        animation-duration: 22s;
    }
    
    .ring-inner {
        animation-duration: 15s;
    }
    
    .module {
        animation-duration: 4s;
    }
    
    /* Reduce motion for better performance */
    @media (prefers-reduced-motion: reduce) {
        .space-station-model,
        .ring-outer,
        .ring-middle,
        .ring-inner,
        .module {
            animation: none;
        }
        
        .cosmic-aurora,
        .floating-planets .planet,
        .cosmic-dust {
            animation: none;
        }
    }
}

/* Enhanced Ultra-small screens (below 320px) */
@media (max-width: 319px) {
    .nav-constellation {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-xs);
        width: 100%;
    }
    
    .nav-star {
        width: 32px;
        height: 32px;
    }
    
    .star-label {
        display: none;
    }
    
    .space-station-model {
        width: 160px;
        height: 160px;
    }
    
    .hero-title .title-main {
        font-size: 1.6rem;
    }
    
    .cosmic-button {
        font-size: 0.75rem;
        padding: var(--space-xs) var(--space-sm);
        max-width: 240px;
    }
    
    .feature-card,
    .stats-hologram,
    .status-panel {
        padding: var(--space-sm);
    }
}

/* Enhanced landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .space-section {
        padding: var(--space-lg) 0;
    }
    
    .hero-content {
        min-height: auto;
        gap: var(--space-lg);
    }
    
    .space-station-model {
        width: 180px;
        height: 180px;
    }
    
    .section-header {
        margin-bottom: var(--space-lg);
    }
}

/* Enhanced high DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .space-station-model,
    .feature-icon,
    .status-indicator {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Enhanced dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --space-light-blue: #b3e5fc;
        --space-silver: #e0e0e0;
    }
}

/* Enhanced print styles */
@media print {
    .space-background,
    .cosmic-aurora,
    .floating-planets,
    .cosmic-dust,
    .space-nav {
        display: none !important;
    }
    
    .space-main {
        margin-top: 0;
    }
    
    .space-section {
        page-break-inside: avoid;
        padding: 1rem 0;
    }
    
    .feature-card,
    .security-layer,
    .stat-module {
        page-break-inside: avoid;
        border: 1px solid #ccc;
        background: white !important;
        color: black !important;
    }
}

