:root {
    --bg-main: #f8fafc;
    --bg-sidebar: #ffffff;
    --accent: #19d3db;
    /* TuneIn Teal */
    --accent-dark: #12a5ac;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --sidebar-width: 260px;
    --player-height: 90px;
    --header-height: 64px;
    --tunein-gradient: linear-gradient(135deg, #19d3db 0%, #1572d3 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
}

/* Layout */
.app-container {
    display: grid;
    grid-template-areas:
        "header header"
        "sidebar main"
        "player player";
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: var(--header-height) 1fr var(--player-height);
    height: 100vh;
}

/* Header / Top Nav */
.top-nav {
    grid-area: header;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 100;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.5rem;
    color: #1572d3;
    text-decoration: none;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-auth {
    display: flex;
    gap: 1rem;
}

.btn-signin {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.btn-signup {
    background: var(--text-primary);
    color: white;
    text-decoration: none;
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Sidebar */
.sidebar {
    grid-area: sidebar;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 1.5rem;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section h4 {
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-item:hover {
    background-color: #f1f5f9;
    color: var(--text-primary);
}

.nav-item.active {
    background-color: #f1f5f9;
    color: var(--tunein-teal);
    font-weight: 600;
}

/* Main Content */
.main-content {
    grid-area: main;
    overflow-y: auto;
    background: white;
}

/* Hero Section */
.hero {
    background: var(--tunein-gradient);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    color: white;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 2rem;
}

.hero-btn {
    background: white;
    color: var(--text-primary);
    padding: 0.75rem 2rem;
    border-radius: 0.25rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 3rem;
}

.hero-search-container {
    background: white;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    padding: 0.5rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    margin: 0 auto;
}

.hero-search-container input {
    width: 100%;
    border: none;
    padding: 0.75rem;
    font-size: 1.25rem;
    outline: none;
    color: var(--text-primary);
}

.hero-search-container i {
    color: var(--text-secondary);
}

/* Floating Logos in Background */
.floating-logos {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.4;
    pointer-events: none;
}

.float-logo {
    position: absolute;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 0.5rem;
    transform: rotate(15deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Content Area */
.content-inner {
    padding: 2.5rem;
}

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

.section-header h2 {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Grid */
.station-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
}

.station-card {
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s;
}

.station-card:hover {
    transform: translateY(-5px);
}

.station-logo-container {
    width: 100%;
    aspect-ratio: 1;
    background: #f1f5f9;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-secondary);
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.station-card h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.station-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Player Bar */
.player-bar {
    grid-area: player;
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 2rem;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 300px;
}

.player-logo {
    width: 48px;
    height: 48px;
    background: #f1f5f9;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
}

.player-meta h4 {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.player-meta p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.player-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.control-btns {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-play {
    width: 44px;
    height: 44px;
    background: #1e293b;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: scale 0.2s;
}

.btn-play:hover {
    scale: 1.1;
}

.btn-control {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

.player-progress {
    width: 100%;
    max-width: 400px;
    height: 4px;
    background: #f1f5f9;
    border-radius: 2px;
    position: relative;
}

.progress-active {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #1e293b;
    width: 0%;
}

.player-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 300px;
    justify-content: flex-end;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume-slider {
    width: 80px;
}

/* Animations */
.animate-fade {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Mobile Navigation & responsiveness */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

@media (max-width: 1024px) {
    .app-container {
        grid-template-areas:
            "header"
            "main"
            "player";
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        bottom: var(--player-height);
        width: 80%;
        max-width: 300px;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: 10px 0 20px rgba(0, 0, 0, 0.1);
    }

    .sidebar.open {
        left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        /* Hide top links on mobile, they are in the sidebar or menu */
    }

    .player-actions {
        display: none;
        /* Hide extra actions on mobile to save space */
    }

    .player-info {
        width: 60%;
    }

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

    .station-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .content-inner {
        padding: 1rem;
    }
}

@media (max-width: 640px) {
    .nav-auth {
        display: none;
    }

    .player-info {
        width: 70%;
    }

    .player-controls .player-progress {
        display: none;
    }
}