@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --primary: #00f2fe;
    --secondary: #4facfe;
    --accent: #e50914; /* Netflix Red */
    --bg-dark: #0a0b12; /* Disney+ deep blue-black */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f9f9f9;
    --text-muted: #a0aec0;
    --card-hover: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

/* Base Body Styles */
body {
    background: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    /* Added text-shadow for better readability on varied backgrounds */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Dynamic Fancy Backgrounds */
body.city-page {
    background-size: 100% auto;
    background-repeat: no-repeat;
    background-attachment: scroll;
    transition: background-image 1.5s ease-in-out;
    background-blend-mode: overlay;
    background-color: var(--bg-dark); /* Solid dark background for city pages */
}

body.city-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, transparent, rgba(0, 0, 0, 0.4));
    z-index: -1;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: linear-gradient(to bottom, rgba(10, 11, 18, 0.9) 0%, transparent 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: all 0.5s ease;
}

nav.scrolled {
    background: var(--bg-dark);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

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

/* Hero Section */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    padding: 6rem 8% 2rem;
    background: radial-gradient(circle at 70% 50%, rgba(79, 172, 254, 0.15), transparent 60%),
                linear-gradient(to top, var(--bg-dark) 0%, transparent 50%),
                linear-gradient(to right, var(--bg-dark) 0%, transparent 60%);
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15vh;
    background: linear-gradient(to top, var(--bg-dark), transparent);
    z-index: 2;
}

.hero h1 {
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1.2rem;
    animation: fadeInUp 1s ease forwards;
    letter-spacing: -2px;
    z-index: 3;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-main);
    max-width: 550px;
    margin-bottom: 2.5rem;
    animation: fadeInUp 1s ease forwards 0.3s;
    opacity: 0.8;
    line-height: 1.4;
    z-index: 3;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin-top: 2rem;
    position: relative;
    z-index: 10;
    animation: fadeInUp 1s ease forwards 0.6s;
    opacity: 0;
}

/* Tab buttons in hero */
.hero-btns .tab-btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hero-btns .tab-btn.secondary {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.hero-btns .tab-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Destination Cards */
.destinations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 8% 4rem;
}

.destinations::-webkit-scrollbar {
    display: none;
}

.card {
    aspect-ratio: 16/9;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0;
    text-align: left;
    transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
    text-decoration: none;
    color: var(--text-main);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.card .card-content {
    position: absolute;
    inset: 0;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 100%);
    opacity: 0.85;
    transition: all 0.4s ease;
    z-index: 2;
}

.card:hover {
    transform: scale(1.06);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9);
    z-index: 10;
}

