/* Discovery Experience CSS (§9.3) - Premium streaming UX */

/* ============================================================================
   Signup Bonus Banner (logged-out users)
   ============================================================================ */
.signup-bonus-banner {
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 0.5rem 1rem;
    position: relative;
    z-index: 10;
}

.signup-bonus-banner .banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    max-width: 1200px;
    margin: 0 auto;
}

.signup-bonus-banner .banner-icon {
    font-size: 1rem;
    color: #fff;
}

.signup-bonus-banner .banner-text {
    color: #fff;
    font-size: 0.85rem;
}

.signup-bonus-banner .btn {
    padding: 0.35rem 1rem;
    font-size: 0.8rem;
    background: #fff;
    color: var(--primary);
    font-weight: 600;
    border-radius: 4px;
}

.signup-bonus-banner .btn:hover {
    background: rgba(255,255,255,0.9);
}

.signup-bonus-banner .banner-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.signup-bonus-banner .banner-close:hover {
    color: #fff;
}

.signup-bonus-banner.hidden {
    display: none;
}

@media (max-width: 600px) {
    .signup-bonus-banner .banner-text {
        font-size: 0.75rem;
    }
    .signup-bonus-banner .btn {
        padding: 0.3rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* ============================================================================
   Skeleton & Loading States (§9.3.3.3)
   ============================================================================ */
/* Shimmer animation and skeleton utilities now in main.css */

/* ============================================================================
   Browse Page Layout
   ============================================================================ */
.discovery-browse {
    max-width: 1400px;
    margin: 0 auto;
}

.browse-search-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bg);
    padding: 1rem 0;
    margin-bottom: 1rem;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(174, 140, 252, 0.1);
}

.search-input-wrap i {
    color: var(--text-muted);
}

.search-input-wrap input {
    flex: 1;
    border: none;
    background: none;
    color: var(--text);
    font-size: 1rem;
    outline: none;
}

.search-input-wrap input::placeholder {
    color: var(--text-muted);
}

.clear-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
}

.clear-btn:hover {
    color: var(--text);
}

/* ============================================================================
   Filters (§9.3.7.3)
   ============================================================================ */
.browse-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

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

.filter-chip {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.875rem;
}

.filter-chip:hover {
    background: var(--bg-hover);
    color: var(--text);
    transform: translateY(-1px);
}

.filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(174, 140, 252, 0.25);
}

.filter-dropdowns {
    display: flex;
    gap: 0.75rem;
}

.filter-select {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Active filters display */
.active-filters {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.active-filters-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

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

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    border-radius: 12px;
    color: white;
    font-size: 0.8rem;
}

.active-filter-tag button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    opacity: 0.8;
}

.active-filter-tag button:hover {
    opacity: 1;
}

.clear-filters-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.875rem;
    text-decoration: underline;
}

.clear-filters-btn:hover {
    color: var(--text);
}

/* ============================================================================
   Tags Row
   ============================================================================ */
.browse-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.browse-tags::-webkit-scrollbar {
    height: 4px;
}

.browse-tags::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

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

.tag-skeleton {
    width: 80px;
    height: 32px;
    border-radius: 16px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.tag-chip:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.tag-chip.active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
}

.tag-count {
    opacity: 0.7;
    font-size: 0.75rem;
}

/* ============================================================================
   Results Info
   ============================================================================ */
