/*
 * OnlyTens - Main Stylesheet
 * Phase 9: Design Refresh
 */

/* ============================================
   1. CSS Variables (Light & Dark Themes)
   ============================================ */

:root {
    /* Light Theme Colors */
    --background: 330 40% 98%;
    --foreground: 330 30% 20%;
    --card: 0 0% 100%;
    --card-foreground: 330 30% 20%;
    --popover: 0 0% 100%;
    --popover-foreground: 330 30% 20%;
    --primary: 330 60% 65%;
    --primary-foreground: 0 0% 100%;
    --secondary: 330 30% 95%;
    --secondary-foreground: 330 30% 20%;
    --muted: 330 25% 94%;
    --muted-foreground: 330 15% 50%;
    --accent: 340 70% 88%;
    --accent-foreground: 330 30% 20%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 100%;
    --border: 330 30% 90%;
    --input: 330 30% 90%;
    --ring: 330 60% 65%;
    --radius: 0.75rem;
    --lace-pink: 340 70% 85%;
    --lace-rose: 330 60% 75%;
    --border-image: url("../img/lace-border.bf5faf26feac.gif");
}

.dark {
    /* Dark Theme Colors */
    --background: 250 45% 12%;
    --foreground: 270 20% 95%;
    --card: 250 40% 15%;
    --card-foreground: 270 20% 95%;
    --popover: 250 40% 15%;
    --popover-foreground: 270 20% 95%;
    --primary: 270 70% 65%;
    --primary-foreground: 0 0% 100%;
    --secondary: 250 35% 20%;
    --secondary-foreground: 270 20% 95%;
    --muted: 250 35% 22%;
    --muted-foreground: 260 15% 65%;
    --accent: 270 60% 35%;
    --accent-foreground: 270 20% 95%;
    --destructive: 0 62.8% 50%;
    --destructive-foreground: 0 0% 100%;
    --border: 250 35% 25%;
    --input: 250 35% 25%;
    --ring: 270 70% 65%;
    --lace-pink: 270 60% 45%;
    --lace-rose: 260 50% 55%;
    --border-image: url("../img/lace-border-dark.00f1991bc16a.gif");
}

/* ============================================
   2. Reset & Base Styles
   ============================================ */

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

html {
    font-size: 16px;
    scroll-padding-top: 90px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: hsl(var(--foreground));
    background: hsl(var(--background));
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   3. Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: hsl(var(--foreground));
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: hsl(var(--lace-rose));
}

/* ============================================
   4. Layout System
   ============================================ */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.grid-auto-fill {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* ============================================
   5. Components - Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
    background: hsl(var(--lace-rose));
    color: hsl(var(--primary-foreground));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px hsla(var(--primary), 0.3);
}

.btn-secondary {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover {
    background: hsl(var(--muted));
    color: hsl(var(--foreground));
}

.payment-option-btn {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.payment-option-btn:hover:not(:disabled) {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px hsla(var(--primary), 0.3);
}

.payment-option-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-ghost {
    background: transparent;
    color: hsl(var(--foreground));
    border: 1px solid hsl(var(--border));
}

.btn-ghost:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.btn-destructive {
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}

.btn-destructive:hover {
    background: hsl(var(--destructive) / 0.9);
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1.1rem;
}

.btn-icon {
    padding: 0.625rem;
    aspect-ratio: 1;
}

/* ============================================
   6. Components - Cards
   ============================================ */

.card {
    background: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    box-shadow: 0 2px 8px hsla(var(--foreground), 0.05);
    overflow: hidden;
}

.card-interactive {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.card-interactive:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px hsla(var(--foreground), 0.1);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background: hsl(var(--muted));
    border-top: 1px solid hsl(var(--border));
}

/* Work Card - Special styling for catalog cards */
.work-card {
    background: hsl(var(--card));
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.work-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px hsla(var(--primary), 0.15);
    border-color: hsl(var(--primary) / 0.3);
}

.work-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--lace-rose)) 100%);
    overflow: hidden;
}

.work-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-card-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.work-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: hsl(var(--card-foreground));
}

