/* ==========================================================================
   Tales of Teafans - CSS Design System & Styles
   Aesthetic: Nostalgic Kolkata Tea Shop & Scrapbook Diary
   ========================================================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Caveat:wght@400..700&display=swap');

:root {
  --bg-parchment: #faf6eb;
  --bg-parchment-dark: #f0e6cf;
  --color-ink: #2b2b2b;
  --color-ink-faded: #555555;
  --color-terracotta: #b35433;
  --color-terracotta-light: #d47454;
  --color-green: #214029;
  --color-green-light: #3d6a49;
  --font-heading: 'Playfair Display', serif;
  --font-typewriter: 'Courier Prime', monospace;
  --font-handwriting: 'Caveat', cursive;
  --font-caption: 'Architects Daughter', cursive;
  --border-sketch: 2px solid var(--color-ink);
}

/* Base resets & Parchment background */
body {
  background-color: var(--bg-parchment);
  background-image: 
    radial-gradient(var(--bg-parchment-dark) 1px, transparent 0),
    radial-gradient(var(--bg-parchment-dark) 2px, transparent 0);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
  color: var(--color-ink);
  font-family: var(--font-typewriter);
  overflow-x: hidden;
  line-height: 1.6;
  position: relative;
}

/* Custom Selection color (looks like highlighted tea stain) */
::selection {
  background: rgba(179, 84, 51, 0.2);
  color: var(--color-ink);
}

/* ==========================================================================
   Utility Classes & Artistic Ornaments
   ========================================================================== */

/* Irregular hand-drawn border effect using border-radius */
.sketch-border {
  border: 3px solid var(--color-ink);
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
}

.sketch-border-sm {
  border: 2px solid var(--color-ink);
  border-radius: 120px 10px 110px 10px/10px 110px 10px 120px;
}

/* Handwritten notes */
.handwritten {
  font-family: var(--font-handwriting);
  font-size: 1.45rem;
  color: #3f388a; /* Vintage fountain pen blue */
  line-height: 1.2;
}

.terracotta-text {
  color: var(--color-terracotta);
}

.green-text {
  color: var(--color-green);
}

/* Sticky Tape effect */
.sticky-tape {
  position: relative;
}
.sticky-tape::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 30%;
  width: 100px;
  height: 25px;
  background-color: rgba(224, 213, 175, 0.65);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transform: rotate(-3deg);
  z-index: 10;
  border-left: 2px dashed rgba(0,0,0,0.1);
  border-right: 2px dashed rgba(0,0,0,0.1);
}

/* Polaroid style photo frame */
.polaroid {
  background-color: #fff;
  padding: 15px 15px 50px 15px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  transform: rotate(-1.5deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.polaroid:hover {
  transform: rotate(1deg) scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  z-index: 5;
}
.polaroid img {
  width: 100%;
  height: auto;
  border: 1px solid #ddd;
  filter: sepia(0.2) contrast(0.95);
}
.polaroid .caption {
  font-family: var(--font-caption);
  font-size: 1rem;
  text-align: center;
  color: var(--color-ink-faded);
  margin-top: 15px;
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
}

/* Tea Stain Decorator */
.tea-stain {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid rgba(139, 69, 19, 0.1);
  box-shadow: inset 0 0 15px rgba(139, 69, 19, 0.05);
  filter: blur(1px);
  pointer-events: none;
  z-index: 0;
}
.tea-stain::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border-radius: 50%;
  border: 1px solid rgba(139, 69, 19, 0.05);
}

.stain-1 { top: 12%; left: 8%; transform: rotate(15deg) scale(1.2); }
.stain-2 { bottom: 15%; right: 5%; transform: rotate(-45deg); }
.stain-3 { top: 55%; left: 78%; transform: rotate(110deg) scale(0.9); }

/* Ink Splatter Decorator */
.ink-splatter {
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: rgba(43, 43, 43, 0.12);
  border-radius: 50%;
  pointer-events: none;
}
.ink-splatter::before, .ink-splatter::after {
  content: "";
  position: absolute;
  background-color: rgba(43, 43, 43, 0.12);
  border-radius: 50%;
}
.ink-splatter::before { width: 3px; height: 3px; top: -8px; left: 6px; }
.ink-splatter::after { width: 4px; height: 4px; top: 7px; left: -10px; }

/* Custom Buttons (Sketchy/Handdrawn look) */
.btn-sketch {
  background-color: transparent;
  color: var(--color-ink);
  font-family: var(--font-heading);
  font-weight: 700;
  border: 2px solid var(--color-ink);
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
  padding: 10px 24px;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 2px 3px 0px var(--color-ink);
}
.btn-sketch:hover {
  background-color: var(--color-terracotta);
  color: #fff;
  transform: translate(1px, 2px);
  box-shadow: 1px 1px 0px var(--color-ink);
}
.btn-sketch:active {
  transform: translate(2px, 3px);
  box-shadow: 0px 0px 0px var(--color-ink);
}

.btn-sketch-green {
  background-color: transparent;
  border-color: var(--color-green);
  color: var(--color-green);
}
.btn-sketch-green:hover {
  background-color: var(--color-green);
  color: #fff;
}

/* ==========================================================================
   Page Sections
   ========================================================================== */

/* Scrapbook Pages (Unconventional offset containers) */
.scrapbook-page {
  background-color: #fffdf7;
  border: 2px solid var(--color-ink);
  box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.05);
  padding: 40px;
  margin: 50px auto;
  position: relative;
}

