/* ==========================================================================
   ULTIMUL REFUGIU — RedM Roleplay Server
   Old-paper western theme · muted matte grey + antique gold
   --------------------------------------------------------------------------
   HOW TO RECOLOR THE WHOLE SITE:
   Change the variables below — every color on the site comes from here.
   ========================================================================== */

:root {
  /* --- Palette --- */
  --ink:          #26241f;   /* darkest text / near-black brown-grey        */
  --grey-900:     #2e2c29;   /* dark section backgrounds                    */
  --grey-800:     #3a3835;   /* matte grey — primary dark surface           */
  --grey-700:     #4a4743;
  --grey-400:     #8a867d;   /* muted mid grey                              */
  --paper:        #e8e2d2;   /* old paper base                              */
  --paper-dark:   #d9d1bc;   /* aged paper edges / alt rows                 */
  --gold:         #b8962e;   /* main accent — darker muted yellow           */
  --gold-bright:  #d4af37;   /* hover / highlights                          */
  --gold-deep:    #8f741f;   /* borders, pressed states                     */
  --cream:        #f2ecdd;   /* light text on dark backgrounds              */

  /* --- Type --- */
  --font-display: 'Rye', 'Playfair Display', serif;        /* big western titles */
  --font-heading: 'Playfair Display', Georgia, serif;      /* section headings   */
  --font-body:    'Crimson Text', Georgia, serif;          /* paragraphs         */

  --nav-height: 68px;
  --max-width: 1100px;
}

/* ==========================================================================
   RESET / BASE
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ink);

  background-color: var(--paper);

  background-image:
    linear-gradient(
      rgba(232, 226, 210, 0.88),
      rgba(232, 226, 210, 0.88)
    ),
    url("assets/images/background1.jpg");

  background-size: cover;
  background-position: center;
  background-attachment: fixed;

  overflow-x: hidden;
}

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

a { color: var(--gold-deep); text-decoration: none; transition: color 0.25s ease; }
a:hover { color: var(--gold-bright); }

h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ==========================================================================
   NAVBAR
   ========================================================================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%);
  border-bottom: 3px solid var(--grey-900);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.navbar .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--grey-900);
  letter-spacing: 0.5px;
}

.nav-brand:hover { color: var(--ink); }

.nav-brand .brand-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 14px;
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--grey-900);
  position: relative;
  white-space: nowrap;
}

/* animated underline */
.nav-links a::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--grey-900);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

.nav-links a.active { color: var(--ink); }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--grey-900);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--gold-deep);
    border-bottom: 3px solid var(--grey-900);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  .nav-links.open {
    max-height: calc(100dvh - var(--nav-height));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 100px;
    box-sizing: border-box;
}
  .nav-links a { padding: 14px 24px; }
  .nav-links a::after { display: none; }
}

/* --- Dropdown submenus ----------------------------------------------------
   To give any menu item subcategories, use this pattern in the nav:

     <li class="has-dropdown">
       <a href="parent-page.html">Parent <span class="caret">&#9662;</span></a>
       <ul class="dropdown">
         <li><a href="sub-page-1.html">Subcategory 1</a></li>
         <li><a href="sub-page-2.html">Subcategory 2</a></li>
       </ul>
     </li>

   On desktop the submenu opens on hover; on mobile it shows expanded
   inside the menu. See the "Rules" item in any page's nav for a live
   example.
   -------------------------------------------------------------------------- */

.nav-links .has-dropdown { position: relative; }

.nav-links .caret { font-size: 0.7em; }

.nav-links .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  list-style: none;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%);
  border: 1px solid var(--grey-900);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
  display: none;
  z-index: 20;
}

.nav-links .has-dropdown:hover .dropdown,
.nav-links .has-dropdown:focus-within .dropdown { display: block; }

.nav-links .dropdown a { padding: 11px 16px; white-space: nowrap; }

