@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
    --bg: #fafafa;
    --bg-surface: #ffffff;
    --bg-elevated: #f5f5f7;
    --bg-hover: #eef0f2;
    --bg-subtle: #f0f0f3;
    --border: #e5e7eb;
    --border-bright: #d1d5db;
    --border-subtle: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-data: #374151;
    --accent: #6366f1;
    --accent-dim: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.12);
    --accent-subtle: rgba(99, 102, 241, 0.06);
    --coral: #f472b6;
    --coral-subtle: rgba(244, 114, 182, 0.1);
    --green: #10b981;
    --green-subtle: rgba(16, 185, 129, 0.1);
    --amber: #f59e0b;
    --amber-subtle: rgba(245, 158, 11, 0.1);
    --red: #ef4444;
    --red-subtle: rgba(239, 68, 68, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.15);
    --font-ui: "Inter", system-ui, -apple-system, sans-serif;
    --font-data: "JetBrains Mono", "SF Mono", "Courier New", monospace;
    --header-height: 60px;
    --sidebar-width: 240px;
    --transition-fast: 0.12s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0c0c0e;
        --bg-surface: #141416;
        --bg-elevated: #1a1a1e;
        --bg-hover: #222226;
        --bg-subtle: #1e1e22;
        --border: #27272a;
        --border-bright: #3f3f46;
        --border-subtle: #1c1c1f;
        --text-primary: #fafafa;
        --text-secondary: #a1a1aa;
        --text-muted: #71717a;
        --text-data: #d4d4d8;
        --accent: #818cf8;
        --accent-dim: #6366f1;
        --accent-glow: rgba(129, 140, 248, 0.15);
        --accent-subtle: rgba(129, 140, 248, 0.08);
        --coral: #f9a8d4;
        --coral-subtle: rgba(249, 168, 212, 0.1);
        --green: #34d399;
        --green-subtle: rgba(52, 211, 153, 0.1);
        --amber: #fbbf24;
        --amber-subtle: rgba(251, 191, 36, 0.1);
        --red: #f87171;
        --red-subtle: rgba(248, 113, 113, 0.1);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.3);
        --shadow-glow: 0 0 24px rgba(129, 140, 248, 0.2);
    }
}

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

html {
    font-size: 17px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-ui);
    font-size: 0.9375rem;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--accent-dim);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-bright);
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    height: var(--header-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0 1.5rem;
}

.site-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.site-title::before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    transform: rotate(45deg);
}
.site-title:hover {
    color: var(--accent);
}

.header-search {
    flex: 1;
    max-width: 360px;
    position: relative;
}
.header-search::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-4.35-4.35M17 11A6 6 0 1 1 5 11a6 6 0 0 1 12 0z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
}
.header-search input {
    width: 100%;
    padding: 0.5rem 0.875rem 0.5rem 2.25rem;
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-fast);
}
.header-search input::placeholder {
    color: var(--text-muted);
}
.header-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-surface);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}
.header-nav a {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    letter-spacing: -0.01em;
    transition: all var(--transition-fast);
}
.header-nav a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.header-nav a.active {
    background: var(--accent-subtle);
    color: var(--accent);
}

.header-auth {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.45rem 1rem;
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn.disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-dim);
    border-color: var(--accent-dim);
    box-shadow: var(--shadow-glow);
    color: #ffffff;
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border-color: var(--border);
}
.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-bright);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}
.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--red-subtle);
    color: var(--red);
    border-color: var(--red);
}
.btn-danger:hover {
    background: var(--red);
    color: #ffffff;
}

.btn-sm {
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.6rem 1.25rem;
    font-size: 0.875rem;
}

main {
    flex: 1;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.layout-wide,
.layout-wide .container,
.layout-wide main {
    max-width: 1920px;
}

main:has(> .search-page) {
    max-width: 1920px;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: -0.01em;
}
.site-footer a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}
.site-footer a:hover {
    color: var(--text-secondary);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}
.badge::before {
    content: "";
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

.plus-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    margin-left: 0.35rem;
    padding: 0.15rem 0.5rem;
    background: var(--accent-subtle);
    color: var(--accent);
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
    vertical-align: middle;
}

.auth-page {
    max-width: 420px;
    margin: 4rem auto;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.auth-page h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.auth-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
    display: block;
    margin-bottom: 0.35rem;
}

.auth-form input {
    width: 100%;
    padding: 0.6rem 0.875rem;
    font-family: var(--font-ui);
    font-size: 0.9375rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-fast);
}
.auth-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-surface);
}
.auth-form input::placeholder {
    color: var(--text-muted);
}

.auth-form .btn {
    margin-top: 0.5rem;
    width: 100%;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
}

.auth-links {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.8125rem;
    text-align: center;
}

.form-error {
    background: var(--red-subtle);
    border: 1px solid var(--red);
    color: var(--red);
    font-size: 0.8125rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
}

.form-success {
    background: var(--green-subtle);
    border: 1px solid var(--green);
    color: var(--green);
    font-size: 0.8125rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
}

.field-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: -0.5rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.8125rem;
    padding: 0;
    text-decoration: underline;
    font-family: var(--font-ui);
}
.btn-link:hover {
    color: var(--accent-dim);
}

.resend-form {
    margin-bottom: 0.75rem;
}

.profile-page {
    max-width: 680px;
}