.page-tilt-left {
  transform: rotate(-0.5deg);
}

.page-tilt-right {
  transform: rotate(0.6deg);
}

/* Navbar / Header */
.navbar-custom {
  background-color: transparent;
  border-bottom: 2px dashed rgba(43, 43, 43, 0.15);
  padding: 15px 0;
}
.navbar-brand img {
  height: 85px;
  width: auto;
}
.nav-link-custom {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-ink) !important;
  font-size: 1.1rem;
  margin: 0 15px;
  position: relative;
  transition: color 0.2s ease;
}
.nav-link-custom::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-terracotta);
  transition: width 0.3s ease;
}
.nav-link-custom:hover {
  color: var(--color-terracotta) !important;
}
.nav-link-custom:hover::after {
  width: 100%;
}

/* Hero Section */
.hero-section {
  padding: 80px 0 120px 0;
  position: relative;
  overflow: hidden;
}
.hero-logo-container {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
}
.hero-logo {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0px 8px 12px rgba(0, 0, 0, 0.05));
  animation: floatSlow 6s ease-in-out infinite;
}
.hero-content {
  margin-top: 40px;
  text-align: center;
}
.hero-title {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 20px;
}
.hero-lead {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto 30px auto;
  color: var(--color-ink-faded);
}

/* Steaming Tea Cup Animation in Hero */
.hero-cup-wrapper {
  position: relative;
  display: inline-block;
  margin-top: 40px;
}
.steam-container {
  position: absolute;
  top: -65px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 70px;
}
.steam-line {
  position: absolute;
  bottom: 0;
  width: 3px;
  height: 40px;
  background: linear-gradient(to top, rgba(139, 69, 19, 0.15), rgba(255, 255, 255, 0));
  border-radius: 50%;
  animation: steamRise 3s infinite ease-in-out;
}
.steam-line:nth-child(1) { left: 15px; animation-delay: 0.1s; width: 4px; }
.steam-line:nth-child(2) { left: 30px; animation-delay: 0.8s; animation-duration: 2.5s; width: 3px; }
.steam-line:nth-child(3) { left: 45px; animation-delay: 0.4s; animation-duration: 3.5s; width: 5px; }

/* Chapter Dividers (Styled like ripped paper) */
.chapter-divider {
  text-align: center;
  position: relative;
  margin: 80px 0 50px 0;
}
.chapter-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--color-ink), var(--color-ink) 10px, transparent 10px, transparent 20px);
  z-index: 1;
}
.chapter-badge {
  background-color: var(--color-terracotta);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 10px 25px;
  border-radius: 50px;
  display: inline-block;
  position: relative;
  z-index: 2;
  border: 2px solid var(--color-ink);
  box-shadow: 3px 3px 0px var(--color-ink);
}

