/*
Theme Name: Horrorstuck Dark
Theme URI: https://horrorstuck.com
Author: Horrorstuck Team
Author URI: https://horrorstuck.com
Description: A premium, ultra-fast, atmospheric dark WordPress theme engineered specifically for horror fiction, creepypastas, true crime, paranormal lore, and horror media reviews. Features blood-crimson accents, eerie glassmorphism, ambient audio integration, voice story narrator, and custom story reader mode.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: dark, horror, blog, news, creepypasta, custom-menu, featured-images, sticky-post, responsive-layout
Text Domain: horrorstuck
*/

/* ==========================================================================
   1. DESIGN SYSTEM & TOKENS
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Creepster&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Colors */
  --hs-bg-void: #050507;
  --hs-bg-surface: #0b0b10;
  --hs-bg-card: #12121a;
  --hs-bg-card-hover: #181824;
  --hs-glass-bg: rgba(18, 18, 26, 0.75);
  --hs-glass-border: rgba(230, 0, 38, 0.18);
  
  --hs-red: #e60026;
  --hs-red-bright: #ff1a3d;
  --hs-red-glow: rgba(230, 0, 38, 0.35);
  --hs-red-deep: #4a000c;

  --hs-toxic: #00ff66;
  --hs-ember: #ff9900;
  --hs-purple: #9d4edd;
  
  --hs-text: #f0f0f5;
  --hs-text-muted: #9494a3;
  --hs-text-dim: #5c5c6b;
  
  --hs-border: rgba(255, 255, 255, 0.07);
  --hs-border-active: rgba(230, 0, 38, 0.5);

  /* Fonts */
  --font-heading: 'Cinzel', serif;
  --font-body: 'Inter', sans-serif;
  --font-creepy: 'Creepster', display;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing & Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   2. GLOBAL RESETS & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--hs-bg-void);
  color: var(--hs-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--hs-bg-void);
  color: var(--hs-text);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Eerie Fog Layer Overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    radial-gradient(circle at 15% 20%, rgba(230, 0, 38, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(157, 78, 221, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--hs-red-bright);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #ffffff;
  text-shadow: 0 0 8px var(--hs-red-glow);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: #ffffff;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

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

/* Container */
.hs-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   3. HEADER & NAVIGATION
   ========================================================================== */
.hs-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(5, 5, 7, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hs-glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
}

.hs-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.hs-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.hs-brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--hs-red), var(--hs-red-deep));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--hs-red-glow);
  font-size: 20px;
  animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 10px rgba(230, 0, 38, 0.4); }
  100% { box-shadow: 0 0 25px rgba(230, 0, 38, 0.8), 0 0 40px rgba(230, 0, 38, 0.4); }
}

.hs-brand-text {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #ffffff;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ffffff 40%, var(--hs-red-bright) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hs-nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.hs-nav-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--hs-text-muted);
  transition: all var(--transition-fast);
  padding: 8px 0;
  position: relative;
}

.hs-nav-link:hover, .hs-nav-link.active {
  color: #ffffff;
}

.hs-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; width: 0; height: 2px;
  background: var(--hs-red);
  box-shadow: 0 0 8px var(--hs-red-glow);
  transition: width var(--transition-fast);
}

.hs-nav-link:hover::after, .hs-nav-link.active::after {
  width: 100%;
}

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

.hs-audio-btn {
  background: rgba(230, 0, 38, 0.1);
  border: 1px solid rgba(230, 0, 38, 0.3);
  color: var(--hs-red-bright);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.hs-audio-btn:hover {
  background: var(--hs-red);
  color: #ffffff;
  box-shadow: 0 0 15px var(--hs-red-glow);
}

.hs-audio-btn.playing .hs-sound-wave span {
  animation: soundBar 1s infinite ease-in-out alternate;
}

.hs-sound-wave {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.hs-sound-wave span {
  width: 3px;
  height: 100%;
  background: currentColor;
  border-radius: 2px;
}

@keyframes soundBar {
  0% { height: 20%; }
  100% { height: 100%; }
}

/* ==========================================================================
   4. HERO & FEATURED SECTION
   ========================================================================== */
.hs-hero {
  padding: 40px 0 60px;
}

.hs-hero-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 28px;
}

@media (max-width: 992px) {
  .hs-hero-grid {
    grid-template-columns: 1fr;
  }
}

.hs-hero-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--hs-bg-card);
  border: 1px solid var(--hs-glass-border);
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth);
}