.work-card-description {
    color: hsl(var(--muted-foreground));
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    margin-top: auto;
    border-top: 1px solid hsl(var(--border));
}

/* ============================================
   7. Components - Badges
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: calc(var(--radius) * 0.8);
    line-height: 1.2;
    white-space: nowrap;
}

.badge-primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.badge-secondary {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.badge-muted {
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    border: 1px solid hsl(var(--border));
}

.badge-success {
    background: hsl(142 71% 45%);
    color: hsl(0 0% 100%);
}

.badge-warning {
    background: hsl(45 93% 47%);
    color: hsl(0 0% 100%);
}

.badge-destructive {
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}

/* Badge positions for cards */
.badge-top-left {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
}

.badge-top-right {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.badge-bottom-left {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
}

.badge-bottom-right {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
}

/* ============================================
   8. Components - Forms
   ============================================ */

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: hsl(var(--foreground));
}

.form-input,
.form-select,
.form-textarea,
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: hsl(var(--foreground));
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px hsla(var(--foreground), 0.05);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="number"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: hsl(var(--ring));
    background: hsl(var(--card));
    box-shadow: 0 0 0 3px hsla(var(--ring), 0.1), 0 2px 4px hsla(var(--foreground), 0.1);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover,
.form-group input[type="text"]:hover,
.form-group input[type="email"]:hover,
.form-group input[type="password"]:hover,
.form-group input[type="date"]:hover,
.form-group input[type="number"]:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: hsl(var(--ring) / 0.5);
}

.form-input::placeholder {
    color: hsl(var(--muted-foreground));
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-helptext {
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.25rem;
    display: block;
}

.form-error,
.errorlist {
    list-style: none;
    color: hsl(var(--destructive));
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.errorlist li {
    margin-bottom: 0.25rem;
}

/* Search Input - Special styling */
.search-input {
    position: relative;
}

.search-input input {
    padding-left: 2.5rem;
}

.search-input .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    opacity: 0.5;
    pointer-events: none;
}

/* ============================================
   9. Components - Messages
   ============================================ */

.messages {
    margin: 1.5rem 0;
}

.message {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    border: 2px solid;
    display: flex;
    align-items: start;
    gap: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.message-success {
    background: hsl(142 71% 95%);
    border-color: hsl(142 71% 45%);
    color: hsl(142 71% 20%);
}

.message-error {
    background: hsl(0 84.2% 95%);
    border-color: hsl(0 84.2% 60.2%);
    color: hsl(0 84.2% 25%);
}

.message-warning {
    background: hsl(45 93% 95%);
    border-color: hsl(45 93% 47%);
    color: hsl(45 93% 20%);
}

.message-info {
    background: hsl(199 89% 95%);
    border-color: hsl(199 89% 48%);
    color: hsl(199 89% 20%);
}

.dark .message-success {
    background: hsl(142 71% 15%);
    color: hsl(142 71% 85%);
}

.dark .message-error {
    background: hsl(0 84.2% 15%);
    color: hsl(0 84.2% 85%);
}

.dark .message-warning {
    background: hsl(45 93% 15%);
    color: hsl(45 93% 85%);
}

.dark .message-info {
    background: hsl(199 89% 15%);
    color: hsl(199 89% 85%);
}

/* ============================================
   10. Header & Navigation
   ============================================ */

.site-header {
    background: hsl(var(--card));
    background-clip: padding-box;
    border-bottom: 7px solid transparent;
    border-image: var(--border-image) 7 repeat;
    border-image-slice: 7;
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    gap: 2rem;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(var(--primary));
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-logo:hover {
    color: hsl(var(--lace-rose));
}

.site-logo-icon {
    color: hsl(var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Desktop Navigation */
.nav-links {
    display: none;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover {
    color: hsl(var(--primary));
    border-bottom-color: hsl(var(--primary));
}

.nav-links a.active {
    color: hsl(var(--primary));
    border-bottom-color: hsl(var(--primary));
}

/* User Info in Nav */
.nav-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.credit-badge {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9rem;
}

.credit-badge:hover {
    background: hsl(var(--lace-rose));
    color: hsl(var(--primary-foreground));
}

.user-menu {
    position: relative;
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.user-avatar:hover {
    background: hsl(var(--lace-rose));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
    transform: scale(1.05);
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: 0 4px 16px hsla(var(--foreground), 0.15);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 100;
    overflow: hidden;
}

.user-menu-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    display: block;
    padding: 0.75rem 1rem;
    color: hsl(var(--foreground));
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s ease;
    border-bottom: 1px solid hsl(var(--border));
}

.user-menu-item:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.user-menu-item-form {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid hsl(var(--border));
}

.user-menu-dropdown > *:last-child,
.user-menu-dropdown > *:last-child.user-menu-item-form {
    border-bottom: none;
}

.user-menu-button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    color: hsl(var(--foreground));
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease;
}

.user-menu-button:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

/* ── Notification Bell ──────────────────────────────────────────────────── */
.notif-bell {
    position: relative;
}
.notif-bell-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    color: hsl(var(--foreground));
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s;
}
.notif-bell-btn:hover {
    background: hsl(var(--muted));
}
.notif-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 1.1rem;
    height: 1.1rem;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.2rem;
    line-height: 1;
}
.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 22rem;
    max-width: calc(100vw - 2rem);
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 200;
    overflow: hidden;
}
.notif-dropdown.active {
    display: block;
}
.notif-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid hsl(var(--border));
    font-size: 0.9rem;
}
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: hsl(var(--foreground));
    border-bottom: 1px solid hsl(var(--border));
    transition: background 0.15s;
    font-size: 0.875rem;
}
.notif-item:last-of-type {
    border-bottom: none;
}
.notif-item:hover {
    background: hsl(var(--muted));
}
.notif-item-unread {
    background: hsl(var(--primary) / 0.06);
}
.notif-item-unread:hover {
    background: hsl(var(--primary) / 0.1);
}
.notif-item-icon {
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: hsl(var(--primary));
}
.notif-item-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}
.notif-item-text {
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.notif-item-time {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}
.notif-dropdown-footer {
    display: block;
    text-align: center;
    padding: 0.625rem;
    font-size: 0.85rem;
    color: hsl(var(--primary));
    text-decoration: none;
    border-top: 1px solid hsl(var(--border));
    transition: background 0.15s;
}
.notif-dropdown-footer:hover {
    background: hsl(var(--muted));
}

/* Theme Toggle Button */
.theme-toggle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.25rem;
    position: relative;
}