/* ==========================================================================
   Chapter 1: The Adda Culture
   ========================================================================== */
.section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 25px;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 60%;
  height: 3px;
  background-color: var(--color-terracotta);
  border-radius: 2px;
}

.adda-card {
  transition: all 0.3s ease;
}

/* ==========================================================================
   Chapter 2: History Timeline (Zigzag Scrapbook)
   ========================================================================== */
.timeline-container {
  position: relative;
  padding: 40px 0;
}
.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: repeating-linear-gradient(180deg, var(--color-ink), var(--color-ink) 15px, transparent 15px, transparent 30px);
  transform: translateX(-50%);
}
.timeline-item {
  margin-bottom: 80px;
  position: relative;
}
.timeline-badge {
  position: absolute;
  top: 15px;
  left: 50%;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--bg-parchment);
  border: 3px solid var(--color-ink);
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-terracotta);
  box-shadow: 2px 2px 0 var(--color-ink);
}
.timeline-panel {
  width: 42%;
  padding: 25px;
  background-color: #fff;
  border: 2px solid var(--color-ink);
  position: relative;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.05);
}
.timeline-item:nth-child(even) .timeline-panel {
  float: right;
}
.timeline-item:nth-child(odd) .timeline-panel {
  float: left;
}
.timeline-panel::before {
  content: "";
  position: absolute;
  top: 25px;
  width: 0;
  height: 0;
  border-style: solid;
}
.timeline-item:nth-child(even) .timeline-panel::before {
  left: -15px;
  border-width: 10px 15px 10px 0;
  border-color: transparent var(--color-ink) transparent transparent;
}
.timeline-item:nth-child(odd) .timeline-panel::before {
  right: -15px;
  border-width: 10px 0 10px 15px;
  border-color: transparent transparent transparent var(--color-ink);
}
.timeline-year {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-terracotta);
  margin-bottom: 10px;
}

/* Timeline center image container */
.timeline-image-wrapper {
  margin: 30px auto;
  max-width: 600px;
}

/* ==========================================================================
   Chapter 3: Interactive Tea Stall
   ========================================================================== */
.tea-stall-wrapper {
  position: relative;
  border: 3px solid var(--color-ink);
  background-color: #fff;
  padding: 10px;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.06);
}
.tea-stall-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Hotspots on the sketch */
.hotspot {
  position: absolute;
  width: 45px;
  height: 45px;
  background-color: rgba(179, 84, 51, 0.25);
  border: 2px dashed var(--color-terracotta);
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.hotspot::after {
  content: "";
  width: 15px;
  height: 15px;
  background-color: var(--color-terracotta);
  border-radius: 50%;
  transition: transform 0.3s ease;
}
.hotspot:hover {
  background-color: rgba(179, 84, 51, 0.5);
  transform: scale(1.2);
  box-shadow: 0 0 10px var(--color-terracotta-light);
}
.hotspot:hover::after {
  transform: scale(1.3);
}

/* Position Hotspots based on image layout */
/* Kettle area */
.hotspot-kettle {
  top: 48%;
  left: 26%;
}
/* Biscuit jar area */
.hotspot-biscuits {
  top: 46%;
  left: 68%;
}
/* Clay cups stack */
.hotspot-cups {
  top: 70%;
  left: 45%;
}
/* Chalkboard / Menu board */
.hotspot-board {
  top: 15%;
  left: 12%;
}

/* Interactive Info displays */
.stall-info-panel {
  display: none;
  background-color: #fffefb;
  border: 2px solid var(--color-ink);
  padding: 20px;
  position: relative;
  box-shadow: 4px 4px 0 var(--color-ink);
}
.stall-info-panel::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 20px;
  width: 80px;
  height: 20px;
  background-color: rgba(224, 213, 175, 0.7);
  transform: rotate(-2deg);
}

/* ==========================================================================
   Chapter 4: Outlets & Kolkata Map
   ========================================================================== */
