/* ==========================================
   DESERTS EXPLORER - COMPLETE STYLESHEET
   Full Desert Aesthetic Theme
   ========================================== */

/* ==========================================
   CSS VARIABLES & COLOR PALETTE
   ========================================== */
:root {
    /* Sand Light Tones */
    --sand-light-1: #F5DEB3;
    --sand-light-2: #EDC9AF;
    --sand-light-3: #DEB887;
    
    /* Sand Dark Tones */
    --sand-dark-1: #D2691E;
    --sand-dark-2: #CD853F;
    --sand-dark-3: #B8860B;
    
    /* Dune Orange */
    --dune-orange-1: #E67E22;
    --dune-orange-2: #D35400;
    --dune-orange-3: #FF8C00;
    
    /* Desert Red */
    --desert-red-1: #A0522D;
    --desert-red-2: #8B4513;
    --desert-red-3: #954535;
    
    /* Sun Gold */
    --sun-gold-1: #FFD700;
    --sun-gold-2: #FFA500;
    --sun-gold-3: #FF8C00;
    
    /* Night Desert */
    --night-1: #1A0F05;
    --night-2: #2D1810;
    --night-3: #3D2817;
    
    /* Accent */
    --camel-brown: #C19A6B;
    
    /* Text */
    --text-cream: #FFF8DC;
    --text-light: #FAEBD7;
    --text-dark: #3D2817;
    
    /* Functional Colors */
    --hot-badge: #E74C3C;
    --cold-badge: #9B59B6;
    --coastal-badge: #1ABC9C;
    --rain-shadow-badge: #E67E22;
    
    /* Gradients */
    --gradient-day: linear-gradient(135deg, #F5DEB3 0%, #DEB887 25%, #D2691E 50%, #CD853F 75%, #E67E22 100%);
    --gradient-night: linear-gradient(135deg, #1A0F05 0%, #2D1810 50%, #3D2817 100%);
    --gradient-card: linear-gradient(145deg, rgba(245, 222, 179, 0.15) 0%, rgba(210, 105, 30, 0.1) 100%);
    --gradient-hero: linear-gradient(180deg, rgba(26, 15, 5, 0) 0%, rgba(26, 15, 5, 0.7) 60%, rgba(26, 15, 5, 0.95) 100%);
    
    /* Shadows */
    --shadow-soft: 0 4px 20px rgba(139, 69, 19, 0.2);
    --shadow-medium: 0 8px 30px rgba(139, 69, 19, 0.3);
    --shadow-strong: 0 15px 50px rgba(139, 69, 19, 0.4);
    --shadow-glow: 0 0 30px rgba(255, 140, 0, 0.3);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 50%;
    
    /* Font Families */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Raleway', 'Segoe UI', sans-serif;
}

/* ==========================================
   CSS RESET & BASE STYLES
   ========================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    background: var(--gradient-day);
    color: var(--text-cream);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background var(--transition-slow);
}

body.day-mode {
    background: var(--gradient-day);
}

body.night-mode {
    background: var(--gradient-night);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
}

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

ul, ol {
    list-style: none;
}

/* ==========================================
   SAND PARTICLES ANIMATION
   ========================================== */
.sand-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.sand-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--sand-light-1);
    border-radius: 50%;
    opacity: 0;
    animation: sandDrift linear infinite;
}

.sand-particle:nth-child(odd) {
    width: 2px;
    height: 2px;
    background: var(--sand-light-2);
}

.sand-particle:nth-child(3n) {
    width: 4px;
    height: 4px;
    background: var(--sand-dark-2);
}

@keyframes sandDrift {
    0% {
        transform: translateX(-10px) translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateX(100vw) translateY(-30px) rotate(360deg);
        opacity: 0;
    }
}

/* ==========================================
   HEAT SHIMMER / MIRAGE EFFECT
   ========================================== */
.heat-shimmer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(
        to top,
        rgba(255, 200, 150, 0.1) 0%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 2;
    animation: heatShimmer 3s ease-in-out infinite;
}

body.night-mode .heat-shimmer {
    opacity: 0;
}

@keyframes heatShimmer {
    0%, 100% {
        transform: scaleY(1) translateY(0);
        opacity: 0.3;
    }
    25% {
        transform: scaleY(1.01) translateY(-1px);
        opacity: 0.4;
    }
    50% {
        transform: scaleY(1.02) translateY(-2px);
        opacity: 0.5;
    }
    75% {
        transform: scaleY(1.01) translateY(-1px);
        opacity: 0.4;
    }
}

/* ==========================================
   SUN GLOW EFFECT
   ========================================== */
