:root {
    --surface-background: #FFFFFF;
    --surface-card: #FFFFFF;
    --surface-card-soft: #F1F1EF;
    --surface-card-border: rgba(0, 0, 0, 0.1);
    --text-primary: #373530;
    --text-muted: #787774;
    --accent-primary: #487CA5;
    --accent-secondary: #3A6384;
    --accent-muted: rgba(72, 124, 165, 0.1);
    --radius-xl: 8px;
    --radius-lg: 6px;
    --radius-md: 4px;
    --shadow-soft: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-subtle: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--surface-background);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover,
a:focus-visible {
    color: var(--accent-secondary);
}

main.container,
header.container,
footer.container {
    max-width: min(1120px, calc(100% - 3rem));
    margin-left: auto;
    margin-right: auto;
}

header .nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.75rem;
    margin-top: 2.25rem;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: var(--shadow-subtle);
    backdrop-filter: blur(16px);
    position: relative;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hamburger-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--accent-muted);
    color: var(--accent-primary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hamburger-menu:hover,
.hamburger-menu:focus-visible {
    transform: translateY(-2px);
    background: rgba(37, 99, 235, 0.16);
    box-shadow: 0 16px 36px -24px rgba(37, 99, 235, 0.8);
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.01em;
    color: var(--text-primary);
}

.nav-brand span {
    color: var(--accent-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-actions a,
.nav-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0.55rem 1.2rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-actions a.primary,
.nav-actions button.primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #ffffff;
    box-shadow: 0 20px 50px -35px rgba(37, 99, 235, 0.9);
}

.nav-actions a.secondary,
.nav-actions button.secondary {
    background: transparent;
    border-color: rgba(15, 23, 42, 0.08);
    color: var(--text-primary);
}

.nav-actions a:hover,
.nav-actions button:hover,
.nav-actions a:focus-visible,
.nav-actions button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 45px -30px rgba(15, 23, 42, 0.45);
}

.layout-container {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 2.25rem;
    align-items: flex-start;
    margin-top: 2.75rem;
}

main.container {
    background: rgba(255, 255, 255, 0.92);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(15, 23, 42, 0.05);
    padding: 2.5rem 2.25rem;
    box-shadow: var(--shadow-soft);
}

footer.container {
    margin-top: 3.5rem;
    padding-bottom: 2.5rem;
    text-align: center;
    color: var(--text-muted);
}

.sidebar {
    position: sticky;
    top: 128px;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-xl);
    padding: 1.5rem 1.25rem;
    box-shadow: var(--shadow-subtle);
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sidebar nav a {
    display: grid;
    grid-template-columns: 24px 1fr;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    color: var(--text-primary);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar nav a .sidebar-icon {
    font-size: 1.1rem;
    opacity: 0.85;
}

.sidebar nav a:hover,
.sidebar nav a:focus-visible {
    background: rgba(37, 99, 235, 0.12);
    transform: translateX(4px);
}

.sidebar nav a.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(37, 99, 235, 0.25));
    color: var(--accent-secondary);
}

.sidebar-actions {
    margin-top: 1.5rem;
    display: grid;
    gap: 0.75rem;
}

.sidebar-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.1rem;
    border-radius: 999px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-create {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(29, 78, 216, 0.95));
    color: #ffffff;
    box-shadow: 0 22px 40px -30px rgba(37, 99, 235, 0.9);
}

.btn-create-audio {
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-primary);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.sidebar-actions a:hover,
.sidebar-actions a:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 48px -32px rgba(15, 23, 42, 0.4);
}

.sidebar-column .btn-create {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.9rem 1.1rem;
    border-radius: 999px;
    margin-top: 0.75rem;
}

.tab-content {
    display: none;
}

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

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

.feed-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: var(--shadow-subtle);
}

.feed-tabs .tab-link {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--text-muted);
    padding: 0.45rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.feed-tabs .tab-link.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #ffffff;
    box-shadow: 0 16px 36px -28px rgba(37, 99, 235, 0.95);
}

.feed-tabs .tab-link:hover:not(.active),
.feed-tabs .tab-link:focus-visible:not(.active) {
    background: rgba(37, 99, 235, 0.12);
    color: var(--accent-secondary);
}

.feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.65rem;
}

.feed-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 22px 45px -38px rgba(15, 23, 42, 0.65);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feed-card:hover,
.feed-card:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 45px 80px -60px rgba(15, 23, 42, 0.7);
}

.feed-card-thumb {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--surface-card-soft);
    overflow: hidden;
}

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

.feed-card:hover .feed-card-thumb img,
.feed-card:focus-within .feed-card-thumb img {
    transform: scale(1.05);
}

.feed-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem 1.6rem;
}

.feed-card-title {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.45;
}

.feed-card-title a {
    color: inherit;
}

.feed-card-excerpt {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.feed-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.price-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--accent-secondary);
    font-weight: 600;
    font-size: 0.85rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.65rem;
    padding: 2.25rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px dashed rgba(15, 23, 42, 0.14);
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-muted);
}

.empty-state h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.empty-state p {
    margin: 0;
}

.main-content-area {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 2.25rem;
    align-items: flex-start;
}

.sidebar-column {
    position: sticky;
    top: 128px;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-subtle);
    min-width: 0;
}

.sidebar-widget {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.sidebar-widget h5 {
    margin: 0;
    font-size: 1rem;
}

.sidebar-widget p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.sidebar-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.65rem;
}

.sidebar-widget li a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-widget li a:hover,
.sidebar-widget li a:focus-visible {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-secondary);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(15, 23, 42, 0.08);
    overflow: hidden;
    box-shadow: 0 24px 60px -45px rgba(15, 23, 42, 0.55);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover,
.card:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 48px 90px -70px rgba(15, 23, 42, 0.65);
}

.card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.card .card-body {
    padding: 1.35rem 1.5rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-muted);
}

@media (max-width: 1280px) {
    .layout-container {
        grid-template-columns: minmax(0, 1fr);
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: min(320px, 84vw);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border-radius: 0 24px 24px 0;
        box-shadow: 0 32px 120px -45px rgba(15, 23, 42, 0.75);
        z-index: 1200;
        padding: 2rem 1.75rem 2.5rem;
        background: rgba(255, 255, 255, 0.96);
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    main.container {
        padding: 2.25rem 1.75rem;
    }

    .main-content-area {
        grid-template-columns: minmax(0, 1fr);
    }

    .sidebar-column {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(340px, 90vw);
        transform: translateX(110%);
        transition: transform 0.35s ease;
        border-radius: 24px 0 0 24px;
        z-index: 1150;
        box-shadow: 0 36px 120px -40px rgba(15, 23, 42, 0.75);
    }

    .sidebar-column.is-open {
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    header .nav-shell {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
        padding: 1.25rem 1.5rem;
    }

    .nav-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .feed-tabs {
        width: 100%;
        justify-content: space-between;
    }

    .feed-tabs .tab-link {
        flex: 1 1 0;
        text-align: center;
    }

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

@media (max-width: 520px) {
    main.container,
    header .nav-shell {
        padding: 1.5rem 1.25rem;
    }

    .nav-brand {
        font-size: 1.2rem;
    }

    .nav-actions a,
    .nav-actions button {
        width: 100%;
    }

    .feed-card-body {
        padding: 1.15rem 1.25rem 1.4rem;
    }
}
