/**
 * Morning Mutation - Glassmorphism Design System
 * Modern, dark-mode aesthetic with vibrant accents and frosted glass effects.
 */
:root {
    --bg-dark: #13233a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-vibrant: #38bdf8;
    --accent-hover: #0ea5e9;
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-stack: 'Inter', system-ui, sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    background-color: var(--bg-dark);
    /*background-image: radial-gradient(circle at 15% 50%, rgba(56, 189, 248, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08), transparent 25%);*/
    background-image: url("./bg.png");
    background-size: auto 100%;
    background-position: left center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-stack);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    body {
        background-color: var(--bg-dark);
        background-image: radial-gradient(circle at 15% 50%, rgba(56, 189, 248, 0.08), transparent 25%),
            radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08), transparent 25%);
        background-size: unset;
        background-position: unset;
        background-repeat: unset;
        background-attachment: unset;
    }
}

ul {
    margin-left: 20px;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

.app-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .app-container {
        margin: 0 30px 0 auto;
        padding: 2rem;
        gap: 2rem;
    }
}

/* Header & Audio Player */
.sticky-header {
    z-index: 100;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    transition: var(--transition-smooth);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.logo .subtitle {
    display: block;
    font-size: 0.9rem;
    color: var(--accent-vibrant);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

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

@media (min-width: 768px) {
    .audio-player {
        align-items: flex-end;
    }
}

.broadcast-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

audio {
    height: 40px;
    border-radius: 20px;
    outline: none;
    background-color: transparent;
}

audio::-webkit-media-controls-enclosure {
    background-color: rgba(255, 255, 255, 0.1);
}

audio::-webkit-media-controls-play-button,
audio::-webkit-media-controls-mute-button,
audio::-webkit-media-controls-timeline,
audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
    filter: invert(1);
}

/* Grid Layout */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .sticky-header {
        position: sticky;
        top: 2rem;
        padding: 2rem;
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        align-items: center;
    }

    .content-grid {
        grid-template-columns: 300px 1fr;
        align-items: start;
    }

    .weather-widget {
        position: sticky;
        top: 13rem;
        /* Stay below the sticky header */
    }
}

/* Weather Widget */
.weather-widget {
    padding: 1.5rem;
}

.weather-widget h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.weather-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.weather-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.w-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.w-val {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.w-desc {
    font-size: 1rem;
    color: var(--accent-vibrant);
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Extended Forecast */
.extended-forecast {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.extended-forecast h4 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
}

.forecast-day {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

.forecast-day:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(56, 189, 248, 0.3);
}

.f-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.f-temp {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.f-desc {
    font-size: 0.75rem;
    color: var(--accent-vibrant);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* News Feed & Filters */
.news-feed-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.filter-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(30, 41, 59, 0.8);
}

.filter-btn.active {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-vibrant);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.1);
}

.news-feed {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.category-block {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.category-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.category-tag {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--accent-vibrant);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(56, 189, 248, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    border-left: 3px solid var(--accent-vibrant);
}

.news-card {
    padding: 1.5rem;
    transition: var(--transition-smooth);
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: default;
}

.news-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.news-summary {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    white-space: pre-wrap;
}

.article-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
}

.article-links h4 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.article-link {
    color: var(--accent-vibrant);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
}

.article-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.article-link::before {
    content: "→";
    margin-right: 8px;
    opacity: 0.7;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Loading animations */
.feed-loader,
.weather-loader {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}