@media (max-width: 900px) {
  .nav-links .dropdown {
    position: static;
    display: block;              /* always expanded inside the mobile menu */
    background: rgba(0, 0, 0, 0.12);
    border: none;
    box-shadow: none;
  }
  .nav-links .dropdown a { padding: 12px 24px 12px 44px; font-size: 0.9rem; }
}

/* ==========================================================================
   HERO (homepage)
   ========================================================================== */

.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  position: relative;
  background:
    radial-gradient(ellipse at center, rgba(184, 150, 46, 0.10), transparent 65%),
    var(--paper);
}

/* --- Animated logo --- */

.hero-logo {
  position: relative;
  width: 340px;
  height: 340px;
  margin-bottom: 36px;
}

@media (max-width: 500px) {
  .hero-logo { width: 260px; height: 260px; }
}

/* the logo image / placeholder sits still in the middle, with a gentle float */
.hero-logo .logo-core {
  position: absolute;
  inset: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: logoFloat 6s ease-in-out infinite;
  filter: drop-shadow(0 8px 24px rgba(38, 36, 31, 0.35));
}

.hero-logo .logo-core img,
.hero-logo .logo-core svg { width: 100%; height: 100%; object-fit: contain; }

/* decorative ring rotates slowly around the logo */
.hero-logo .logo-ring {
  position: absolute;
  inset: 0;
  animation: logoSpin 40s linear infinite;
}

@keyframes logoSpin  { to { transform: rotate(360deg); } }
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* soft golden pulse behind the logo */
.hero-logo::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 150, 46, 0.25), transparent 70%);
  animation: logoPulse 5s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { opacity: 0.5; transform: scale(0.95); }
  50%      { opacity: 1;   transform: scale(1.08); }
}

/* --- Hero title: letters revealed one by one by JS --- */

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  color: var(--grey-800);
  letter-spacing: 2px;
  text-shadow: 2px 2px 0 rgba(184, 150, 46, 0.35);
}

.hero-title .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(24px) rotate(4deg);
  animation: letterIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  /* per-letter delay is set inline by js/main.js */
}

@keyframes letterIn {
  to { opacity: 1; transform: translateY(0) rotate(0deg); }
}

.hero-tagline {
  margin-top: 18px;
  font-style: italic;
  font-size: 1.35rem;
  color: var(--grey-700);
  max-width: 560px;
}

.hero-divider {
  width: 180px;
  margin: 26px auto 0;
  border: none;
  border-top: 2px solid var(--gold);
  position: relative;
}

.hero-divider::after {
  content: '✦';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold-deep);
  background: var(--paper);
  padding: 0 10px;
}

.hero-cta {
  margin-top: 34px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

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

.btn {
  display: inline-block;
  padding: 12px 30px;
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
  border: 2px solid var(--gold-deep);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn-gold {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: var(--grey-900);
}

.btn-gold:hover {
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  color: var(--cream);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(143, 116, 31, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--grey-800);
}

.btn-outline:hover {
  background: var(--grey-800);
  color: var(--gold-bright);
  border-color: var(--grey-800);
  transform: translateY(-2px);
}

/* ==========================================================================
   PAGE HEADER (banner at the top of each subpage)
   ========================================================================== */

.page-header {
  background:
    radial-gradient(ellipse at 50% 120%, rgba(184, 150, 46, 0.18), transparent 60%),
    linear-gradient(180deg, var(--grey-900), var(--grey-800));
  color: var(--cream);
  text-align: center;
  padding: 72px 24px 56px;
  border-bottom: 4px solid var(--gold);
  position: relative;
  overflow: hidden;
}

/* faint diagonal grunge lines on dark banners */
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-45deg, transparent, transparent 6px, rgba(242, 236, 221, 0.02) 6px, rgba(242, 236, 221, 0.02) 8px);
  pointer-events: none;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--gold-bright);
  letter-spacing: 2px;
}

.page-header p {
  margin-top: 14px;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--grey-400);
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

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

.section { padding: 72px 0; }