.theme-toggle:hover {
    background: hsl(var(--accent));
    border-color: hsl(var(--primary));
}

.theme-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: absolute;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.theme-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Show moon in light mode, hide sun */
.theme-icon-sun {
    opacity: 0;
    transform: rotate(90deg);
}

.theme-icon-moon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Show moon in dark mode, hide sun */
.dark .theme-icon-sun {
    opacity: 1;
    transform: rotate(0deg);
}

.dark .theme-icon-moon {
    opacity: 0;
    transform: rotate(90deg);
}

/* Mobile Menu Toggle (Hamburger) */
.mobile-menu-toggle {
    display: flex;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.5rem;
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.mobile-menu-toggle:hover {
    background: hsl(var(--accent));
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: hsl(var(--card));
    z-index: 100;
    display: none;
    flex-direction: column;
    padding: 2rem;
    overflow-y: auto;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.mobile-menu-close {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
}

.mobile-menu-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-menu-links a {
    display: block;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    text-decoration: none;
    border-radius: var(--radius);
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-menu-links a:hover,
.mobile-menu-links a.active {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

/* ============================================
   11. Footer
   ============================================ */

.site-footer {
    background: hsl(var(--card));
    border-top: 1px solid hsl(var(--border));
    margin-top: 4rem;
    padding: 2rem 0;
    text-align: center;
}

.site-footer p {
    color: hsl(var(--muted-foreground));
    font-size: 0.9rem;
    margin: 0;
}

/* ============================================
   12. Main Content
   ============================================ */

main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* ============================================
   13. Sidebar Filter Panel (Desktop)
   ============================================ */

.filter-sidebar {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 5.5rem;
}

.filter-section {
    margin-bottom: 1.5rem;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: hsl(var(--foreground));
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: hsl(var(--primary));
}

.filter-option label {
    font-size: 0.9rem;
    cursor: pointer;
    color: hsl(var(--foreground));
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-tag {
    padding: 0.2rem 0.5rem;
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) * 0.4);
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.filter-tag:hover {
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.filter-tag-active {
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.filter-tag-active:hover {
    background: hsl(var(--primary) / 0.8);
    border-color: hsl(var(--primary) / 0.8);
    color: hsl(var(--primary-foreground));
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    background: hsl(var(--primary) / 0.12);
    color: hsl(var(--primary));
    border: 1px solid hsl(var(--primary) / 0.35);
    border-radius: calc(var(--radius) * 0.4);
    font-size: 0.78rem;
    text-decoration: none;
    transition: all 0.15s ease;
}

.active-filter-chip:hover {
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

/* ============================================
   14. Mobile Filter Drawer
   ============================================ */

.filter-toggle-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border: none;
    box-shadow: 0 4px 16px hsla(var(--primary), 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 40;
    transition: all 0.2s ease;
    font-size: 1.5rem;
}

@media (min-width: 768px) {
    .filter-toggle-btn {
        display: none;
    }
}

.filter-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px hsla(var(--primary), 0.5);
}

.filter-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: hsl(var(--card));
    border-top: 1px solid hsl(var(--border));
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 1.5rem;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 50;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 24px hsla(var(--foreground), 0.1);
}

.filter-drawer.active {
    transform: translateY(0);
}

.filter-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.filter-drawer-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.filter-drawer-close {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: none;
    background: hsl(var(--secondary));
    color: hsl(var(--foreground));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
}

.filter-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: hsla(var(--foreground), 0.5);
    z-index: 45;
    display: none;
}

.filter-drawer-overlay.active {
    display: block;
}

/* ============================================
   15. Responsive Grid Layouts
   ============================================ */

.browse-layout {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .browse-layout {
        grid-template-columns: 250px 1fr;
    }
}

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

@media (max-width: 640px) {
    .works-grid {
        grid-template-columns: 1fr;
    }
}

/* Search Form Grid Layout */
.search-form-grid {
    display: grid;
    grid-template-columns: 1fr 180px auto;
    gap: 1rem;
}

@media (max-width: 767px) {
    .search-form-grid {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
    }
    
    .search-form-grid .search-input {
        grid-column: 1 / -1;
        grid-row: 1;
    }
    
    .search-form-grid .form-select {
        grid-column: 1;
        grid-row: 2;
    }
    
    .search-form-grid .btn {
        grid-column: 2;
        grid-row: 2;
    }
}

/* ============================================
   16. Utility Classes
   ============================================ */

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

@media (max-width: 767px) {
    .hidden-mobile {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .hidden-desktop {
        display: none !important;
    }
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.font-bold {
    font-weight: 600;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-muted {
    color: hsl(var(--muted-foreground));
}

.text-primary {
    color: hsl(var(--primary));
}

.bg-muted {
    background: hsl(var(--muted));
}

.bg-accent {
    background: hsl(var(--accent));
}

.rounded {
    border-radius: var(--radius);
}

.rounded-full {
    border-radius: 9999px;
}

.shadow-sm {
    box-shadow: 0 1px 2px hsla(var(--foreground), 0.05);
}

.shadow {
    box-shadow: 0 2px 8px hsla(var(--foreground), 0.1);
}

.shadow-lg {
    box-shadow: 0 4px 16px hsla(var(--foreground), 0.15);
}

/* Decorative Border - Lace Pattern */
.lace-border {
    background-clip: padding-box;
    border: 7px solid transparent;
    border-image: var(--border-image) 7 repeat;
    border-image-slice: 7;
}

/* ============================================
   18. Homepage — State-aware layouts
   ============================================ */

/* Hero: anonymous landing page */
.home-hero {
    background: linear-gradient(
        135deg,
        hsl(var(--lace-pink) / 0.45) 0%,
        hsl(var(--primary) / 0.12) 50%,
        hsl(var(--lace-rose) / 0.35) 100%
    );
    border-bottom: 1px solid hsl(var(--border));
    padding: 5rem 1.5rem 4rem;
    text-align: center;
    margin: 0 -1rem -1px;
}

@media (min-width: 768px) {
    .home-hero {
        margin: 0 -1.5rem -1px;
        padding: 6rem 3rem 5rem;
    }
}

.home-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    background: hsl(var(--primary) / 0.12);
    border: 1px solid hsl(var(--primary) / 0.3);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    color: hsl(var(--primary));
    letter-spacing: 0.04em;
    margin-bottom: 1.75rem;
}

.home-hero-title {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: hsl(var(--foreground));
}

.home-hero-sub {
    font-size: 1.15rem;
    color: hsl(var(--muted-foreground));
    max-width: 520px;
    margin: 0 auto 2.25rem;
    line-height: 1.6;
}

.home-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Section row: icon + title + optional "see all" link */
.home-section {
    margin: 3rem 0 0;
}

.home-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.home-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0;
    color: hsl(var(--foreground));
}

.home-section-title i {
    color: hsl(var(--primary));
}

/* Upgrade band: subscription upsell for free users */
.home-upgrade-band {
    margin: 3rem 0 0;
    padding: 2rem;
    background: linear-gradient(
        120deg,
        hsl(var(--primary) / 0.08) 0%,
        hsl(var(--accent) / 0.15) 100%
    );
    border-radius: var(--radius);
    border: 1px solid hsl(var(--primary) / 0.2);
    text-align: center;
}

.home-upgrade-band h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.home-upgrade-band p {
    color: hsl(var(--muted-foreground));
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.home-upgrade-perks {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

.home-upgrade-perk {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
}

/* Value props strip */
.home-value-props {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0 0;
}

.home-value-prop {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.75rem 1.25rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    gap: 0.75rem;
}

.home-value-prop i {
    color: hsl(var(--primary));
}

.home-value-prop h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.home-value-prop p {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin: 0;
    line-height: 1.5;
}

/* Welcome strip for free/subscriber users */
.home-welcome-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.home-welcome-strip h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.2rem;
}

/* Horizontal scroll row for Continue Watching */
.home-scroll-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.home-scroll-item {
    flex: 0 0 280px;
    scroll-snap-align: start;
}

/* ============================================
   17. Animations
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-up {
    animation: slideUp 0.3s ease;
}

.pulse {
    animation: pulse 2s infinite;
}

/* ============================================
   18. Lightbox Styles
   ============================================ */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: none;
    cursor: pointer;
    overflow: hidden;
}

.lightbox-overlay.active {
    display: block;
}

.lightbox-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    cursor: default;
    position: relative;
    overflow: hidden;
    touch-action: none;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-image.zoomed {
    cursor: grab;
    transition: transform 0.1s ease-out;
}

.lightbox-image.zoomed:active {
    cursor: grabbing;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid #fff;
    color: #fff;
    font-size: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100001;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.lightbox-close:hover,
.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.lightbox-close {
    top: 1rem;
    right: 1rem;
}

.lightbox-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-counter {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 100001;
    pointer-events: none;
}

@media (max-width: 768px) {
    .lightbox-content {
        padding: 2rem 1rem;
    }
    
    .lightbox-image {
        max-width: 95vw;
        max-height: 85vh;
    }
    
    .lightbox-close,
    .lightbox-nav {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.5rem;
    }
    
    .lightbox-prev {
        left: 0.5rem;
    }
    
    .lightbox-next {
        right: 0.5rem;
    }
}

/* ============================================
   19. Print Styles
   ============================================ */

@media print {
    .site-header,
    .site-footer,
    .filter-sidebar,
    .filter-toggle-btn,
    .mobile-menu-toggle,
    .theme-toggle,
    #lightbox {
        display: none !important;
    }
}

