1/* =====================================================
   HORROR PODCASTS - PUBLIC WEBSITE STYLES
   ===================================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #0a0a0a;
    color: #fff;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* =====================================================
   HEADER
   ===================================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #1a1a1a;
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: #c41e3a;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}

.logo-text {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.nav {
    display: flex;
    gap: 24px;
    flex: 1;
}

.nav a {
    color: #ccc;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav a:hover, .nav a.active {
    color: #fff;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-menu {
    display: none;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: #c41e3a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.dropdown {
    position: relative;
    padding-bottom: 12px;
    margin-bottom: -12px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    min-width: 180px;
    padding: 8px 0;
    display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    height: 16px;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu:hover,
.dropdown.open .dropdown-menu {
    display: block;
}
@media (max-width: 768px) {
    .dropdown:hover .dropdown-menu,
    .dropdown-menu:hover {
        display: none;
    }
    .dropdown.open .dropdown-menu {
        display: block;
    }
}

.dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: #ccc;
    font-size: 13px;
    transition: background 0.2s;
}

.dropdown-menu a:hover {
    background: #2a2a2a;
    color: #fff;
}

.dropdown-divider {
    height: 1px;
    background: #2a2a2a;
    margin: 8px 0;
}

/* =====================================================
   BUTTONS
   ===================================================== */

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.btn-primary {
    background: #c41e3a;
    color: #fff;
}

.btn-primary:hover {
    background: #a01a31;
}

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

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.15);
}

.btn-large {
    padding: 14px 28px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* =====================================================
   CONTAINER
   ===================================================== */

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =====================================================
   HERO SECTION
   ===================================================== */

.hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1a0a0d 0%, #0a0a0a 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(196, 30, 58, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 80px 0;
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(196, 30, 58, 0.2);
    color: #ff5577;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    max-width: 700px;
}

.hero-subtitle {
    font-size: 18px;
    color: #ccc;
    margin-bottom: 32px;
    max-width: 600px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* =====================================================
   SECTIONS
   ===================================================== */

.section {
    padding: 60px 0;
}

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

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
}

.section-link {
    color: #c41e3a;
    font-size: 14px;
    font-weight: 500;
}

.section-link:hover {
    color: #ff5577;
}

/* =====================================================
   STORY CARDS
   ===================================================== */

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.story-card {
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s, background 0.2s;
    cursor: pointer;
}

.story-card:hover {
    transform: translateY(-4px);
    background: #222;
}

.story-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #2a1518, #0a0a0a);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-thumbnail-icon {
    color: rgba(255,255,255,0.3);
    font-size: 48px;
}

.story-format-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 4px;
}

.story-access-badge {
    position: absolute;
    top: 10px;
    left: 10px;
}

.story-info {
    padding: 14px;
}

.story-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    min-height: 38px;
}

.story-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #888;
    flex-wrap: wrap;
}

.story-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #ffc107;
}