.card:hover .card-content {
    opacity: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: normal;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-img {
    filter: brightness(0.6);
}


/* Page Specific Content */
.page-header {
    padding: 8rem 5% 4rem;
    text-align: center;
}

.page-header h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 1rem;
    font-weight: 800;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.content-section {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto 4rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.content-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Tabs for Japan Page */
.tabs-container {
    margin-top: 2rem;
}

.tabs-header {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--bg-dark);
    border-color: transparent;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.image-placeholder {
    width: 100%;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--glass-border);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* In a real app, add a hamburger menu */
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .page-header h1 {
        font-size: 3rem;
    }

    .content-section {
        padding: 1.5rem;
    }

    /* Mobile First Adjustments for Cards */
    .cg-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .cg-card {
        padding: 1.25rem !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    }

    .cg-header h3 {
        font-size: 1.1rem !important;
    }

    .directions-btn {
        width: 100%;
        display: block;
        text-align: center;
        padding: 10px 0;
        background: rgba(0, 242, 254, 0.1);
        border-radius: 8px;
        margin-top: 10px;
    }

    /* Fix background visibility on mobile */
    body.city-page {
        background-attachment: scroll !important;
        background-size: 100% auto !important;
        background-position: center top 80px !important;
    }

    /* Trending Now Mobile Tweaks */
    .destinations {
        gap: 1rem;
        padding: 0.5rem 5% 3rem;
    }

    .card {
        flex: 0 0 85vw; /* Almost full width but showing the next card edge */
    }

    .card h3 {
        font-size: 1.2rem;
    }

    .card p {
        font-size: 0.75rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2; /* Standard property for compatibility */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* Language Switcher */
.lang-switcher select {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.lang-switcher select option {
    background: var(--bg-dark);
    color: var(--text-main);
}

.new-feature {
    color: var(--accent) !important;
}

/* Congestion Dashboard */
.congestion-dashboard {
    background: transparent;
    border: none;
    padding: 0;
}

.search-bar {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.search-bar input {
    width: 100%;
    max-width: 500px;
    padding: 1rem 1.5rem;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-main);
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-bar input:focus {
    border-color: var(--primary);
}

.cg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.cg-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.8rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.cg-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: 0.5s;
}

.cg-card:hover::after {
    left: 100%;
}

.cg-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 15px 45px rgba(0, 242, 254, 0.2);
    background: rgba(255, 255, 255, 0.06);
}

.cg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cg-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.cg-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
}

.cg-badge.relax {
    background: rgba(0, 255, 128, 0.2);
    color: #00ff80;
}

.cg-badge.normal {
    background: rgba(255, 255, 0, 0.2);
    color: #ffff00;
}

.cg-badge.crowded {
    background: rgba(255, 128, 0, 0.2);
    color: #ff8000;
}
/* Brand Tiles (Disney+ Style) */
.brand-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 0 8%;
    margin-top: -50px; /* Overlap with hero slightly */
    position: relative;
    z-index: 10;
}

.brand-tile {
    position: relative;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-decoration: none;
}

.brand-tile:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 25px 40px rgba(0, 0, 0, 0.8);
}

.brand-bg {
    position: absolute;
    inset: 0;
    background-size: 60%;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.8;
    transition: transform 0.3s ease;
}

.brand-tile:hover .brand-bg {
    transform: scale(1.1);
    opacity: 1;
}

.brand-name {
    position: absolute;
    bottom: 10%;
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 0.9rem;
    color: var(--text-main);
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.section-title {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Animations and Responsive */
@media (max-width: 768px) {
    .hero {
        padding-top: 8rem;
        min-height: 60vh;
    }
    
    .brand-tiles {
        grid-template-columns: 1fr;
        margin-top: 2rem;
    }
    
    .destinations {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .card {
        width: 100%;
    }

    .card h3 {
        font-size: clamp(1.1rem, 5vw, 1.4rem);
    }

    .card p {
        font-size: 0.8rem;
        line-clamp: 2;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

.cg-badge.severe {
    background: rgba(255, 0, 0, 0.2);
    color: #ff3333;
}

.cg-msg {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.loading,
.no-results {
    text-align: center;
    grid-column: 1 / -1;
    color: var(--text-muted);
    font-size: 1.2rem;
    padding: 3rem;
}

.directions-btn {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.directions-btn:hover {
    color: var(--secondary);
}

/* OTT Detail Page Header */
.content-hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center; /* Center content horizontally */
    padding: 8rem 8% 4rem;
    background-size: 80% auto; /* Make branding graphic a centerpiece */
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    text-align: center; /* Center text */
}

.content-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, transparent 20%, var(--bg-dark) 90%),
                linear-gradient(to top, var(--bg-dark) 10%, transparent 40%);
    z-index: 1;
}

.hero-content-left {
    max-width: 800px;
    z-index: 5;
    position: relative;
}

.content-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    font-weight: 600;
}

.meta-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-desc {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-main);
    opacity: 0.9;
    margin: 0 auto 2rem; /* Center description */
}

.weather-pill {
    display: inline-flex;
    background: var(--glass-bg);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-size: 1rem;
    border: 1px solid var(--glass-border);
    margin-top: 1rem;
    backdrop-filter: blur(10px);
}