.sun-glow {
    position: fixed;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(
        circle,
        rgba(255, 215, 0, 0.4) 0%,
        rgba(255, 165, 0, 0.2) 30%,
        rgba(255, 140, 0, 0.1) 50%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    animation: sunPulse 4s ease-in-out infinite;
    transition: opacity var(--transition-slow);
}

body.night-mode .sun-glow {
    opacity: 0;
}

@keyframes sunPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* ==========================================
   NIGHT SKY ELEMENTS
   ========================================== */
.night-sky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

body.night-mode .night-sky {
    opacity: 1;
}

.moon {
    position: absolute;
    top: 50px;
    left: 80px;
    width: 80px;
    height: 80px;
    background: radial-gradient(
        circle at 30% 30%,
        #FFF8DC 0%,
        #F5DEB3 50%,
        #DEB887 100%
    );
    border-radius: 50%;
    box-shadow: 
        0 0 20px rgba(255, 248, 220, 0.5),
        0 0 40px rgba(255, 248, 220, 0.3),
        0 0 60px rgba(255, 248, 220, 0.2);
    animation: moonGlow 5s ease-in-out infinite;
}

@keyframes moonGlow {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(255, 248, 220, 0.5),
            0 0 40px rgba(255, 248, 220, 0.3),
            0 0 60px rgba(255, 248, 220, 0.2);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(255, 248, 220, 0.6),
            0 0 50px rgba(255, 248, 220, 0.4),
            0 0 80px rgba(255, 248, 220, 0.3);
    }
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #FFF8DC;
    border-radius: 50%;
    animation: starTwinkle 2s ease-in-out infinite;
}

.star:nth-child(odd) {
    animation-delay: 0.5s;
}

.star:nth-child(3n) {
    width: 3px;
    height: 3px;
    animation-delay: 1s;
}

@keyframes starTwinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.milky-way {
    position: absolute;
    top: 0;
    left: 20%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(255, 248, 220, 0.02) 20%,
        rgba(255, 248, 220, 0.05) 50%,
        rgba(255, 248, 220, 0.02) 80%,
        transparent 100%
    );
    transform: rotate(-30deg) translateY(-20%);
    filter: blur(10px);
}

.campfire-glows {
    position: absolute;
    bottom: 10%;
    left: 0;
    width: 100%;
    height: 50px;
}

.campfire-glow {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(
        circle,
        rgba(255, 140, 0, 0.8) 0%,
        rgba(255, 100, 0, 0.4) 50%,
        transparent 100%
    );
    border-radius: 50%;
    animation: campfireFlicker 1.5s ease-in-out infinite;
}

@keyframes campfireFlicker {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    25% {
        opacity: 0.9;
        transform: scale(1.2);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.9);
    }
    75% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* ==========================================
   SANDSTORM OVERLAY
   ========================================== */
.sandstorm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    background: linear-gradient(
        90deg,
        rgba(210, 180, 140, 0) 0%,
        rgba(210, 180, 140, 0.3) 50%,
        rgba(210, 180, 140, 0) 100%
    );
    transition: opacity var(--transition-medium);
}

.sandstorm-overlay.active {
    opacity: 1;
    animation: sandstormSweep 2s linear infinite;
}

@keyframes sandstormSweep {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.sandstorm-particle {
    position: absolute;
    background: var(--sand-light-1);
    border-radius: 50%;
    animation: sandstormDrift linear infinite;
}

@keyframes sandstormDrift {
    0% {
        transform: translateX(-50px) translateY(0) rotate(0deg);
        opacity: 0;
    }
    5% {
        opacity: 0.8;
    }
    95% {
        opacity: 0.8;
    }
    100% {
        transform: translateX(calc(100vw + 50px)) translateY(-100px) rotate(720deg);
        opacity: 0;
    }
}

/* ==========================================
   HEADER STYLES
   ========================================== */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(
        180deg,
        rgba(45, 24, 16, 0.95) 0%,
        rgba(45, 24, 16, 0.9) 100%
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(193, 154, 107, 0.3);
    padding: var(--spacing-sm) var(--spacing-lg);
}

body.night-mode .main-header {
    background: linear-gradient(
        180deg,
        rgba(26, 15, 5, 0.98) 0%,
        rgba(26, 15, 5, 0.95) 100%
    );
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--sun-gold-1), var(--dune-orange-1));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-dark);
    animation: sunPulse 4s ease-in-out infinite;
}

.logo-text h1 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--sun-gold-1);
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.logo-text .tagline {
    font-size: 0.8rem;
    color: var(--sand-light-2);
    font-weight: 300;
    letter-spacing: 1px;
}

/* Stats Panel */
.stats-panel {
    display: flex;
    gap: var(--spacing-md);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: rgba(193, 154, 107, 0.15);
    border-radius: var(--radius-md);
    border: 1px solid rgba(193, 154, 107, 0.2);
}