.browse-results-info {
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ============================================================================
   Stories Grid
   ============================================================================ */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* ============================================================================
   Story Card (§9.3.6)
   ============================================================================ */
.story-card {
    background: var(--bg-card2);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.story-card:focus-within {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.story-card.skeleton {
    pointer-events: none;
}

.story-card-cover {
    aspect-ratio: 16/9;
    background: var(--bg);
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
}

.story-card:hover .story-card-cover {
    filter: brightness(1.1);
}

/* Hover Quick Actions (§9.3.6.6) */
.story-card-hover-actions {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.story-card:hover .story-card-hover-actions {
    opacity: 1;
}

.hover-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    min-width: 140px;
    justify-content: center;
}

.hover-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.hover-start-btn {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.hover-start-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.story-card-badges {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

/* Badges (§9.3.6.2, §9.3.6.3) */
.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-rating {
    background: rgba(0, 0, 0, 0.7);
    color: white;
}

.badge-pg { background: var(--success); color: white; }
.badge-pg-13 { background: #f97316; color: white; }
.badge-mature { background: #ef4444; color: white; }
/* Legacy badge classes */
.badge-everyone { background: var(--success); color: white; }
.badge-teen { background: #f97316; color: white; }

.badge-access {
    background: rgba(0, 0, 0, 0.7);
    color: white;
}

.badge-free {
    background: var(--success);
    color: white;
}

.badge-credits, .badge-metered {
    background: var(--secondary);
    color: white;
}

 .badge-unlimited {
     background: linear-gradient(135deg, #7c3aed, #db2777);
     color: white;
 }

/* Moonshot Badges (§9.3.6.4) */
.badge-moonshot {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.moonshot-icons {
    display: inline-flex;
    gap: 0.25rem;
    margin-left: 0.25rem;
}

.moonshot-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 0.65rem;
    color: white;
    cursor: help;
}

.moonshot-icon:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Rating Tooltip (§9.3.6.3) */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: none;
    white-space: nowrap;
    z-index: 100;
    margin-top: 4px;
    color: var(--text-muted);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Credits Warning State (§9.3.6.5) */
.story-card.credits-locked {
    opacity: 0.85;
}

.story-card.credits-locked .story-card-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
}

.credits-warning {
    color: var(--warning);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-warning {
    background: var(--warning);
    color: black;
    border-color: var(--warning);
}

.btn-warning:hover {
    background: #f59e0b;
}

.story-card-body {
    padding: 1rem;
}

.story-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-card-creator {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.story-card-creator a {
    color: var(--primary);
}

.story-card-creator a:hover {
    text-decoration: underline;
}

/* Progress bar for continue cards (§9.9.5) */
.card-progress-container {
    margin-bottom: 0.5rem;
}

.card-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.card-progress-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-progress-percent {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
}

.card-progress-track {
    height: 4px;
    background: var(--bg);
    border-radius: 2px;
    overflow: hidden;
}

.card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    transition: width 0.3s ease;
}

.story-card-tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.story-card-price {
    font-size: 0.8rem;
    color: var(--secondary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.story-card-actions {
    display: flex;
    gap: 0.5rem;
}

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

/* ============================================================================
   Empty State (§9.3.7.4)
   ============================================================================ */
.browse-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.browse-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.browse-empty h3 {
    color: var(--text);
    margin-bottom: 0.5rem;
}

.browse-empty p {
    margin-bottom: 1.5rem;
}

.fallback-recs {
    margin-top: 3rem;
    text-align: left;
}

.fallback-recs h4 {
    color: var(--text);
    margin-bottom: 1rem;
}

.fallback-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

/* Fallback Recommendation Cards (§9.3.7.4) */
.fallback-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.fallback-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: var(--primary);
}

.fallback-cover {
    aspect-ratio: 16/9;
    background: var(--bg);
    background-size: cover;
    background-position: center;
}

.fallback-info {
    padding: 0.75rem;
}

.fallback-info h5 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fallback-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* ============================================================================
   Load More
   ============================================================================ */
.browse-load-more {
    text-align: center;
    padding: 2rem 0;
}

/* ============================================================================
   Login Modal - Discovery-specific styles
   ============================================================================ */
/* Base modal styles now in main.css */

/* Modal benefits line (§9.2.4) */
.modal-benefits-line {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.75rem !important;
}

.modal-metered-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-sm);
    padding: 0.625rem 1rem;
    color: var(--warning);
    font-size: 0.85rem;
    margin-bottom: 1rem !important;
}

.modal-metered-note i {
    color: var(--warning);
}

/* ============================================================================
   Hero Carousel (§9.3.4)
   ============================================================================ */
.hero-carousel {
    position: relative;
    margin-bottom: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.hero-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.hero-slide {
    min-width: 100%;
    aspect-ratio: 21/9;
    position: relative;
    background-size: cover;
    background-position: center;
}

.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.1) 100%);
}

.hero-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: .5rem;
    z-index: 1;
}

.hero-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.hero-logline {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    max-height: 220px;
    overflow-y: auto;
    line-height: 1.5;
}

.hero-logline::-webkit-scrollbar {
    width: 4px;
}

.hero-logline::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.hero-creator {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.hero-creator a {
    color: var(--primary);
}

.hero-pricing {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.hero-pricing .credits-estimate {
    color: var(--secondary);
}

.hero-pricing .balance-pill {
    background: var(--bg);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

.hero-pricing .low-credits {
    color: var(--warning);
}

/* Balance Pill (§9.3.4.1) */
.balance-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg);
    padding: 0.35rem 0.85rem;
    border-radius: 16px;
    font-size: 0.85rem;
    margin-left: 1rem;
}

.balance-pill.balance-low {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.low-credits-warning {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--warning);
    font-size: 0.85rem;
    margin-left: 0.75rem;
    animation: pulse 2s infinite;
}

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

/* Glow Button Effect */
.btn-glow {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.btn-glow:hover {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
}

/* Hero Overlay Enhancement */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 40%, rgba(0,0,0,0.2) 100%);
    border: 1px solid var(--border2);
}

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

.hero-meta {
    display: inline;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 1rem;
}

.hero-meta i {
    margin: 0 0.25rem;
    color: var(--accent-pink);
}

.hero-meta a {
    color: var(--primary);
}

.hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hero-stats i {
    color: var(--accent-pink);
}

.hero-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background 0.2s;
}

.hero-dot.active {
    background: white;
}

.hero-skeleton {
    aspect-ratio: 21/9;
    background: var(--bg-card);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}

.hero-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
}

/* ============================================================================
   Content Rails (§9.3.5)
   ============================================================================ */
.discovery-section {
    margin-bottom: 2.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-link {
    color: var(--primary);
    font-size: 0.875rem;
}

.section-link:hover {
    text-decoration: underline;
}

.content-rail {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.content-rail::-webkit-scrollbar {
    height: 6px;
}

.content-rail::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.content-rail::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.rail-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
}

.rail-skeleton {
    display: flex;
    gap: 1rem;
}

.rail-skeleton .story-card {
    flex: 0 0 280px;
}

/* ============================================================================
   Continue Rail (§9.3.5.1)
   ============================================================================ */
.continue-card {
    position: relative;
}

.continue-card .progress-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.continue-card .last-played {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* World Time Badge (§9.3.5.1 Moonshot) */
.world-time-badge {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    background: rgba(0, 0, 0, 0.8);
    color: var(--secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Party Badge (§9.3.5.1 Moonshot) */
.party-badge {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* ============================================================================
   Responsive
   ============================================================================ */
@media (max-width: 992px) {
    .hero-content {
        right: 20%;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .stories-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .browse-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-dropdowns {
        justify-content: space-between;
    }
    
    .hero-content {
        right: 0;
        padding: 1.5rem;
    }
    
    .hero-title {
        font-size: 1.25rem;
    }
    
    .hero-logline {
        display: none;
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
    }
    
    .fallback-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

/* ============================================================================
   Story Detail Page (§9.4)
   ============================================================================ */
.story-detail { max-width: 1200px; margin: 0 auto; }

.detail-hero-skeleton { aspect-ratio: 21/9; border-radius: var(--radius); margin-bottom: 2rem; }

.detail-hero {
    aspect-ratio: 21/9;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius);
    position: relative;
    margin-bottom: 2rem;
    background-color: var(--bg-card);
    overflow: hidden;
}

/* Progressive image loading blur (§9.4.3.1) */
.detail-hero-blur {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(20px);
    transform: scale(1.1);
    opacity: 0;
    transition: opacity 0.3s;
}

.detail-hero-blur.loading { opacity: 1; }
.detail-hero-blur.loaded { opacity: 0; }

/* Fallback placeholder (§9.4.3.1) */
.detail-hero-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.fallback-initials {
    font-size: 4rem;
    font-weight: 700;
    color: white;
    opacity: 0.5;
}

.detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.1) 100%);
    border-radius: var(--radius);
}

.detail-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    z-index: 1;
}

.detail-badges { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.detail-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.detail-subtitle { font-size: 1rem; color: var(--text-muted); margin-bottom: 0.25rem; font-style: italic; }
.detail-tagline { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 0.5rem; max-width: 600px; }
.detail-creator { color: var(--text-muted); }
.detail-creator a { color: var(--primary); }
.detail-creator a:hover { text-decoration: underline; }

.detail-body { display: grid; grid-template-columns: 1fr 360px; gap: 2rem; }

/* Content Safety Block (§9.4.3.4) */
.detail-content-safety {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.detail-content-safety h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text);
}

.detail-content-safety h3 i { color: var(--success); }

.safety-rating {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.rating-badge-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.25rem;
}

.rating-badge-large.rating-everyone { background: var(--success); color: white; }
.rating-badge-large.rating-teen { background: #3b82f6; color: white; }
.rating-badge-large.rating-mature { background: var(--warning); color: black; }
.rating-badge-large.rating-pg { background: var(--success); color: white; }
.rating-badge-large.rating-pg-13 { background: #f97316; color: white; }

.rating-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.reason-chip {
    padding: 0.35rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

.boundaries-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.boundaries-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.boundary-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--success);
}

.boundary-item i { font-size: 0.75rem; }

/* Collapsible description (§9.4.3.5) */
.detail-description-wrapper { margin-bottom: 2rem; }
.detail-description { color: var(--text-muted); line-height: 1.7; }
.detail-description-full { color: var(--text-muted); line-height: 1.7; }

.read-more-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    margin-top: 0.5rem;
}

.read-more-btn:hover { text-decoration: underline; }

/* Tags (§9.4.3.6) */
.detail-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.detail-tag {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.detail-tag:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

.detail-tags-overflow { margin-bottom: 2rem; }

.tags-more-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
}

.tags-more-btn:hover { text-decoration: underline; }

/* Pricing Block (§9.4.4) */
.detail-pricing {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.detail-pricing h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.detail-pricing h3 i { color: var(--secondary); }

.pricing-access-badge { margin-bottom: 0.75rem; }

.pricing-explanation {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.pricing-explanation strong { color: var(--text); }

.pricing-breakdown { display: flex; flex-direction: column; gap: 0.75rem; }
.pricing-row { display: flex; justify-content: space-between; font-size: 0.9rem; }
.pricing-row.total { border-top: 1px solid var(--border); padding-top: 0.75rem; font-weight: 600; }
.pricing-label { color: var(--text-muted); }
.pricing-free { color: var(--success); font-weight: 600; }

/* Moonshot Features (§9.4.8) */
.detail-moonshot {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.detail-moonshot h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--secondary);
}

.moonshot-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.moonshot-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text);
}

.moonshot-feature i { color: var(--secondary); }

.moonshot-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* World Info */
.detail-world { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 2rem; }
.detail-world h3 { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; font-size: 1rem; }
.world-info { color: var(--text-muted); font-size: 0.9rem; }

/* Sidebar */
.detail-sidebar { }

/* CTA Block (§9.4.5) */
.detail-cta-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Resume Context (§9.4.5.2) */
.resume-context {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}

.resume-snippet {
    font-size: 0.9rem;
    color: var(--text);
    font-style: italic;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.resume-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.detail-actions { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; }
.btn-large { padding: 1rem 1.5rem; font-size: 1rem; }

.btn-resume {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Balance Display (§9.4.4.3) */
.detail-balance {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-display { display: flex; align-items: center; gap: 0.5rem; }
.balance-label { font-size: 0.8rem; color: var(--text-muted); }
.balance-value { font-weight: 600; }
.balance-low { color: var(--warning); }

.balance-warning-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warning);
    animation: pulse 2s infinite;
}

/* Insufficient Credits (§9.4.6) */
.insufficient-credits {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
}

.insufficient-msg {
    font-size: 0.9rem;
    color: var(--warning);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-warning {
    background: var(--warning);
    color: black;
    border-color: var(--warning);
}

.btn-warning:hover {
    background: #f59e0b;
}

.progress-saved-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.75rem;
}

.progress-saved-note i {
    margin-right: 0.35rem;
    color: var(--success);
}

/* Stats */
.detail-stats { display: flex; gap: 1.5rem; margin-bottom: 1.5rem; padding: 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.stat-item { text-align: center; flex: 1; }
.stat-value { display: block; font-size: 1.25rem; font-weight: 700; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }

/* Creator Card (§9.4.3.3) */
.creator-mini-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.creator-mini-avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); flex-shrink: 0; }
.creator-mini-info { flex: 1; min-width: 0; }
.creator-mini-name { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.creator-mini-stories { font-size: 0.8rem; color: var(--text-muted); }

/* More from Creator Rail (§9.4.2) */
.more-from-creator {
    margin-bottom: 1.5rem;
}

.more-from-creator h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.creator-stories-rail {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.creator-story-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s;
}

.creator-story-card:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.creator-story-cover {
    width: 48px;
    height: 32px;
    border-radius: 4px;
    background: var(--bg);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.creator-story-title {
    font-size: 0.85rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Trust Tools (§9.4.9) */
.detail-trust-tools {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.trust-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.trust-btn:hover { color: var(--text); }

.trust-dropdown { position: relative; }

.trust-dropdown-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

.trust-dropdown-toggle:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.trust-dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 180px;
    z-index: 100;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    font-size: 0.9rem;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--bg-hover);
}

.dropdown-item i { color: var(--text-muted); }

/* Report Modal */
.report-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.report-reasons { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.report-reason { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.report-reason:hover { border-color: var(--primary); }
.report-reason.selected { border-color: var(--primary); background: rgba(139, 92, 246, 0.1); }
.report-reason input { display: none; }

#report-explanation { width: 100%; padding: 0.75rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); resize: vertical; min-height: 80px; margin-bottom: 1rem; }

/* Login Modal Benefits (§9.4.7) */
.modal-benefits {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.modal-benefits span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.modal-benefits i { color: var(--success); }

/* Metered Confirmation Modal (§9.4.5.3) */
.metered-modal-details {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}

.metered-estimate, .metered-balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.metered-estimate { border-bottom: 1px solid var(--border); }

.metered-label { color: var(--text-muted); font-size: 0.9rem; }
.metered-value { font-weight: 600; }

.metered-reassurance {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.metered-reassurance i { color: var(--primary); }

.dont-show-again {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    margin-top: 1rem;
}

.dont-show-again input { cursor: pointer; }

/* Block Modal */
.modal-icon-warning { color: var(--warning); }

.btn-danger {
    background: var(--error);
    border-color: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Responsive */
@media (max-width: 992px) {
    .detail-body { grid-template-columns: 1fr; }
    .detail-title { font-size: 1.75rem; }
    .detail-cta-block { order: -1; }
}

@media (max-width: 768px) {
    .detail-hero { aspect-ratio: 4/3; }
    .detail-hero-content { padding: 1.5rem; }
    .detail-title { font-size: 1.5rem; }
    .safety-rating { flex-direction: column; align-items: flex-start; }
}

/* ============================================================================
   Toast Notifications (§9.11.4.4)
   ============================================================================ */
.toast-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.toast-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast-success { border-color: var(--success); }
.toast-success i { color: var(--success); }
.toast-error { border-color: var(--error); }
.toast-error i { color: var(--error); }
.toast-warning { border-color: var(--warning); }
.toast-warning i { color: var(--warning); }
.toast-info i { color: var(--primary); }

/* ============================================================================
   Discovery Home Page (§9.3)
   ============================================================================ */
.discovery-home {
    max-width: 1400px;
    margin: 0 auto;
}

.tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tags-skeleton {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.genre-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.genre-tag:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.genre-tag i {
    color: var(--primary);
}

.browse-all-cta {
    text-align: center;
    padding: 2rem 0 1rem;
}

/* ============================================================================
   Lazy Loading Images (§9.3.10)
   ============================================================================ */
.lazy-image {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-hover) 50%, var(--bg-card) 100%);
    background-size: 200% 200%;
    animation: lazy-placeholder 2s ease infinite;
}

@keyframes lazy-placeholder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.lazy-image.lazy-loaded {
    animation: none;
    background-size: cover;
    background-position: center;
}

/* ============================================================================
   §25.10.1 Story Trailer Sections
   ============================================================================ */

/* Hook teaser */
.detail-hook {
    margin-bottom: 1.5rem;
}

.hook-text {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text);
    border-left: 3px solid var(--primary);
    padding: 0.75rem 1.25rem;
    margin: 0;
    background: rgba(174, 140, 252, 0.05);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
}

/* Canon rules highlights */
.detail-canon-rules {
    margin-bottom: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.detail-canon-rules h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}

.detail-canon-rules h3 i {
    color: var(--primary);
}

.canon-rules-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.canon-rule-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.canon-rule-item i {
    color: var(--primary);
    margin-top: 0.15rem;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.canon-rule-boundary i {
    color: var(--success);
}

.canon-mode-badge {
    margin-top: 0.25rem;
}

.canon-mode-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.canon-mode-locked {
    background: rgba(174, 140, 252, 0.15);
    color: var(--primary);
    border: 1px solid rgba(174, 140, 252, 0.3);
}

.canon-mode-remix {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Screenshots gallery */
.detail-screenshots {
    margin-bottom: 1.5rem;
}

.detail-screenshots h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}

.detail-screenshots h3 i {
    color: var(--primary);
}

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

.screenshot-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.screenshot-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.screenshot-item img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.screenshot-caption {
    display: block;
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-card);
}

@media (max-width: 600px) {
    .screenshots-gallery {
        grid-template-columns: 1fr;
    }

    .hook-text {
        font-size: 1rem;
    }
}

/* ============================================================================
   Utility
   ============================================================================ */
.hidden {
    display: none !important;
}

/* Screen reader only - visually hidden but accessible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