.section-dark {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(184, 150, 46, 0.07), transparent 55%),
    linear-gradient(180deg, var(--grey-800), var(--grey-900));
  color: var(--cream);
}

.section-dark h2 { color: var(--gold-bright); }
.section-dark p  { color: var(--paper-dark); }

.section-title {
  text-align: center;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  margin-bottom: 12px;
  color: var(--grey-800);
}

.section-title .flourish { color: var(--gold); }

.section-sub {
  text-align: center;
  font-style: italic;
  color: var(--grey-700);
  margin-bottom: 48px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.section-dark .section-sub { color: var(--grey-400); }

/* ==========================================================================
   CARDS  (quote/image cards, activity cards, tutorial cards…)
   ========================================================================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.card {
  background: var(--cream);
  border: 1px solid var(--paper-dark);
  box-shadow: 0 4px 14px rgba(38, 36, 31, 0.12);
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(38, 36, 31, 0.22);
}

.card .card-img {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
  background: var(--grey-700);
}

/* placeholder block shown until real screenshots are added */
.card .card-img-placeholder {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--grey-700), var(--grey-900));
  color: var(--gold);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.95rem;
}

.card .card-body { padding: 20px 22px 24px; }

.card .card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--grey-800);
}

.card .card-body p { font-size: 1rem; color: var(--grey-700); }

.card .card-quote {
  padding: 18px 22px;
  text-align: center;
  font-weight: 600;
  color: var(--grey-800);
}

/* ==========================================================================
   TEAM
   ========================================================================== */

.team-grid {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

.team-member { text-align: center; max-width: 240px; }

.team-member .avatar {
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: linear-gradient(135deg, var(--grey-700), var(--grey-900));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--gold-bright);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-member:hover .avatar {
  transform: scale(1.06);
  box-shadow: 0 0 0 6px rgba(184, 150, 46, 0.25);
}

/* a photo placed inside the avatar circle fills it neatly */
.team-member .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.team-member h3 { font-size: 1.3rem; color: var(--grey-800); }
.section-dark .team-member h3 { color: var(--gold-bright); }
.team-member .role { font-style: italic; color: var(--gold-deep); }
.section-dark .team-member .role { color: var(--gold); }

/* ==========================================================================
   RULES / PENAL CODE
   ========================================================================== */

.rule-block {
  background: var(--cream);
  border: 1px solid var(--paper-dark);
  border-left: 5px solid var(--gold);
  padding: 28px 32px;
  margin-bottom: 28px;
  box-shadow: 0 3px 10px rgba(38, 36, 31, 0.10);
}

.rule-block h2 {
  font-size: 1.4rem;
  color: var(--grey-800);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rule-block h2 .rule-num {
  font-family: var(--font-display);
  color: var(--gold-deep);
  font-size: 1.2rem;
}

.rule-block ol,
.rule-block ul { padding-left: 26px; }

.rule-block li { margin-bottom: 10px; }

/* penal code table */
.penal-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--cream);
  box-shadow: 0 3px 10px rgba(38, 36, 31, 0.10);
  font-size: 1.05rem;
}

.penal-table th {
  background: var(--grey-800);
  color: var(--gold-bright);
  font-family: var(--font-heading);
  padding: 14px 18px;
  text-align: left;
  letter-spacing: 0.5px;
}

.penal-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--paper-dark);
  vertical-align: top;
}

.penal-table tbody tr:nth-child(even) { background: rgba(217, 209, 188, 0.35); }
.penal-table tbody tr:hover { background: rgba(184, 150, 46, 0.12); }

.severity {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 3px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: 0.5px;
}