.hs-hero-card:hover {
  transform: translateY(-4px);
  border-color: rgba(230, 0, 38, 0.6);
}

.hs-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55) contrast(1.15);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s;
  z-index: 0;
}

.hs-hero-card:hover .hs-hero-bg {
  transform: scale(1.05);
  filter: brightness(0.65) contrast(1.2);
}

.hs-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,5,7,0) 20%, rgba(5,5,7,0.92) 80%, rgba(5,5,7,1) 100%);
  z-index: 1;
}

.hs-hero-content {
  position: relative;
  z-index: 2;
}

.hs-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}

.hs-badge-red {
  background: var(--hs-red);
  color: #ffffff;
  box-shadow: 0 0 12px var(--hs-red-glow);
}

.hs-badge-toxic {
  background: var(--hs-toxic);
  color: #000000;
}

.hs-hero-title {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 900;
  margin-bottom: 14px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.hs-hero-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: var(--hs-text-muted);
  font-family: var(--font-mono);
}

/* Secondary Hero Cards */
.hs-hero-sub-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hs-sub-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--hs-bg-card);
  border: 1px solid var(--hs-border);
  padding: 24px;
  height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: all var(--transition-fast);
}

.hs-sub-card:hover {
  border-color: var(--hs-red);
  box-shadow: 0 6px 20px rgba(230, 0, 38, 0.2);
}

.hs-sub-card .hs-hero-bg {
  filter: brightness(0.45);
}

.hs-sub-card .hs-hero-title {
  font-size: 18px;
}

/* ==========================================================================
   5. MAIN FEED & SIDEBAR GRID
   ========================================================================== */
.hs-main-layout {
  display: grid;
  grid-template-columns: 2.3fr 1fr;
  gap: 40px;
  padding: 40px 0 80px;
}

@media (max-width: 992px) {
  .hs-main-layout {
    grid-template-columns: 1fr;
  }
}

.hs-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--hs-border);
  padding-bottom: 12px;
}

.hs-section-title {
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hs-section-title::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 24px;
  background: var(--hs-red);
  box-shadow: 0 0 10px var(--hs-red-glow);
  border-radius: 2px;
}

/* Post Cards */
.hs-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.hs-post-card {
  background: var(--hs-bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--hs-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}

.hs-post-card:hover {
  transform: translateY(-5px);
  border-color: rgba(230, 0, 38, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(230, 0, 38, 0.15);
}

.hs-post-thumb {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.hs-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hs-post-card:hover .hs-post-thumb img {
  transform: scale(1.08);
}

.hs-post-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.hs-post-title {
  font-size: 19px;
  font-weight: 700;
  margin: 10px 0 12px;
  line-height: 1.35;
}

.hs-post-title a {
  color: #ffffff;
}

.hs-post-title a:hover {
  color: var(--hs-red-bright);
}

.hs-post-excerpt {
  color: var(--hs-text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hs-post-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--hs-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--hs-text-dim);
  font-family: var(--font-mono);
}

/* Sidebar Widgets */
.hs-sidebar {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.hs-widget {
  background: var(--hs-bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--hs-glass-border);
  padding: 28px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.hs-widget-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hs-border);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hs-recent-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  list-style: none;
}

.hs-recent-item {
  display: flex;
  gap: 14px;
  align-items: center;
}

.hs-recent-img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--hs-border);
}

.hs-recent-info h4 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.hs-recent-info h4 a {
  color: var(--hs-text);
}

.hs-recent-info span {
  font-size: 11px;
  color: var(--hs-text-dim);
  font-family: var(--font-mono);
}

/* Newsletter Coven Box */
.hs-coven-box {
  background: linear-gradient(135deg, rgba(230, 0, 38, 0.15) 0%, rgba(11, 11, 16, 0.95) 100%);
  border: 1px solid var(--hs-red);
  text-align: center;
}

.hs-coven-box h3 {
  font-family: var(--font-creepy);
  font-size: 32px;
  color: var(--hs-red-bright);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.hs-coven-box p {
  font-size: 13px;
  color: var(--hs-text-muted);
  margin-bottom: 20px;
}

.hs-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--hs-border);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 14px;
  margin-bottom: 12px;
  transition: border-color var(--transition-fast);
}

