/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Enhanced Flag Styles for better rendering */
.flag-icon {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    -ms-interpolation-mode: nearest-neighbor;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Video Background */
.video-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
}

.video-bg video {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    filter: brightness(0.8) contrast(1.1);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.3) 100%
    );
    z-index: -1;
}

/* Main Container */
.main-container {
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2rem;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    width: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    will-change: auto;
}

/* Logo Styles */
.logo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.hero-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}

.hero-logo:hover {
    transform: scale(1.05);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

/* Title Styles */
.hero-title {
    margin-bottom: 1rem;
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: 4px;
    text-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 255, 255, 0.1);
}

.title-line {
    display: block;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

.title-line:nth-child(2) {
    animation-delay: 0.5s;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Search Styles */
.search-container {
    margin-bottom: 3rem;
}

.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

#searchInput {
    width: 100%;
    padding: 20px 70px 20px 30px;
    border: none;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    font-size: 1.1rem;
    font-weight: 500;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    cursor: text;
}

#searchInput:focus {
    outline: none;
    background: rgba(255, 255, 255, 1);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.3),
        0 0 0 2px rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.search-button {
    position: absolute;
    right: 6px;
    top: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 0;
    margin: 0;
}

.search-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.search-button:active {
    transform: scale(0.98);
}

.search-icon {
    color: #ffffff;
    font-size: 1.2rem;
    pointer-events: none;
}

/* No Results Message */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.no-results p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-weight: 500;
}

/* Explore Button */
.explore-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.explore-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.explore-btn:hover::before {
    left: 100%;
}

.explore-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.btn-arrow {
    animation: bounce 2s infinite;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: fadeInUp 1s ease 2s both;
}

.scroll-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: scrollPulse 2s infinite;
}

/* Cities Section */
.cities-section {
    min-height: 100vh;
    padding: 4rem 2rem;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.4) 100%
    );
    backdrop-filter: blur(20px);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
}

/* Cities Grid */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 0 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* City Cards - Enhanced Visual Design with Dark Theme */
.city-card {
    position: relative;
    height: 220px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    perspective: 1000px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards, float 6s ease-in-out infinite;
}

/* Dark Theme Color Variations */
.city-card:nth-child(6n+1) {
    background: linear-gradient(135deg, #2c1810 0%, #1a1a2e 50%, #0f0f23 100%);
    border-left: 3px solid #d4af37;
}

.city-card:nth-child(6n+2) {
    background: linear-gradient(135deg, #1a2332 0%, #16213e 50%, #0f1419 100%);
    border-left: 3px solid #4a9eff;
}

.city-card:nth-child(6n+3) {
    background: linear-gradient(135deg, #1f2937 0%, #374151 50%, #111827 100%);
    border-left: 3px solid #10b981;
}

.city-card:nth-child(6n+4) {
    background: linear-gradient(135deg, #2d1b3d 0%, #1e293b 50%, #0f172a 100%);
    border-left: 3px solid #8b5cf6;
}

.city-card:nth-child(6n+5) {
    background: linear-gradient(135deg, #1e3a2e 0%, #065f46 50%, #064e3b 100%);
    border-left: 3px solid #059669;
}

.city-card:nth-child(6n+6) {
    background: linear-gradient(135deg, #3c1810 0%, #7c2d12 50%, #431407 100%);
    border-left: 3px solid #ea580c;
}

/* Background Pattern */
.card-background-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
}

.city-card:hover {
    transform: translateY(-15px) rotateX(5deg);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(255, 255, 255, 0.1);
}

/* Card Content Layout */
.card-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding: 25px 20px;
    gap: 15px;
}

/* City Icon Container */
.city-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
}

/* Emoji Styling */
.emoji {
    font-size: 2.5rem;
    position: absolute;
    z-index: 3;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: glow 3s ease-in-out infinite alternate;
}

/* FontAwesome Icon Background */
.city-fontawesome {
    position: absolute;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.1);
    z-index: 1;
    transform: scale(1.2);
    transition: all 0.3s ease;
}

.city-card:hover .city-fontawesome {
    color: rgba(255, 255, 255, 0.2);
    transform: scale(1.3) rotate(5deg);
}

/* City Name Enhanced */
.city-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(255, 255, 255, 0.2);
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    margin: 0;
}

.city-card:hover .city-name {
    transform: scale(1.05);
    text-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.6),
        0 0 25px rgba(255, 255, 255, 0.4);
}