.severity-minor  { background: rgba(138, 134, 125, 0.25); color: var(--grey-700); }
.severity-major  { background: rgba(184, 150, 46, 0.3);  color: var(--gold-deep); }
.severity-severe { background: rgba(120, 45, 30, 0.25);  color: #6e2a1a; }

/* ==========================================================================
   STEPS (tutorials)
   ========================================================================== */

.step {
  display: flex;
  gap: 24px;
  margin-bottom: 34px;
  align-items: flex-start;
}

.step .step-num {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--grey-800);
  border: 2px solid var(--gold);
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step h3 { font-size: 1.25rem; color: var(--grey-800); margin-bottom: 8px; }

/* ==========================================================================
   GALLERY + LIGHTBOX
   ========================================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.gallery-item {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--paper-dark);
  position: relative;
  background: linear-gradient(135deg, var(--grey-700), var(--grey-900));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-family: var(--font-heading);
  font-style: italic;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img { transform: scale(1.07); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(38, 36, 31, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border: 4px solid var(--gold);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox .lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: var(--gold-bright);
  font-size: 2.4rem;
  cursor: pointer;
  line-height: 1;
}

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

.footer {
  background: linear-gradient(180deg, var(--grey-900), #211f1c);
  color: var(--grey-400);
  text-align: center;
  padding: 56px 24px 32px;
  border-top: 4px solid var(--gold);
}

.footer .footer-brand {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: 18px;
}

.footer .socials {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.footer .socials a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--grey-700);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey-400);
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

/* brand icons inherit the link color, so they turn gold on hover too */
.footer .socials svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.footer .socials a:hover {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  transform: translateY(-3px);
}

.footer .credit {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--grey-700);
}

.footer .credit span { color: var(--gold-deep); }

/* ==========================================================================
   SCROLL-REVEAL ANIMATIONS
   --------------------------------------------------------------------------
   Add class "reveal" to any element; js/main.js adds "visible" when it
   scrolls into view. Optional modifiers: reveal-left, reveal-right,
   reveal-scale. Stagger children with .reveal-stagger on the parent.
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.reveal-left  { transform: translateX(-48px); }
.reveal.reveal-right { transform: translateX(48px); }
.reveal.reveal-scale { transform: scale(0.88); }

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* staggered children — main.js sets transition-delay on each child */

/* ==========================================================================
   MUSIC PLAYER  (corner widget, injected on every page by js/main.js)
   ========================================================================== */

.music-player {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 150;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-direction: row-reverse; /* button stays right, panel opens to the left */
}

.music-toggle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--gold-deep);
  background: linear-gradient(180deg, var(--grey-800), var(--grey-900));
  color: var(--gold-bright);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.music-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(184, 150, 46, 0.35);
}

.music-toggle svg { width: 24px; height: 24px; fill: currentColor; }

/* gentle sway while music is playing */
.music-player.playing .music-toggle svg {
  animation: musicSway 1.6s ease-in-out infinite;
}

@keyframes musicSway {
  0%, 100% { transform: rotate(-8deg); }
  50%      { transform: rotate(8deg); }
}

.music-panel {
  display: none;
  flex-direction: column;
  gap: 10px;
  width: 260px;
  background: linear-gradient(180deg, var(--grey-800), var(--grey-900));
  border: 2px solid var(--gold-deep);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.music-player.open .music-panel { display: flex; }

/* song title */
.music-title {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--gold-bright);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* seek bar row: 0:00 ───────── 3:45 */
.music-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.music-progress span {
  font-family: monospace;
  font-size: 0.7rem;
  color: var(--grey-400);
  min-width: 32px;
  text-align: center;
}

.music-seek {
  flex: 1;
  height: 4px;
  accent-color: var(--gold);
  cursor: pointer;
}

/* buttons row: prev / play / next + volume */
.music-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.music-controls button {
  background: none;
  border: none;
  color: var(--gold-bright);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 50%;
  transition: color 0.2s ease, transform 0.2s ease;
}

.music-controls button:hover { color: var(--cream); transform: scale(1.12); }

.music-controls button svg { width: 20px; height: 20px; fill: currentColor; }
.music-controls .music-play svg { width: 28px; height: 28px; }

.music-vol-icon {
  width: 16px;
  height: 16px;
  fill: var(--grey-400);
  margin-left: 8px;
  flex-shrink: 0;
}

.music-volume {
  width: 64px;
  accent-color: var(--gold);
  cursor: pointer;
}

.music-message {
  color: var(--gold-bright);
  font-size: 0.85rem;
  line-height: 1.4;
  text-align: center;
}

@media (max-width: 600px) {
  .music-player { bottom: 16px; right: 16px; }
  .music-panel { width: min(260px, calc(100vw - 100px)); }
}

/* ==========================================================================
   INTERACTIVE MAP PAGE  (map.html)
   ========================================================================== */

.map-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .map-layout { grid-template-columns: 1fr; }
}