.stat-item i {
    font-size: 1.2rem;
    color: var(--dune-orange-1);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--sun-gold-1);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--sand-light-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Day/Night Toggle */
.day-night-toggle {
    position: relative;
}

.toggle-input {
    display: none;
}

.toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 70px;
    height: 35px;
    background: linear-gradient(135deg, var(--dune-orange-1), var(--sun-gold-2));
    border-radius: 35px;
    padding: 4px;
    cursor: pointer;
    position: relative;
    transition: background var(--transition-medium);
}

.toggle-input:checked + .toggle-label {
    background: linear-gradient(135deg, var(--night-2), var(--night-1));
}

.toggle-label .sun-icon,
.toggle-label .moon-icon {
    font-size: 0.9rem;
    z-index: 1;
    transition: opacity var(--transition-fast);
}

.toggle-label .sun-icon {
    color: var(--text-dark);
    margin-left: 4px;
}

.toggle-label .moon-icon {
    color: var(--sun-gold-1);
    margin-right: 4px;
    opacity: 0.5;
}

.toggle-input:checked + .toggle-label .sun-icon {
    opacity: 0.5;
}

.toggle-input:checked + .toggle-label .moon-icon {
    opacity: 1;
}

.toggle-ball {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 29px;
    height: 29px;
    background: var(--text-cream);
    border-radius: 50%;
    transition: transform var(--transition-medium);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.toggle-input:checked + .toggle-label .toggle-ball {
    transform: translateX(35px);
}

/* ==========================================
   SEARCH & FILTERS SECTION
   ========================================== */
.search-filters-section {
    max-width: 1400px;
    margin: var(--spacing-lg) auto;
    padding: 0 var(--spacing-lg);
}

.search-container {
    margin-bottom: var(--spacing-md);
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-box .search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--camel-brown);
    font-size: 1.1rem;
}

.search-box input {
    width: 100%;
    padding: 15px 50px;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(245, 222, 179, 0.1);
    border: 2px solid rgba(193, 154, 107, 0.3);
    border-radius: 50px;
    color: var(--text-cream);
    backdrop-filter: blur(10px);
    transition: var(--transition-medium);
}

.search-box input::placeholder {
    color: var(--sand-light-3);
}

.search-box input:focus {
    outline: none;
    border-color: var(--dune-orange-1);
    background: rgba(245, 222, 179, 0.15);
    box-shadow: 0 0 20px rgba(230, 126, 34, 0.2);
}

.search-clear {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(193, 154, 107, 0.2);
    color: var(--sand-light-2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
}

.search-box input:not(:placeholder-shown) + .search-clear {
    opacity: 1;
    visibility: visible;
}

.search-clear:hover {
    background: rgba(230, 126, 34, 0.3);
    color: var(--text-cream);
}

/* Filters Container */
.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.filter-group {
    display: flex;
    gap: var(--spacing-xs);
}

.type-filters {
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(193, 154, 107, 0.15);
    border: 1px solid rgba(193, 154, 107, 0.3);
    border-radius: 25px;
    color: var(--sand-light-2);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-medium);
}

.filter-btn:hover {
    background: rgba(230, 126, 34, 0.2);
    border-color: var(--dune-orange-1);
    color: var(--text-cream);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--dune-orange-1), var(--sun-gold-2));
    border-color: transparent;
    color: var(--text-dark);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
}

.filter-btn i {
    font-size: 0.9rem;
}

/* Select Wrappers */
.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.select-wrapper > i:first-child {
    position: absolute;
    left: 15px;
    color: var(--camel-brown);
    font-size: 0.9rem;
    pointer-events: none;
}

.select-wrapper select {
    appearance: none;
    padding: 10px 40px 10px 40px;
    font-size: 0.9rem;
    font-family: inherit;
    background: rgba(193, 154, 107, 0.15);
    border: 1px solid rgba(193, 154, 107, 0.3);
    border-radius: 25px;
    color: var(--text-cream);
    cursor: pointer;
    transition: var(--transition-medium);
}

.select-wrapper select:hover,
.select-wrapper select:focus {
    outline: none;
    border-color: var(--dune-orange-1);
    background: rgba(230, 126, 34, 0.2);
}

.select-wrapper > i:last-child {
    position: absolute;
    right: 15px;
    color: var(--sand-light-2);
    font-size: 0.8rem;
    pointer-events: none;
}

.select-wrapper select option {
    background: var(--night-2);
    color: var(--text-cream);
}

/* Active Filters */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    justify-content: center;
    margin-bottom: var(--spacing-sm);
}

.active-filter-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(230, 126, 34, 0.2);
    border: 1px solid var(--dune-orange-1);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--sun-gold-1);
}

.active-filter-tag button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-cream);
    font-size: 0.7rem;
    transition: var(--transition-fast);
}