.profile-page h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.profile-section {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.profile-section h2 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 380px;
}
.profile-form label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
}
.profile-form input {
    width: 100%;
    padding: 0.55rem 0.875rem;
    font-family: var(--font-ui);
    font-size: 0.9375rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-fast);
}
.profile-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-surface);
}

.profile-current {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}
.profile-description {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    gap: 0.75rem;
}
.empty-state-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-subtle);
    border-radius: var(--radius-lg);
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}
.empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.empty-state p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    max-width: 320px;
    line-height: 1.5;
}

.trending-header {
    margin-bottom: 2rem;
}

.trending-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

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

.trending-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.trending-card:hover {
    border-color: var(--border-bright);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.trending-card--nsfw {
    position: relative;
}

.trending-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--bg-elevated);
    overflow: hidden;
}

.trending-card__cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.trending-card:hover .trending-card__cover {
    transform: scale(1.03);
}

.trending-card__cover--missing {
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-hover));
}

.trending-card__badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.trending-card__badge--nsfw {
    background: var(--red-subtle);
    color: var(--red);
}

.trending-card__body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.trending-card__top {
    min-width: 0;
}

.trending-card__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trending-card__meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trending-card__date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.trending-card__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.trending-card__price-final {
    font-family: var(--font-data);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

.trending-card__delta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--green);
    background: var(--green-subtle);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
}

.trending-card__reviews {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.trending-card__review-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem;
    gap: 1.25rem;
}

.error-page h1 {
    font-family: var(--font-data);
    font-size: 5rem;
    font-weight: 500;
    color: var(--border-bright);
    letter-spacing: -0.04em;
    line-height: 1;
}

.error-page p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 400px;
}

.error-page a {
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent);
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}
.error-page a:hover {
    background: var(--accent-subtle);
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.announcement-banner {
    position: relative;
    z-index: 250;
    border-bottom: 1px solid var(--border);
    background: var(--accent-glow);
    color: var(--text-primary);
    font-size: 0.8125rem;
    line-height: 1.5;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.announcement-banner.is-hidden {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.announcement-banner__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.6rem 1.5rem;
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
}

.announcement-banner__content {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.announcement-banner__text {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.announcement-banner__text strong {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.announcement-banner__sep {
    opacity: 0.5;
    font-weight: 300;
}

.announcement-banner__text span:not(.announcement-banner__sep) {
    opacity: 0.85;
    font-weight: 400;
}

.announcement-banner__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.875rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #ffffff;
    border-color: var(--border);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all var(--transition-fast);
    backdrop-filter: blur(4px);
}

.announcement-banner__cta:hover {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--border-bright);
    transform: translateY(-1px);
}

.announcement-banner__cta svg {
    transition: transform var(--transition-fast);
}

.announcement-banner__cta:hover svg {
    transform: translateX(2px);
}

.subscription-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.plan-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.plan-free {
    background: #e5e7eb;
    color: #374151;
}
.plan-beta {
    background: #dbeafe;
    color: #1e40af;
}
.plan-plus {
    background: #d1fae5;
    color: #065f46;
}
.plan-pro {
    background: #fef3c7;
    color: #92400e;
}

.subscription-details {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0.5rem 1rem;
    margin: 0;
}

.subscription-details dt {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.subscription-details dd {
    margin: 0;
    font-weight: 500;
}

.subscription-notice {
    grid-column: 1 / -1;
    color: var(--amber);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .site-header {
        padding: 0 1rem;
        z-index: 250;
        gap: 0.75rem;
    }

    .header-search {
        max-width: none;
        flex: 1;
    }

    .header-search input {
        padding-left: 2rem;
        font-size: 0.875rem;
    }

    .header-nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: var(--bg-elevated);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        cursor: pointer;
        flex-shrink: 0;
        color: var(--text-secondary);
    }

    .menu-toggle svg {
        width: 18px;
        height: 18px;
    }

    #menu-checkbox {
        display: none;
    }

    .mobile-drawer {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-surface);
        border-top: 1px solid var(--border);
        padding: 1rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 300;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    #menu-checkbox:checked ~ .mobile-drawer {
        transform: translateX(0);
    }

    .mobile-drawer a {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
        font-weight: 500;
        color: var(--text-primary);
        border-radius: var(--radius-md);
        text-decoration: none;
        transition: background var(--transition-fast);
    }

    .mobile-drawer a:hover {
        background: var(--bg-hover);
    }

    .mobile-drawer a.active {
        background: var(--accent-subtle);
        color: var(--accent);
    }

    .mobile-drawer .mobile-divider {
        height: 1px;
        background: var(--border);
        margin: 0.5rem 0;
    }

    .mobile-drawer .mobile-auth {
        margin-top: auto;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .mobile-drawer .mobile-auth .btn {
        width: 100%;
        justify-content: center;
    }

    .mobile-overlay {
        position: fixed;
        inset: var(--header-height) 0 0 0;
        background: rgba(0,0,0,0.3);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 299;
    }

    #menu-checkbox:checked ~ .mobile-overlay {
        opacity: 1;
        pointer-events: all;
    }

    .header-auth {
        display: none;
    }

    main {
        padding: 1.25rem 1rem;
    }

    .trending-grid {
        grid-template-columns: 1fr;
    }

    .auth-page {
        margin: 2rem auto;
        padding: 1.5rem;
    }
}

@media (min-width: 769px) {
    .menu-toggle,
    .mobile-drawer,
    .mobile-overlay,
    #menu-checkbox {
        display: none !important;
    }
}

.drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: auto;
    margin-bottom: 0.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