/* =====================================================
   BADGES
   ===================================================== */

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-free { background: rgba(46, 125, 50, 0.2); color: #66bb6a; }
.badge-standard { background: rgba(21, 101, 192, 0.2); color: #5b9bd5; }
.badge-premium { background: rgba(106, 27, 154, 0.2); color: #ba68c8; }
.badge-vip { background: rgba(230, 81, 0, 0.2); color: #ffb74d; }

.badge-video { background: rgba(196, 30, 58, 0.3); color: #ff5577; }
.badge-audio { background: rgba(245, 124, 0, 0.3); color: #ffa726; }
.badge-text { background: rgba(249, 168, 37, 0.3); color: #ffd54f; }

/* =====================================================
   AUTH FORMS
   ===================================================== */

.auth-container {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-box {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    border: 1px solid #2a2a2a;
}

.auth-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.auth-subtitle {
    color: #888;
    font-size: 14px;
    margin-bottom: 28px;
    text-align: center;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    color: #ccc;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    transition: border 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #c41e3a;
}

.form-input::placeholder {
    color: #555;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #ccc;
    cursor: pointer;
    margin: 12px 0;
}

.form-checkbox input {
    margin-top: 3px;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #888;
}

.auth-link a {
    color: #c41e3a;
    font-weight: 500;
}

/* =====================================================
   ALERTS
   ===================================================== */

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
}

.alert-error {
    background: rgba(220, 38, 38, 0.15);
    color: #ff6666;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    color: #66ff88;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* =====================================================
   TOAST
   ===================================================== */

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 20px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s;
    max-width: 360px;
}

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

.toast-success { background: #2e7d32; }
.toast-error { background: #c62828; }

/* =====================================================
   LOADING
   ===================================================== */

.spinner {
    border: 3px solid #1a1a1a;
    border-top: 3px solid #c41e3a;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* =====================================================
   FOOTER
   ===================================================== */

.footer {
    background: #080508;
    border-top: 2px solid #c41e3a;
    padding: 56px 0 24px;
    margin-top: 80px;
}
.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
    align-items: start;
}
.footer-about p {
    color: #888;
    font-size: 13px;
    margin-top: 12px;
    max-width: 280px;
    line-height: 1.7;
}
.footer-title {
    color: #c41e3a;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 10px;
}
.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 24px;
    height: 2px;
    background: #c41e3a;
    border-radius: 2px;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 10px;
}
.footer-links a {
    color: #777;
    font-size: 13px;
    transition: all 0.2s;
    display: inline-block;
    text-decoration: none;
}
.footer-links a:hover {
    color: #c41e3a;
    transform: translateX(4px);
}
.footer-bottom {
    border-top: 1px solid #1a1a1a;
    padding-top: 20px;
    text-align: center;
    color: #555;
    font-size: 12px;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

.mobile-menu-toggle, .mobile-search-toggle { display: none; background: transparent; border: none; color: #fff; cursor: pointer; padding: 8px; font-size: 18px; }
.mobile-menu-toggle:hover, .mobile-search-toggle:hover { color: #c41e3a; }

@media (max-width: 768px) {
    .header-inner { position: relative; padding: 12px 16px; gap: 8px; flex-wrap: nowrap; }
    .logo-text { font-size: 14px; }
    .logo img { width: 30px !important; height: 30px !important; }
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #0a0a0a;
        flex-direction: column;
        gap: 0;
        border-top: 1px solid #1a1a1a;
        border-bottom: 1px solid #1a1a1a;
        padding: 8px 0;
        z-index: 99;
    }
    .nav.mobile-open { display: flex; }
    .nav a {
        padding: 14px 20px;
        border-bottom: 1px solid #1a1a1a;
        font-size: 15px;
    }
    .nav a:last-child { border-bottom: none; }
    .mobile-menu-toggle, .mobile-search-toggle { display: block; }
    .header-search {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #0a0a0a;
        padding: 12px 16px;
        border-bottom: 1px solid #1a1a1a;
        z-index: 98;
        width: auto;
        max-width: none;
    }
    .header-search.mobile-open { display: block !important; }
    .header-search input { width: 100%; box-sizing: border-box; }
    .header-search .search-icon { display: none; }
    .header-actions { gap: 4px; flex-shrink: 0; }
    #guestMenu { gap: 4px !important; flex-shrink: 0; }
    #guestMenu .btn { padding: 6px 10px; font-size: 12px; white-space: nowrap; }
    .user-avatar { width: 32px; height: 32px; font-size: 13px; }
    .hero-title { font-size: 32px; }
    .hero-subtitle { font-size: 15px; }
    .stories-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .footer-content { grid-template-columns: 1fr; gap: 24px; }
    .header-inner { padding: 12px 16px; }
    .container { padding: 0 16px; }
    .section { padding: 40px 0; }
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
}
.header-search input {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 20px;
    padding: 8px 36px 8px 16px;
    color: #fff;
    font-size: 13px;
    width: 200px;
    outline: none;
    transition: width 0.3s, border-color 0.2s;
}
.header-search input:focus {
    width: 260px;
    border-color: #c41e3a;
}
.search-icon {
    position: absolute;
    right: 12px;
    font-size: 14px;
    pointer-events: none;
}
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    min-width: 280px;
}
.search-dropdown.show { display: block; }
.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #2a2a2a;
    text-decoration: none;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: #2a2a2a; }
.search-result-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: #2a2a2a;
    object-fit: cover;
    flex-shrink: 0;
}
.search-result-info { flex: 1; overflow: hidden; }
.search-result-title {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-result-meta { color: #888; font-size: 11px; margin-top: 2px; }
.search-no-results { padding: 16px; color: #888; font-size: 13px; text-align: center; }



/* --- FIXES FOR MOBILE VIEW AND LOCKS --- */
@media (max-width: 768px) {
    .header-inner { padding: 10px 8px !important; gap: 8px !important; }
    .logo-text { display: none !important; } 
    .header-search input { width: 130px !important; padding-left: 10px !important; }
    .header-search input:focus { width: 160px !important; }
    .header-actions .btn { padding: 6px 10px !important; font-size: 12px !important; }
    #guestMenu { gap: 4px !important; }
}

.story-access-badge {
    z-index: 50 !important;
}


/* --- NETFLIX LAYOUT STYLES --- */

/* 1. Cinematic Hero Slider */
.cinematic-hero {
    position: relative;
    height: 75vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    transition: background-image 1s ease-in-out;
}
.cinematic-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #0a0a0a 0%, transparent 60%, rgba(10,10,10,0.8) 100%);
    pointer-events: none;
}
.cinematic-content {
    position: relative;
    z-index: 2;
    padding: 0 40px 60px 40px;
    max-width: 800px;
}
.cinematic-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}
@media (max-width: 768px) {
    .cinematic-hero { height: 60vh; }
    .cinematic-content { padding: 0 20px 40px 20px; }
    .cinematic-title { font-size: 36px; }
}

/* 2. Horizontal Scrolling Rows */
.audio-category-section { margin-bottom: 40px; }
.row-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 16px 40px;
    color: #fff;
}
.netflix-row {
    display: flex;
    gap: 16px;
    padding: 0 40px 20px 40px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none; /* Hide scrollbar for IE */
    scrollbar-width: none;    /* Hide scrollbar for Firefox */
}
.netflix-row::-webkit-scrollbar { display: none; /* Hide scrollbar for Chrome */ }
.netflix-row .story-card {
    min-width: 240px;
    max-width: 240px;
    flex-shrink: 0;
}
@media (max-width: 768px) {
    .row-title { margin-left: 16px; }
    .netflix-row { padding: 0 16px 20px 16px; gap: 12px; }
    .netflix-row .story-card { min-width: 160px; max-width: 160px; }
}

/* 3. The Reading Room Grid */
.reading-room-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
}
.reading-room-banner {
    position: sticky;
    top: 100px;
}
.reading-room-banner h2 {
    font-size: 32px;
    color: #ff5577;
}
.text-list-card {
    display: flex;
    gap: 20px;
    background: #150a0d;
    border: 1px solid #2a1518;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: transform 0.2s;
    text-decoration: none;
}
.text-list-card:hover {
    transform: translateX(10px);
    background: #1a0a0d;
}
.text-list-thumb {
    width: 80px;
    height: 120px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    border: 1px solid #333;
}
@media (max-width: 900px) {
    .reading-room-layout { grid-template-columns: 1fr; gap: 24px; }
    .reading-room-banner { position: static; text-align: center; }
}


/* --- FIX STRETCHED THUMBNAILS & TEXT POSTERS --- */
.story-thumbnail {
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-color: #050203 !important; /* Blends nicely with empty space */
}
.text-card .story-thumbnail {
    aspect-ratio: 3/4 !important; /* Makes text stories tall, like book covers! */
}
.load-more-card { min-width: 160px !important; }
@media (min-width: 769px) { .load-more-card { min-width: 240px !important; } }
@media (max-width: 768px) {
    .reading-room-section .container { padding-left: 16px !important; }
    .row-title { margin-left: 16px !important; }
}


/* --- CONTENT PROTECTION --- */
body {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
/* Allow users to still type in login/search boxes */
input, textarea {
    -webkit-user-select: text;
    -ms-user-select: text;
    user-select: text;
}
img {
    -webkit-user-drag: none;
    pointer-events: none;
}