.active-filter-tag button:hover {
    background: var(--desert-red-1);
}

/* Results Info */
.results-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) 0;
    border-top: 1px solid rgba(193, 154, 107, 0.2);
}

#resultsCount {
    font-size: 0.95rem;
    color: var(--sand-light-2);
}

.reset-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(193, 154, 107, 0.3);
    border-radius: 20px;
    color: var(--sand-light-2);
    font-size: 0.85rem;
    transition: var(--transition-fast);
}

.reset-filters:hover {
    border-color: var(--desert-red-1);
    color: var(--desert-red-1);
    background: rgba(160, 82, 45, 0.1);
}

/* ==========================================
   MAIN CONTENT & DESERT CARDS GRID
   ========================================== */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg) var(--spacing-xl);
    min-height: 60vh;
    position: relative;
    z-index: 10;
}

.deserts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

/* ==========================================
   DESERT CARD STYLES
   ========================================== */
.desert-card {
    position: relative;
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(193, 154, 107, 0.25);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
    cursor: pointer;
}

.desert-card:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 20px 40px rgba(210, 105, 30, 0.4),
        0 0 30px rgba(255, 140, 0, 0.3);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(255, 215, 0, 0.1) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity var(--transition-medium);
    pointer-events: none;
}

.desert-card:hover .card-glow {
    opacity: 1;
}

.card-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    padding: var(--spacing-md) var(--spacing-md) 0;
}

.image-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 4px solid rgba(193, 154, 107, 0.4);
    box-shadow: 
        0 8px 25px rgba(139, 69, 19, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.2);
    transition: border-color var(--transition-medium), box-shadow var(--transition-medium);
}

.desert-card:hover .image-wrapper {
    border-color: var(--sun-gold-1);
    box-shadow: 
        0 8px 30px rgba(255, 215, 0, 0.4),
        0 0 20px rgba(255, 165, 0, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.desert-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-medium);
}

.desert-card:hover .desert-image {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(26, 15, 5, 0.3) 100%
    );
    pointer-events: none;
}

/* Type Badge */
.type-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-badge.hot {
    background: linear-gradient(135deg, #E74C3C, #C0392B);
    color: white;
}

.type-badge.cold {
    background: linear-gradient(135deg, #9B59B6, #8E44AD);
    color: white;
}

.type-badge.coastal {
    background: linear-gradient(135deg, #1ABC9C, #16A085);
    color: white;
}

.type-badge.rain-shadow {
    background: linear-gradient(135deg, #E67E22, #D35400);
    color: white;
}

/* Temperature Indicator */
.temp-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: rgba(26, 15, 5, 0.7);
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--sun-gold-1);
}

.temp-indicator i {
    font-size: 0.75rem;
}

/* Card Content */
.card-content {
    padding: var(--spacing-md);
    text-align: center;
}

.desert-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-cream);
    margin-bottom: var(--spacing-xs);
    line-height: 1.3;
}

.desert-location {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: var(--spacing-sm);
}

.country-flags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
}

.country-flags img {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.country-flags .more-countries {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 16px;
    background: rgba(193, 154, 107, 0.3);
    border-radius: 2px;
    font-size: 0.6rem;
    color: var(--text-cream);
}

.continent-name {
    font-size: 0.8rem;
    color: var(--sand-light-3);
}

.desert-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
}

.desert-stats .stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--sand-light-2);
}

.desert-stats .stat i {
    color: var(--dune-orange-1);
    font-size: 0.85rem;
}

/* Card Footer */
.card-footer {
    padding: 0 var(--spacing-md) var(--spacing-md);
}

.explore-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.2), rgba(211, 84, 0, 0.2));
    border: 1px solid rgba(230, 126, 34, 0.4);
    border-radius: var(--radius-md);
    color: var(--sun-gold-1);
    font-weight: 500;
    transition: var(--transition-medium);
}

.explore-btn:hover {
    background: linear-gradient(135deg, var(--dune-orange-1), var(--dune-orange-2));
    color: var(--text-dark);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.4);
}

.explore-btn i {
    transition: transform var(--transition-fast);
}

.explore-btn:hover i {
    transform: translateX(4px);
}

/* ==========================================
   LOADING STATE
   ========================================== */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    gap: var(--spacing-md);
}

.loading-spinner {
    display: flex;
    gap: 10px;
}

.spinner-dune {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--sun-gold-1), var(--dune-orange-1));
    border-radius: 50%;
    animation: duneWave 1.2s ease-in-out infinite;
}

.spinner-dune:nth-child(2) {
    animation-delay: 0.2s;
}

.spinner-dune:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes duneWave {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-15px) scale(0.8);
        opacity: 0.5;
    }
}