.map-container {
  position: relative;
  border: 3px solid var(--color-ink);
  background-color: #f7eed7;
  padding: 15px;
  height: 480px;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.06);
  overflow: hidden;
}
.map-bg-tint {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(247, 238, 215, 0.55);
  z-index: 1;
}

/* Decorative drawing elements in Map */
.map-illustration {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  object-fit: cover;
  opacity: 0.15;
  z-index: 2;
  filter: grayscale(1);
}

.map-pin {
  position: absolute;
  width: 32px;
  height: 32px;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.map-pin:hover {
  transform: scale(1.25) translateY(-5px);
}

.map-pin .pin-icon {
  width: 24px;
  height: 24px;
  background-color: var(--color-terracotta);
  border: 2px solid var(--color-ink);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 1px 1px 3px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-pin .pin-icon::after {
  content: "";
  width: 8px;
  height: 8px;
  background-color: #fff;
  border-radius: 50%;
}
.map-pin .pin-label {
  font-family: var(--font-caption);
  font-size: 0.75rem;
  background-color: var(--color-ink);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 5px;
  white-space: nowrap;
  box-shadow: 1px 2px 4px rgba(0,0,0,0.15);
}

/* Map Pins Coordinates */
.pin-college-st { top: 32%; left: 52%; }
.pin-gariahata { top: 72%; left: 58%; }
.pin-shyambazar { top: 15%; left: 45%; }
.pin-saltlake { top: 40%; left: 75%; }
.pin-howrah { top: 25%; left: 22%; }

/* Postcard modal for outlet details */
.outlet-postcard {
  display: none;
  background-color: #fffdf5;
  border: 2px solid var(--color-ink);
  padding: 30px;
  position: relative;
  box-shadow: 8px 8px 0 rgba(0,0,0,0.08);
}
.postcard-stamp {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 70px;
  height: 85px;
  border: 2px dashed var(--color-terracotta);
  padding: 5px;
  text-align: center;
  transform: rotate(5deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #fff;
}
.postcard-stamp img {
  width: 100%;
  height: auto;
  opacity: 0.75;
}
.postcard-stamp-label {
  font-family: var(--font-caption);
  font-size: 0.55rem;
  color: var(--color-terracotta);
  margin-top: 3px;
}
.postcard-divider {
  border-left: 2px dashed rgba(43,43,43,0.2);
  height: 100%;
}

/* ==========================================================================
   Footer & Feedback roll
   ========================================================================== */
.footer-section {
  background-color: #f2ebd9;
  border-top: 3px solid var(--color-ink);
  padding: 60px 0 30px 0;
  position: relative;
}
.footer-logo {
  max-width: 220px;
  margin-bottom: 20px;
}

/* Guestbook Feedback Roll style */
.feedback-roll {
  background-color: #fffdf3;
  border: 2px solid var(--color-ink);
  padding: 30px;
  position: relative;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.05);
}
.feedback-roll::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 5%;
  right: 5%;
  height: 12px;
  background: repeating-linear-gradient(90deg, #fffdf3, #fffdf3 10px, var(--color-ink) 10px, var(--color-ink) 12px);
  border: 2px solid var(--color-ink);
  border-bottom: none;
}
.feedback-roll h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 20px;
}

.input-sketch {
  background-color: transparent;
  border: none;
  border-bottom: 2px solid var(--color-ink);
  border-radius: 0;
  padding: 10px 5px;
  font-family: var(--font-typewriter);
  color: var(--color-ink);
}
.input-sketch:focus {
  background-color: rgba(179,84,51,0.03);
  box-shadow: none;
  border-color: var(--color-terracotta);
}

/* ==========================================================================
   Floating Widgets
   ========================================================================== */

/* Floating Widget Container */
.floating-widget {
  position: fixed;
  z-index: 999;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Left side: Vintage Radio */
.widget-radio {
  bottom: 30px;
  left: 30px;
}
.radio-box {
  width: 260px;
  background-color: #4a2810; /* Dark wood color */
  border: 3px solid var(--color-ink);
  border-radius: 12px;
  box-shadow: 5px 8px 16px rgba(0, 0, 0, 0.25);
  padding: 15px;
  position: relative;
  color: #f7eed7;
  overflow: hidden;
  transition: transform 0.3s ease;
}
.radio-box:hover {
  transform: translateY(-5px);
}
.radio-grill {
  background: repeating-linear-gradient(90deg, #1c0e05, #1c0e05 4px, transparent 4px, transparent 8px);
  height: 45px;
  border: 2px solid var(--color-ink);
  border-radius: 6px;
  margin-bottom: 12px;
  position: relative;
}
.radio-dial {
  height: 35px;
  background-color: #bf8d30;
  border: 2px solid var(--color-ink);
  border-radius: 4px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  font-size: 0.75rem;
  color: var(--color-ink);
  font-weight: bold;
  position: relative;
}
.radio-needle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 45%;
  width: 3px;
  background-color: red;
  box-shadow: 0 0 3px red;
  transition: left 0.5s ease;
}
.radio-controls {
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.radio-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--color-ink);
  background-color: #d1c7bd;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink);
  font-size: 0.8rem;
  box-shadow: 1px 2px 0 var(--color-ink);
  transition: all 0.1s ease;
}
.radio-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 0px 0px 0 var(--color-ink);
}
.radio-btn.playing {
  background-color: #2e5a44;
  color: #fff;
}
.radio-knob {
  width: 25px;
  height: 25px;
  background-color: #1a0e05;
  border: 2px solid var(--color-ink);
  border-radius: 50%;
  position: relative;
  cursor: pointer;
}
.radio-knob::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 11px;
  width: 3px;
  height: 8px;
  background-color: #fff;
}