/* City Decoration Elements */
.city-decoration {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.decoration-line {
    width: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

.decoration-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.city-card:hover .city-decoration {
    opacity: 1;
}

.city-card:hover .decoration-dot {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    animation: pulse 2s ease-in-out infinite;
}

/* Enhanced Hover Effects */
.card-hover-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg, 
        transparent 30%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0.8s ease;
}

.city-card:hover .card-hover-effect {
    transform: translateX(100%);
}

/* Special Glow Effects for Different Card Types */
.city-card:nth-child(6n+1):hover {
    box-shadow: 
        0 30px 60px rgba(212, 175, 55, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(212, 175, 55, 0.2);
}

.city-card:nth-child(6n+2):hover {
    box-shadow: 
        0 30px 60px rgba(74, 158, 255, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(74, 158, 255, 0.2);
}

.city-card:nth-child(6n+3):hover {
    box-shadow: 
        0 30px 60px rgba(16, 185, 129, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(16, 185, 129, 0.2);
}

.city-card:nth-child(6n+4):hover {
    box-shadow: 
        0 30px 60px rgba(139, 92, 246, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(139, 92, 246, 0.2);
}

.city-card:nth-child(6n+5):hover {
    box-shadow: 
        0 30px 60px rgba(5, 150, 105, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(5, 150, 105, 0.2);
}

.city-card:nth-child(6n+6):hover {
    box-shadow: 
        0 30px 60px rgba(234, 88, 12, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(234, 88, 12, 0.2);
}

/* Animation Keyframes */
@keyframes glow {
    0% { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)); }
    100% { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 20px rgba(255, 255, 255, 0.3)); }
}

.city-card:nth-child(1) { animation-delay: 0.1s, 0s; }
.city-card:nth-child(2) { animation-delay: 0.2s, -2s; }
.city-card:nth-child(3) { animation-delay: 0.3s, -4s; }
.city-card:nth-child(4) { animation-delay: 0.4s, -1s; }
.city-card:nth-child(5) { animation-delay: 0.5s, -3s; }
.city-card:nth-child(6) { animation-delay: 0.6s, -5s; }
.city-card:nth-child(n+7) { animation-delay: 0.7s, 0s; }

/* Animations */
@keyframes cardGlow {
    0% {
        box-shadow: 
            0 25px 50px rgba(0, 0, 0, 0.4),
            0 0 0 2px rgba(255, 255, 255, 0.3),
            0 0 30px rgba(255, 255, 255, 0.1);
    }
    100% {
        box-shadow: 
            0 25px 50px rgba(0, 0, 0, 0.4),
            0 0 0 2px rgba(255, 255, 255, 0.5),
            0 0 50px rgba(255, 255, 255, 0.3);
    }
}

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

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

@keyframes titleGlow {
    0% { text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.1); }
    100% { text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 255, 255, 0.3); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 5;
        max-width: 90%;
        will-change: auto;
    }

    .hero-title {
        font-size: 3rem;
        letter-spacing: 2px;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-logo {
        width: 100px;
        height: 100px;
        padding: 12px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cities-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
        padding: 0 15px;
    }
    
    .city-card {
        height: 150px;
        border-radius: 15px;
    }
    
    .city-name {
        font-size: 1.3rem;
        letter-spacing: 0.5px;
    }
}

@media (max-width: 480px) {
    .hero-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 5;
        max-width: 95%;
        padding: 1rem;
        will-change: auto;
    }

    .hero-section {
        padding: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 1px;
    }
    
    .search-container {
        margin-bottom: 2rem;
    }
    
    #searchInput {
        padding: 15px 60px 15px 20px;
        font-size: 1rem;
    }
    
    .search-button {
        width: 45px;
        height: 45px;
        right: 5px;
        top: 3px;
    }
    
    .search-icon {
        font-size: 1rem;
    }
    
    .explore-btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .cities-section {
        padding: 3rem 0;
    }
    
    .cities-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 10px;
    }
    
    .city-card {
        height: 120px;
        border-radius: 12px;
    }
    
    .city-name {
        font-size: 1.2rem;
    }
    
    .city-card:hover {
        transform: translateY(-5px) rotateX(2deg);
    }
}

/* Smooth Scrolling Enhancement */
html {
    scroll-behavior: smooth;
}

/* Enhanced Focus States for Accessibility */
.city-card:focus {
    outline: 3px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.city-card:focus:not(:hover) {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.25),
        0 0 0 2px rgba(255, 255, 255, 0.3);
}