.loading-state p {
    color: var(--sand-light-2);
    font-size: 1rem;
}

/* ==========================================
   NO RESULTS STATE
   ========================================== */
.no-results {
    text-align: center;
    padding: var(--spacing-xl);
}

.no-results-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    background: rgba(193, 154, 107, 0.15);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-results-icon i {
    font-size: 2rem;
    color: var(--sand-dark-2);
}

.no-results h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-cream);
    margin-bottom: var(--spacing-xs);
}

.no-results p {
    color: var(--sand-light-3);
    margin-bottom: var(--spacing-md);
}

.reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--dune-orange-1), var(--dune-orange-2));
    border-radius: 25px;
    color: var(--text-dark);
    font-weight: 600;
    transition: var(--transition-medium);
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(230, 126, 34, 0.4);
}

/* ==========================================
   FOOTER STYLES
   ========================================== */
.main-footer {
    position: relative;
    background: linear-gradient(180deg, transparent, var(--night-2));
    padding-top: 80px;
    margin-top: var(--spacing-xl);
}

.footer-dunes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.footer-dunes svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
    color: var(--night-2);
    animation: duneWaveFooter 8s ease-in-out infinite;
}

@keyframes duneWaveFooter {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(-20px);
    }
}

.footer-content {
    text-align: center;
    padding: var(--spacing-lg);
    position: relative;
}

.footer-info p {
    color: var(--sand-light-2);
    margin-bottom: var(--spacing-xs);
}

.footer-info i {
    color: var(--sun-gold-1);
    margin-right: 8px;
}

.footer-subtitle {
    font-size: 0.85rem;
    color: var(--sand-light-3);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.footer-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(193, 154, 107, 0.15);
    border: 1px solid rgba(193, 154, 107, 0.3);
    border-radius: var(--radius-full);
    color: var(--sand-light-2);
    font-size: 1rem;
    transition: var(--transition-medium);
}

.footer-links a:hover {
    background: var(--dune-orange-1);
    border-color: var(--dune-orange-1);
    color: var(--text-dark);
    transform: translateY(-3px);
}

/* ==========================================
   PROFILE PAGE STYLES
   ========================================== */
.profile-page {
    background: var(--night-1);
}

/* Profile Hero */
.profile-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-hero);
}

.hero-sand-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

/* Profile Navigation */
.profile-nav {
    position: relative;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(26, 15, 5, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(193, 154, 107, 0.3);
    border-radius: 25px;
    color: var(--text-cream);
    font-weight: 500;
    transition: var(--transition-medium);
}

.back-btn:hover {
    background: rgba(230, 126, 34, 0.3);
    border-color: var(--dune-orange-1);
    transform: translateX(-5px);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(26, 15, 5, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(193, 154, 107, 0.3);
    border-radius: 25px;
    color: var(--text-cream);
    font-size: 0.9rem;
    transition: var(--transition-medium);
}

.control-btn:hover {
    background: rgba(230, 126, 34, 0.3);
    border-color: var(--dune-orange-1);
}

.control-btn.active {
    background: linear-gradient(135deg, var(--dune-orange-1), var(--sun-gold-2));
    color: var(--text-dark);
    border-color: transparent;
}

.sandstorm-btn.active {
    animation: sandstormBtnPulse 1s ease-in-out infinite;
}

@keyframes sandstormBtnPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(230, 126, 34, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(230, 126, 34, 0.8);
    }
}

/* Hero Content */
.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: var(--spacing-xl);
    padding-bottom: 100px;
    position: relative;
    z-index: 10;
    text-align: center;
}

.desert-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-md);
}