.radio-speaker-bubble {
  position: absolute;
  bottom: 120px;
  left: 0;
  width: 260px;
  background-color: #fff;
  color: var(--color-ink);
  border: 2px solid var(--color-ink);
  border-radius: 10px;
  padding: 12px;
  font-size: 0.85rem;
  box-shadow: 3px 4px 10px rgba(0,0,0,0.15);
  display: none;
  font-family: var(--font-handwriting);
  font-size: 1.15rem;
  line-height: 1.2;
}
.radio-speaker-bubble::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 40px;
  border-width: 10px 10px 0 0;
  border-color: #fff transparent transparent transparent;
  display: block;
  width: 0;
}
.radio-speaker-bubble::before {
  content: "";
  position: absolute;
  bottom: -13px;
  left: 39px;
  border-width: 11px 11px 0 0;
  border-color: var(--color-ink) transparent transparent transparent;
  display: block;
  width: 0;
  z-index: -1;
}

/* Right side: Steaming Clay Cup (Scroll to Top) */
.widget-scrolltop {
  bottom: 30px;
  right: 30px;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}
.widget-scrolltop.show {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}
.scrolltop-cup {
  width: 60px;
  height: 60px;
  background-color: var(--color-terracotta);
  border: 3px solid var(--color-ink);
  border-radius: 50% 50% 25% 25%/15px 15px 45px 45px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  position: relative;
  transition: background-color 0.2s ease;
}
.scrolltop-cup:hover {
  background-color: var(--color-terracotta-light);
}
.scrolltop-handle {
  position: absolute;
  right: -10px;
  top: 15px;
  width: 15px;
  height: 25px;
  border: 3px solid var(--color-ink);
  border-left: none;
  border-radius: 0 12px 12px 0;
  background-color: var(--color-terracotta);
  z-index: -1;
}
.scrolltop-cup .arrow {
  color: #fff;
  font-size: 1.3rem;
  font-weight: bold;
  transform: translateY(-2px);
  transition: transform 0.2s ease;
}
.scrolltop-cup:hover .arrow {
  transform: translateY(-6px);
}
/* Steam animation for scroll-to-top */
.scrolltop-cup .steam-container {
  top: -45px;
  height: 50px;
  width: 40px;
}