.hs-input:focus {
  outline: none;
  border-color: var(--hs-red);
  box-shadow: 0 0 10px var(--hs-red-glow);
}

.hs-btn {
  width: 100%;
  background: var(--hs-red);
  color: #ffffff;
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 15px var(--hs-red-glow);
  transition: all var(--transition-fast);
}

.hs-btn:hover {
  background: var(--hs-red-bright);
  box-shadow: 0 0 25px var(--hs-red-glow);
}

/* ==========================================================================
   6. SINGLE STORY READER TEMPLATE & VOICE NARRATOR
   ========================================================================== */
.hs-article-header {
  padding: 60px 0 30px;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

.hs-article-title {
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 900;
  margin: 16px 0 20px;
  line-height: 1.15;
}

.hs-article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: 14px;
  color: var(--hs-text-muted);
  font-family: var(--font-mono);
}

/* Reader & Voice Narrator Controls */
.hs-reader-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 800px;
  margin: 30px auto;
  padding: 16px 28px;
  background: var(--hs-bg-surface);
  border: 1px solid var(--hs-glass-border);
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: 13px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6);
}

/* Voice Narrator Button Group */
.hs-voice-narrator {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hs-voice-btn {
  background: linear-gradient(135deg, var(--hs-red), var(--hs-red-deep));
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  border-radius: 30px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 12px var(--hs-red-glow);
  transition: all var(--transition-fast);
}

.hs-voice-btn:hover {
  background: var(--hs-red-bright);
  box-shadow: 0 0 20px var(--hs-red-glow);
  transform: scale(1.03);
}

.hs-voice-btn.active {
  background: var(--hs-toxic);
  color: #000000;
  box-shadow: 0 0 18px rgba(0, 255, 102, 0.6);
}

.hs-voice-status {
  font-size: 12px;
  color: var(--hs-text-muted);
}

.hs-font-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hs-font-btn {
  background: var(--hs-bg-card);
  border: 1px solid var(--hs-border);
  color: var(--hs-text);
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
}

.hs-font-btn:hover {
  border-color: var(--hs-red);
  color: var(--hs-red-bright);
}

.hs-article-body {
  max-width: 800px;
  margin: 0 auto 60px;
  font-size: 18px;
  line-height: 1.85;
  color: #dcdce6;
}

.hs-article-body p {
  margin-bottom: 24px;
}

.hs-article-body blockquote {
  border-left: 4px solid var(--hs-red);
  padding: 20px 24px;
  background: rgba(230, 0, 38, 0.05);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  font-size: 20px;
  margin: 32px 0;
  color: #ffffff;
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.hs-footer {
  margin-top: auto;
  background: #020203;
  border-top: 1px solid var(--hs-glass-border);
  padding: 60px 0 30px;
}

.hs-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .hs-footer-grid {
    grid-template-columns: 1fr;
  }
}

.hs-footer-bottom {
  padding-top: 30px;
  border-top: 1px solid var(--hs-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--hs-text-dim);
  font-family: var(--font-mono);
}

/* Comments section */
.hs-comments {
  max-width: 800px;
  margin: 40px auto;
  padding-top: 40px;
  border-top: 1px solid var(--hs-border);
}

.hs-comment-item {
  background: var(--hs-bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--hs-border);
  padding: 20px;
  margin-bottom: 20px;
}

.hs-comment-author {
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hs-comment-date {
  font-size: 11px;
  color: var(--hs-text-dim);
  font-family: var(--font-mono);
}