.desert-type-badge.hot {
    background: linear-gradient(135deg, #E74C3C, #C0392B);
    color: white;
}

.desert-type-badge.cold {
    background: linear-gradient(135deg, #9B59B6, #8E44AD);
    color: white;
}

.desert-type-badge.coastal {
    background: linear-gradient(135deg, #1ABC9C, #16A085);
    color: white;
}

.desert-type-badge.rain-shadow {
    background: linear-gradient(135deg, #E67E22, #D35400);
    color: white;
}

.desert-title {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 700;
    color: var(--text-cream);
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: var(--spacing-md);
    line-height: 1.1;
}

.desert-subtitle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.country-flags-large {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.country-flags-large img {
    width: 36px;
    height: 24px;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform var(--transition-fast);
}

.country-flags-large img:hover {
    transform: scale(1.2);
}

.continent-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(193, 154, 107, 0.2);
    border: 1px solid rgba(193, 154, 107, 0.4);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--sand-light-1);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.hero-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    background: rgba(26, 15, 5, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(193, 154, 107, 0.3);
    border-radius: var(--radius-md);
    transition: var(--transition-medium);
}

.hero-stat:hover {
    background: rgba(230, 126, 34, 0.2);
    border-color: var(--dune-orange-1);
    transform: translateY(-3px);
}

.hero-stat i {
    font-size: 1.5rem;
    color: var(--sun-gold-1);
}

.hero-stat .stat-content {
    display: flex;
    flex-direction: column;
}

.hero-stat .stat-value {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-cream);
}

.hero-stat .stat-label {
    font-size: 0.75rem;
    color: var(--sand-light-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--sand-light-2);
    font-size: 0.85rem;
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-indicator i {
    font-size: 1.2rem;
}

@keyframes scrollBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* ==========================================
   PROFILE MAIN CONTENT
   ========================================== */
.profile-main {
    position: relative;
    z-index: 10;
    background: linear-gradient(180deg, var(--night-1), var(--night-2));
    padding: var(--spacing-xl) var(--spacing-lg);
}

.profile-main section {
    max-width: 1200px;
    margin: 0 auto var(--spacing-xl);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid rgba(193, 154, 107, 0.2);
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--sun-gold-1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h2 i {
    font-size: 1.4rem;
    color: var(--dune-orange-1);
}

/* ==========================================
   QUICK FACTS SECTION
   ========================================== */
.quick-facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.fact-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(193, 154, 107, 0.1);
    border: 1px solid rgba(193, 154, 107, 0.2);
    border-radius: var(--radius-md);
    transition: var(--transition-medium);
}

.fact-card:hover {
    background: rgba(230, 126, 34, 0.15);
    border-color: var(--dune-orange-1);
    transform: translateX(5px);
}

.fact-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dune-orange-1), var(--sun-gold-2));
    border-radius: var(--radius-md);
    font-size: 1.3rem;
    color: var(--text-dark);
}

.fact-content {
    display: flex;
    flex-direction: column;
}

.fact-label {
    font-size: 0.8rem;
    color: var(--sand-light-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.fact-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-cream);
}

/* ==========================================
   MAP SECTION
   ========================================== */
.map-container {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(193, 154, 107, 0.3);
}

.desert-map {
    width: 100%;
    height: 500px;
    background: var(--night-3);
}

/* Leaflet Custom Styles */
.leaflet-container {
    background: var(--night-3);
    font-family: var(--font-body);
}

.leaflet-tile {
    filter: sepia(30%) saturate(80%) hue-rotate(10deg);
}

body.night-mode .leaflet-tile {
    filter: sepia(40%) saturate(60%) brightness(70%) hue-rotate(10deg);
}

.leaflet-popup-content-wrapper {
    background: rgba(45, 24, 16, 0.95);
    color: var(--text-cream);
    border-radius: var(--radius-md);
    border: 1px solid rgba(193, 154, 107, 0.3);
}

.leaflet-popup-tip {
    background: rgba(45, 24, 16, 0.95);
}

.leaflet-popup-content {
    margin: 12px 15px;
}

.map-controls {
    display: flex;
    gap: var(--spacing-xs);
}

.map-control-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(193, 154, 107, 0.15);
    border: 1px solid rgba(193, 154, 107, 0.3);
    border-radius: var(--radius-sm);
    color: var(--sand-light-2);
    font-size: 0.85rem;
    transition: var(--transition-fast);
}

.map-control-btn:hover {
    background: rgba(230, 126, 34, 0.2);
    border-color: var(--dune-orange-1);
}

.map-control-btn.active {
    background: var(--dune-orange-1);
    color: var(--text-dark);
    border-color: transparent;
}

.map-legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(45, 24, 16, 0.9);
    backdrop-filter: blur(10px);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    border: 1px solid rgba(193, 154, 107, 0.3);
    z-index: 1000;
}

.map-legend h4 {
    font-size: 0.85rem;
    color: var(--sun-gold-1);
    margin-bottom: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--sand-light-2);
    margin-bottom: 6px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-color.desert-area {
    background: rgba(210, 105, 30, 0.5);
    border: 2px solid var(--sand-dark-1);
}

.legend-color.landmark {
    background: var(--sun-gold-1);
}

.legend-color.oasis {
    background: #1ABC9C;
}

.legend-color.city {
    background: var(--desert-red-1);
}

/* ==========================================
   MIND MAP SECTION
   ========================================== */
.mind-map-container {
    position: relative;
    padding: var(--spacing-xl) 0;
}

.mind-map-center {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--spacing-xl);
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 4px solid var(--sun-gold-1);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    position: relative;
}

.mind-map-center img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mind-map-center span {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 8px;
    background: rgba(26, 15, 5, 0.8);
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-cream);
}

.mind-map-branches {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.mind-branch {
    position: relative;
}

.branch-node {
    background: rgba(193, 154, 107, 0.1);
    border: 1px solid rgba(193, 154, 107, 0.25);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-medium);
}