/* Interactive Audio visualizer bars (dummy CSS indicator) */
.visualizer {
  display: flex;
  align-items: flex-end;
  height: 15px;
  width: 40px;
  position: absolute;
  right: 15px;
  top: 15px;
}
.visualizer-bar {
  width: 3px;
  background-color: #2e5a44;
  margin-right: 2px;
  height: 3px;
  transition: height 0.1s ease;
}
.playing .visualizer-bar {
  animation: equalize 1s infinite alternate;
}
.playing .visualizer-bar:nth-child(1) { animation-delay: 0.1s; }
.playing .visualizer-bar:nth-child(2) { animation-delay: 0.4s; }
.playing .visualizer-bar:nth-child(3) { animation-delay: 0.2s; }
.playing .visualizer-bar:nth-child(4) { animation-delay: 0.5s; }

/* Sticky Trivia Widget */
.widget-trivia {
  top: 150px;
  right: -245px; /* hidden by default, pops out */
  width: 280px;
  z-index: 100;
}
.widget-trivia.open {
  right: 15px;
}
.trivia-tab {
  position: absolute;
  left: -40px;
  top: 20px;
  width: 40px;
  height: 100px;
  background-color: var(--color-green);
  border: 2px solid var(--color-ink);
  border-right: none;
  border-radius: 8px 0 0 8px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: -2px 3px 6px rgba(0,0,0,0.1);
}
.trivia-tab span {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 1px;
}
.trivia-content {
  background-color: #fffbc7; /* Sticky note yellow */
  border: 2px solid var(--color-ink);
  padding: 20px;
  box-shadow: 4px 6px 12px rgba(0,0,0,0.15);
  font-family: var(--font-handwriting);
  font-size: 1.25rem;
  position: relative;
  transform: rotate(1deg);
}
.trivia-content::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 40%;
  width: 60px;
  height: 18px;
  background-color: rgba(220, 220, 220, 0.5);
  transform: rotate(-1deg);
}
.trivia-close {
  position: absolute;
  top: 5px;
  right: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: monospace;
  font-weight: bold;
}

/* ==========================================================================
   CSS Keyframe Animations
   ========================================================================== */
@keyframes floatSlow {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(0.5deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes steamRise {
  0% {
    transform: translateY(15px) scaleX(0.8) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: 0.6;
  }
  50% {
    transform: translateY(-15px) scaleX(1.2) rotate(15deg);
    opacity: 0.3;
  }
  100% {
    transform: translateY(-40px) scaleX(0.5) rotate(-15deg);
    opacity: 0;
  }
}

@keyframes equalize {
  0% { height: 3px; }
  100% { height: 18px; }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 991.98px) {
  .timeline-line {
    left: 20px;
  }
  .timeline-badge {
    left: 20px;
    width: 45px;
    height: 45px;
  }
  .timeline-panel {
    width: 88%;
    float: right !important;
  }
  .timeline-panel::before {
    left: -15px !important;
    right: auto !important;
    border-width: 10px 15px 10px 0 !important;
    border-color: transparent var(--color-ink) transparent transparent !important;
  }
  
  .widget-radio {
    bottom: 20px;
    left: 20px;
    transform: scale(0.9);
  }
  .widget-scrolltop {
    bottom: 20px;
    right: 20px;
    transform: scale(0.9);
  }
  .widget-trivia {
    top: 100px;
  }
}

@media (max-width: 575.98px) {
  .hero-title {
    font-size: 2rem;
  }
  .section-title {
    font-size: 1.7rem;
  }
  .scrapbook-page {
    padding: 20px 15px;
  }
  .radio-box {
    width: 220px;
  }
  .radio-speaker-bubble {
    width: 220px;
  }
  .widget-trivia {
    width: 220px;
  }
}

.radio-close-btn {
  color: #f7eed7 !important;
  font-size: 1.5rem !important;
  transition: color 0.2s ease;
}
.radio-close-btn:hover {
  color: #d47454 !important; /* Terracotta light highlight */
}

.radio-restore-btn {
  display: none;
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 55px;
  height: 55px;
  background-color: #4a2810;
  border: 3px solid var(--color-ink);
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: #f7eed7;
  font-size: 1.4rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  z-index: 9999; /* Higher z-index to stay on top */
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.radio-restore-btn:hover {
  transform: scale(1.1);
  background-color: var(--color-terracotta);
  color: #fff;
}
.radio-restore-btn i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