.map-sidebar {
  background: var(--cream);
  border: 1px solid var(--paper-dark);
  box-shadow: 0 3px 10px rgba(38, 36, 31, 0.1);
  padding: 20px;
  max-height: 640px;
  overflow-y: auto;
}

.map-sidebar h3 {
  font-size: 1.1rem;
  color: var(--grey-800);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gold);
}

.location-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s ease;
  font-size: 1rem;
}

.location-item:hover { background: rgba(184, 150, 46, 0.15); }
.location-item.active { background: rgba(184, 150, 46, 0.25); }

.location-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--cream);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

/* map viewport */
.map-frame {
  position: relative;
  background: var(--grey-900);
  border: 3px solid var(--gold-deep);
  box-shadow: 0 6px 20px rgba(38, 36, 31, 0.3);
}

#game-map {
  height: 640px;
  position: relative;
  overflow: hidden;
  cursor: grab;
  background: #10100e;
}

#game-map.dragging { cursor: grabbing; }

#game-map-content {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  transform-origin: 0 0;
}

#map-markers { position: absolute; inset: 0; }

.map-marker {
  position: absolute;
  z-index: 10;
  transform: translate(-50%, -100%);
  cursor: pointer;
}

.map-marker .pin {
  width: 26px;
  height: 26px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid var(--cream);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-marker .pin span {
  transform: rotate(45deg);
  font-size: 12px;
  line-height: 1;
}

.map-marker .pin-label {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(38, 36, 31, 0.92);
  color: var(--gold-bright);
  font-family: var(--font-heading);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 3px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.map-marker:hover .pin-label { opacity: 1; }

/* zoom control buttons */
.map-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-controls button {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid var(--gold-deep);
  background: rgba(38, 36, 31, 0.85);
  color: var(--gold-bright);
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
}

.map-controls button:hover { background: rgba(38, 36, 31, 1); }

/* live coordinate readout */
#map-coords {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 30;
  background: rgba(38, 36, 31, 0.85);
  color: var(--grey-400);
  font-family: monospace;
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: 4px;
  pointer-events: none;
}

/* info box shown when a marker is clicked */
#location-info {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 30;
  max-width: 300px;
  background: rgba(38, 36, 31, 0.94);
  border: 1px solid var(--gold-deep);
  border-radius: 6px;
  padding: 14px 16px;
  display: none;
}

#location-info.visible { display: block; }
#location-info h4 { font-family: var(--font-heading); color: var(--gold-bright); margin-bottom: 6px; }
#location-info p { color: var(--paper-dark); font-size: 0.95rem; line-height: 1.5; }

/* "copy coordinates" helper shown after clicking an empty map spot */
#add-location-hint {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 30;
  max-width: 320px;
  background: rgba(38, 36, 31, 0.94);
  border: 1px solid var(--gold-deep);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--paper-dark);
  font-size: 0.85rem;
  display: none;
}

#add-location-hint.visible { display: block; }
#add-location-hint code {
  display: block;
  margin-top: 8px;
  padding: 8px;
  background: #10100e;
  color: #7ec97e;
  font-size: 0.75rem;
  border-radius: 4px;
  word-break: break-all;
  cursor: pointer;
}

/* ==========================================================================
   ACCESSIBILITY — respect users who prefer less motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-title .letter { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