.branch-node:hover {
    border-color: var(--dune-orange-1);
}

.node-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: var(--spacing-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.node-header:hover {
    background: rgba(230, 126, 34, 0.1);
}

.node-header i:first-child {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dune-orange-1), var(--sun-gold-2));
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    font-size: 1rem;
}

.node-header span {
    flex: 1;
    font-weight: 600;
    color: var(--text-cream);
}

.expand-icon {
    color: var(--sand-light-3);
    transition: transform var(--transition-fast);
}

.mind-branch.expanded .expand-icon {
    transform: rotate(180deg);
}

.node-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-medium);
}

.mind-branch.expanded .node-content {
    max-height: 500px;
}

.node-content-inner {
    padding: 0 var(--spacing-md) var(--spacing-md);
}

.content-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(26, 15, 5, 0.3);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--sand-light-1);
    transition: var(--transition-fast);
}

.content-item:hover {
    background: rgba(230, 126, 34, 0.15);
    transform: translateX(5px);
}

.content-item i {
    color: var(--dune-orange-1);
    font-size: 0.8rem;
}

.content-item:last-child {
    margin-bottom: 0;
}

/* ==========================================
   COUNTRIES SECTION
   ========================================== */
.countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--spacing-md);
}

.country-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: rgba(193, 154, 107, 0.1);
    border: 1px solid rgba(193, 154, 107, 0.2);
    border-radius: var(--radius-md);
    transition: var(--transition-medium);
}

.country-card:hover {
    background: rgba(230, 126, 34, 0.15);
    border-color: var(--dune-orange-1);
    transform: translateY(-3px);
}

.country-card .country-flag {
    width: 40px;
    height: 28px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.country-card .country-name {
    font-weight: 500;
    color: var(--text-cream);
    font-size: 0.95rem;
}

/* ==========================================
   CITIES SECTION
   ========================================== */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.city-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: rgba(193, 154, 107, 0.1);
    border: 1px solid rgba(193, 154, 107, 0.2);
    border-radius: var(--radius-md);
    transition: var(--transition-medium);
}

.city-card:hover {
    background: rgba(230, 126, 34, 0.15);
    border-color: var(--dune-orange-1);
}

.city-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(160, 82, 45, 0.3);
    border-radius: var(--radius-sm);
    color: var(--desert-red-1);
    font-size: 1.1rem;
}

.city-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.city-name {
    font-weight: 600;
    color: var(--text-cream);
}

.city-country {
    font-size: 0.8rem;
    color: var(--sand-light-3);
}

.city-locate {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(193, 154, 107, 0.2);
    border-radius: var(--radius-full);
    color: var(--sun-gold-1);
    transition: var(--transition-fast);
}

.city-locate:hover {
    background: var(--dune-orange-1);
    color: var(--text-dark);
}

/* ==========================================
   FUN FACTS SECTION
   ========================================== */
.fun-facts-carousel {
    position: relative;
    overflow: hidden;
}

.fun-facts-track {
    display: flex;
    transition: transform var(--transition-medium);
}

.fun-fact-card {
    flex: 0 0 100%;
    padding: var(--spacing-xl);
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.15), rgba(193, 154, 107, 0.1));
    border: 1px solid rgba(193, 154, 107, 0.3);
    border-radius: var(--radius-lg);
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.fun-fact-card .fact-icon {
    width: 60px;
    height: 60px;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--sun-gold-1), var(--dune-orange-1));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-dark);
}

.fun-fact-card .fact-text {
    font-size: 1.2rem;
    color: var(--text-cream);
    line-height: 1.6;
    max-width: 600px;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.carousel-btn {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(193, 154, 107, 0.2);
    border: 1px solid rgba(193, 154, 107, 0.3);
    border-radius: var(--radius-full);
    color: var(--sand-light-2);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.carousel-btn:hover {
    background: var(--dune-orange-1);
    border-color: var(--dune-orange-1);
    color: var(--text-dark);
}

.carousel-dots {
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    background: rgba(193, 154, 107, 0.3);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-fast);
}

.carousel-dot:hover {
    background: rgba(193, 154, 107, 0.5);
}

.carousel-dot.active {
    background: var(--sun-gold-1);
    width: 30px;
}

/* ==========================================
   DESERT NAVIGATION
   ========================================== */
.desert-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg) 0;
    border-top: 1px solid rgba(193, 154, 107, 0.2);
}

.nav-desert {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(193, 154, 107, 0.1);
    border: 1px solid rgba(193, 154, 107, 0.2);
    border-radius: var(--radius-md);
    transition: var(--transition-medium);
    flex: 1;
    max-width: 300px;
}

.nav-desert:hover {
    background: rgba(230, 126, 34, 0.2);
    border-color: var(--dune-orange-1);
}

.nav-desert.prev-desert:hover {
    transform: translateX(-5px);
}

.nav-desert.next-desert:hover {
    transform: translateX(5px);
}

.nav-desert.next-desert {
    flex-direction: row-reverse;
    text-align: right;
}

.nav-desert i {
    font-size: 1.2rem;
    color: var(--dune-orange-1);
}

.nav-desert-info {
    display: flex;
    flex-direction: column;
}

.nav-label {
    font-size: 0.75rem;
    color: var(--sand-light-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-name {
    font-weight: 600;
    color: var(--text-cream);
}

.nav-all-deserts {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: var(--spacing-md) var(--spacing-lg);
    background: linear-gradient(135deg, var(--dune-orange-1), var(--sun-gold-2));
    border-radius: var(--radius-md);
    color: var(--text-dark);
    font-weight: 600;
    transition: var(--transition-medium);
}

.nav-all-deserts:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(230, 126, 34, 0.4);
}

/* ==========================================
   IMAGE MODAL
   ========================================== */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 15, 5, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-medium);
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(193, 154, 107, 0.2);
    border-radius: var(--radius-full);
    color: var(--text-cream);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--desert-red-1);
}

#modalImage {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-caption {
    text-align: center;
    padding: var(--spacing-md);
    color: var(--sand-light-2);
    font-size: 0.95rem;
}

/* ==========================================
   LOADING OVERLAY
   ========================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 15, 5, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-medium);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

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

.loading-content p {
    color: var(--sand-light-2);
    margin-top: var(--spacing-md);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 1200px) {
    .stats-panel {
        display: none;
    }
}

@media (max-width: 992px) {
    .header-content {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .logo-section {
        flex: 1 1 100%;
        justify-content: center;
        margin-bottom: var(--spacing-sm);
    }
    
    .desert-title {
        font-size: 3rem;
    }
    
    .hero-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .desert-navigation {
        flex-direction: column;
    }
    
    .nav-desert {
        max-width: 100%;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    :root {
        font-size: 14px;
    }
    
    .main-header {
        padding: var(--spacing-sm);
    }
    
    .logo-text h1 {
        font-size: 1.4rem;
    }
    
    .search-filters-section {
        padding: 0 var(--spacing-sm);
    }
    
    .type-filters {
        width: 100%;
    }
    
    .filter-btn {
        flex: 1;
        justify-content: center;
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    
    .filter-btn span {
        display: none;
    }
    
    .filter-btn i {
        margin: 0;
    }
    
    .main-content {
        padding: 0 var(--spacing-sm) var(--spacing-lg);
    }
    
    .deserts-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: var(--spacing-md);
    }
    
    .profile-nav {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }
    
    .back-btn span {
        display: none;
    }
    
    .control-btn span {
        display: none;
    }
    
    .desert-title {
        font-size: 2.2rem;
    }
    
    .hero-content {
        padding: var(--spacing-md);
        padding-bottom: 80px;
    }
    
    .profile-main {
        padding: var(--spacing-md);
    }
    
    .section-header {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: flex-start;
    }
    
    .section-header h2 {
        font-size: 1.4rem;
    }
    
    .desert-map {
        height: 350px;
    }
    
    .mind-map-branches {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .toggle-label {
        width: 55px;
        height: 28px;
    }
    
    .toggle-ball {
        width: 22px;
        height: 22px;
    }
    
    .toggle-input:checked + .toggle-label .toggle-ball {
        transform: translateX(27px);
    }
    
    .deserts-grid {
        grid-template-columns: 1fr;
    }
    
    .image-wrapper {
        width: 120px;
        height: 120px;
    }
    
    .quick-facts-grid {
        grid-template-columns: 1fr;
    }
    
    .countries-grid {
        grid-template-columns: 1fr;
    }
    
    .fun-fact-card {
        padding: var(--spacing-md);
    }
    
    .fun-fact-card .fact-text {
        font-size: 1rem;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
    .sand-particles,
    .heat-shimmer,
    .sun-glow,
    .night-sky,
    .sandstorm-overlay,
    .day-night-toggle,
    .search-filters-section,
    .scroll-indicator,
    .carousel-controls,
    .desert-navigation,
    footer {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .desert-card {
        break-inside: avoid;
        border: 1px solid #ccc;
    }
}

/* ==========================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .sand-particle,
    .heat-shimmer,
    .sun-glow,
    .star {
        animation: none !important;
    }
}

/* Focus Styles */
a:focus,
button:focus,
input:focus,
select:focus {
    outline: 2px solid var(--sun-gold-1);
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    padding: 8px 16px;
    background: var(--sun-gold-1);
    color: var(--text-dark);
    z-index: 10001;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
}
