:root {
  --primary: #a855f7; /* Royal Purple */
  --secondary: #9db8ff; /* Moonlight Silver-Blue */
  --danger: #ff4d4d; /* Red for Like button */
  --success: #4caf50; /* Green for success messages */
  --dark: #101426;
  --darker: #070a16;
  --light: #f5f5f5;
  --gray: #222839;
  --card-bg: #151a2e;
  --transition: all 0.3s ease;
  --header-height: 70px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

/* Heraldic display face for brand moments */
.logo,
.logo span,
.hero-content h1,
.content-section h2,
.footer-col h4,
#modal-title {
  font-family: "Cinzel", Georgia, serif;
  letter-spacing: 0.02em;
}

@keyframes portalSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.logo-mark {
  width: 32px;
  height: 32px;
  margin-right: 10px;
  flex-shrink: 0;
  animation: portalSpin 12s linear infinite;
  filter: drop-shadow(0 0 6px rgba(157, 184, 255, 0.6));
  transition: filter 0.3s ease;
  transform-origin: center center;
}

.logo:hover .logo-mark {
  animation-duration: 4s;
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.85));
}

/* =============================================
   FIX #15: focus-visible styles for keyboard nav
   ============================================= */
:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
}

/* Remove default outline only when not keyboard navigating */
:focus:not(:focus-visible) {
  outline: none;
}

body {
  background: linear-gradient(135deg, var(--darker), var(--dark));
  color: var(--light);
  min-height: 100vh;
  overflow-x: hidden;
  scroll-behavior: smooth;
  position: relative;
}

/* =============================================
   REALM LIVING ATMOSPHERE & AURORA
   ============================================= */
.realm-aurora-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.realm-aurora-bg::before,
.realm-aurora-bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform, opacity;
  pointer-events: none;
}

.realm-aurora-bg::before {
  top: -12%;
  left: 12%;
  width: 52vw;
  height: 52vw;
  max-width: 680px;
  max-height: 680px;
  background: radial-gradient(circle, rgba(157, 184, 255, 0.12) 0%, rgba(98, 70, 234, 0.06) 50%, transparent 70%);
  animation: auroraFloatA 22s ease-in-out infinite alternate;
}

.realm-aurora-bg::after {
  bottom: 8%;
  right: 8%;
  width: 48vw;
  height: 48vw;
  max-width: 620px;
  max-height: 620px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, rgba(126, 34, 206, 0.06) 50%, transparent 70%);
  animation: auroraFloatB 26s ease-in-out infinite alternate;
}

@keyframes auroraFloatA {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(40px, 30px, 0) scale(1.12); }
  100% { transform: translate3d(-30px, 15px, 0) scale(0.95); }
}

@keyframes auroraFloatB {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-35px, -25px, 0) scale(1.08); }
  100% { transform: translate3d(25px, -40px, 0) scale(0.92); }
}

#realm-stardust-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* =============================================
   ASTRAL STARDUST CUSTOM CURSOR (DESKTOP ONLY)
   ============================================= */
@media (hover: hover) and (pointer: fine) {
  .realm-cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary);
    opacity: 0;
    transition:
      width 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
      height 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
      background-color 0.2s ease,
      opacity 0.2s ease;
    will-change: transform;
  }

  .realm-cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    border: 1.5px solid rgba(157, 184, 255, 0.65);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    box-shadow: 0 0 10px rgba(157, 184, 255, 0.35);
    opacity: 0;
    transition:
      width 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
      height 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
      border-color 0.25s ease,
      background-color 0.25s ease,
      opacity 0.25s ease;
    will-change: transform;
  }

  body.realm-cursor-active .realm-cursor-dot,
  body.realm-cursor-active .realm-cursor-ring {
    opacity: 1;
  }

  body.realm-cursor-hover .realm-cursor-dot {
    width: 12px;
    height: 12px;
    background: #ffffff;
    box-shadow: 0 0 15px #ffffff, 0 0 25px var(--secondary);
  }

  body.realm-cursor-hover .realm-cursor-ring {
    width: 48px;
    height: 48px;
    border-color: var(--primary);
    background-color: rgba(168, 85, 247, 0.08);
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.5);
  }

  body.realm-cursor-click .realm-cursor-ring {
    width: 22px;
    height: 22px;
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.25);
  }
}

@media (hover: none) or (pointer: coarse), (prefers-reduced-motion: reduce) {
  .realm-cursor-dot,
  .realm-cursor-ring {
    display: none !important;
  }
}

/* =============================================
   HEADER
   ============================================= */
header {
  padding: 0 5%;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--dark);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary);
  text-decoration: none;
  text-shadow: 0 0 6px rgba(168, 85, 247, 0.45);
  display: flex;
  align-items: center;
  letter-spacing: 0.02em;
}

.logo .logo-white {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
}

.logo i {
  margin-right: 8px;
  font-size: 2rem;
  color: var(--secondary);
}

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

.nav-links li {
  margin: 0 5px;
}

.nav-links a {
  color: var(--light);
  text-decoration: none;
  padding: 10px 15px;
  transition: var(--transition);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a:hover {
  color: var(--secondary);
}

/* FIX #3: Active nav link highlight via scroll-spy */
.nav-links a.active-nav {
  color: var(--secondary);
}

.submit-button a {
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  color: var(--dark);
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 25px;
  box-shadow: 0 4px 15px rgba(157, 184, 255, 0.5);
  transition: all 0.3s ease;
}

.submit-button a:hover {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  box-shadow: 0 5px 14px rgba(168, 85, 247, 0.6);
  transform: translateY(-2px);
  color: var(--darker);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sound-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(157, 184, 255, 0.08);
  border: 1px solid rgba(157, 184, 255, 0.3);
  padding: 7px 15px;
  border-radius: 20px;
  color: #a0b2dc;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.sound-toggle-btn:hover {
  background: rgba(157, 184, 255, 0.18);
  color: var(--light);
  border-color: var(--secondary);
}

.sound-toggle-btn.sound-on {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(157, 184, 255, 0.2));
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
}

.sound-toggle-btn i {
  font-size: 0.88rem;
}

.mobile-menu {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* =============================================
   FIX #4: Notification bar — offset below header
   ============================================= */
#notification-bar {
  position: fixed;
  top: var(--header-height);
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  width: 90%;
  max-width: 600px;
  padding: 15px 25px;
  border-radius: 0 0 10px 10px;
  color: var(--light);
  text-align: center;
  font-weight: 600;
  z-index: 99; /* Below header (100) but above content */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s ease-in-out,
    transform 0.4s ease-in-out;
}

#notification-bar.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

#notification-bar.error {
  background-color: var(--danger);
  border: 1px solid rgba(255, 77, 77, 0.7);
}

#notification-bar.success {
  background-color: var(--success);
  border: 1px solid rgba(76, 175, 80, 0.7);
}

#notification-bar i {
  margin-right: 10px;
}

/* =============================================
   HERO SECTION WITH SLIDESHOW
   ============================================= */
#hero {
  position: relative;
  min-height: calc(90svh - var(--header-height)); /* FIX #12: use svh */
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  padding: 80px 5% 60px;
}

/* Slideshow container */
.hero-slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: brightness(0.7) blur(0.5px);
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  will-change: opacity;
}

.slide.active {
  opacity: 1;
}

/* Hero content styling */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  width: 100%;
  padding: 30px 20px;
  border-radius: 15px;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 15px;
  color: var(--light);
  text-shadow:
    0 0 10px rgba(0, 0, 0, 0.9),
    0 0 12px rgba(157, 184, 255, 0.6);
  animation: fadeInDown 1s ease-out;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: #ccc;
  line-height: 1.6;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
  animation: fadeInUp 1s ease-out 0.3s backwards;
}

/* Slideshow controls */
.slideshow-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}

.slideshow-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(245, 245, 245, 0.35);
  border: 2px solid rgba(245, 245, 245, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.slideshow-dot:hover {
  background-color: rgba(245, 245, 245, 0.7);
  border-color: var(--light);
  transform: scale(1.25);
}

.slideshow-dot.active {
  background-color: var(--light);
  border-color: var(--light);
  box-shadow:
    0 0 10px rgba(245, 245, 245, 0.95),
    0 0 20px rgba(245, 245, 245, 0.5);
  transform: scale(1.2);
}

/* =============================================
   SEARCH BAR & REALM SCRYING INPUT
   ============================================= */
.search-bar-container {
  margin: 32px 0 26px;
  animation: fadeIn 1s ease-out 0.6s backwards;
  display: flex;
  justify-content: center;
}

.search-input-group {
  position: relative;
  width: 100%;
  max-width: 540px;
}

.search-rune-glow {
  position: absolute;
  inset: -2px;
  border-radius: 50px;
  background: linear-gradient(
    90deg,
    rgba(168, 85, 247, 0.45) 0%,
    rgba(157, 184, 255, 0.55) 50%,
    rgba(168, 85, 247, 0.45) 100%
  );
  filter: blur(8px);
  opacity: 0.35;
  transition: opacity 0.35s ease, filter 0.35s ease;
  pointer-events: none;
  z-index: 0;
}

.search-input-group:focus-within .search-rune-glow {
  opacity: 0.85;
  filter: blur(14px);
}

#search-input {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 16px 52px 16px 24px;
  border: 1.5px solid rgba(168, 85, 247, 0.5);
  border-radius: 50px;
  background-color: rgba(13, 17, 32, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--light);
  font-size: 1.05rem;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.5),
    inset 0 0 15px rgba(168, 85, 247, 0.08);
  transition: all 0.3s ease;
}

#search-input::placeholder {
  color: #929bb4;
  font-style: italic;
  letter-spacing: 0.01em;
}

#search-input:focus {
  border-color: var(--secondary);
  background-color: rgba(16, 20, 38, 0.96);
  outline: none;
  box-shadow:
    0 0 25px rgba(157, 184, 255, 0.5),
    inset 0 0 15px rgba(157, 184, 255, 0.15);
}

.search-icon {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary);
  font-size: 1.15rem;
  pointer-events: none;
  z-index: 2;
  transition: color 0.3s ease, transform 0.3s ease;
}

.search-input-group:focus-within .search-icon {
  color: var(--primary);
  transform: translateY(-50%) scale(1.15);
}

/* =============================================
   HERO BUTTON — FIX #5: removed ml-2 dependency
   ============================================= */
.hero-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.95), rgba(126, 34, 206, 0.95));
  color: var(--darker);
  padding: 13px 32px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow:
    0 5px 22px rgba(168, 85, 247, 0.45),
    0 0 10px rgba(168, 85, 247, 0.25);
  border: 1.5px solid rgba(233, 213, 255, 0.6);
  position: relative;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 5px;
}

.hero-teleport-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(157, 184, 255, 0.16), rgba(98, 70, 234, 0.28));
  border: 1.5px solid rgba(157, 184, 255, 0.55);
  border-radius: 50px;
  padding: 13px 28px;
  color: var(--light);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 0 15px rgba(157, 184, 255, 0.3);
  transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-teleport-btn:hover {
  background: linear-gradient(135deg, rgba(157, 184, 255, 0.35), rgba(168, 85, 247, 0.3));
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-3px) scale(1.03);
  box-shadow:
    0 8px 30px rgba(157, 184, 255, 0.55),
    0 0 25px rgba(168, 85, 247, 0.45);
}

.teleport-btn-icon {
  width: 22px;
  height: 22px;
  animation: portalSpin 10s linear infinite;
  filter: drop-shadow(0 0 6px rgba(157, 184, 255, 0.8));
  transition: transform 0.3s ease;
}

.hero-teleport-btn:hover .teleport-btn-icon {
  animation-duration: 3s;
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.9));
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* =============================================
   PAGINATION
   ============================================= */
.pagination-container {
  margin: 40px auto;
  text-align: center;
  padding: 0 5%;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.page-btn {
  padding: 12px 25px;
  background: linear-gradient(90deg, var(--primary), #c084fc);
  color: var(--darker);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.page-btn:hover:not(:disabled) {
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(157, 184, 255, 0.6);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--gray);
}

.page-numbers {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.page-number {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--card-bg);
  border: 2px solid var(--gray);
  color: var(--light);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
}

.page-number:hover {
  border-color: var(--secondary);
  background-color: rgba(157, 184, 255, 0.1);
  transform: translateY(-2px);
}

.page-number.active {
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  border-color: transparent;
  color: var(--dark);
  box-shadow: 0 0 15px rgba(157, 184, 255, 0.5);
}

.page-dots {
  color: var(--secondary);
  font-size: 1.2rem;
  font-weight: bold;
  padding: 0 10px;
}

.page-info {
  color: #aaa;
  font-size: 0.95rem;
  margin-top: 10px;
}

/* =============================================
   GENERAL SECTION STYLING
   ============================================= */
.content-section {
  padding: 80px 5%;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}

.content-section h2 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 28px;
  position: relative;
  display: inline-block;
  padding-bottom: 22px;
  text-shadow: 0 0 16px rgba(168, 85, 247, 0.35);
}

.content-section h2::before {
  content: "";
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  max-width: 90%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(168, 85, 247, 0.35) 20%,
    var(--primary) 50%,
    rgba(168, 85, 247, 0.35) 80%,
    transparent 100%
  );
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}

.content-section h2::after {
  content: "❖";
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  color: var(--secondary);
  background: var(--dark);
  padding: 0 10px;
  line-height: 1;
  text-shadow:
    0 0 8px var(--secondary),
    0 0 16px rgba(168, 85, 247, 0.8);
  z-index: 2;
}

.realm-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 35px auto;
  max-width: 500px;
  width: 80%;
}

.realm-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(168, 85, 247, 0.4),
    rgba(157, 184, 255, 0.3),
    transparent
  );
}

.realm-divider-crest {
  color: var(--primary);
  font-size: 0.9rem;
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.8);
}

.content-section p {
  font-size: 1.1rem;
  color: #bbb;
  line-height: 1.8;
  margin-bottom: 15px;
  text-align: left;
}

/* =============================================
   ABOUT SECTION
   ============================================= */
#about .about-container {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-top: 40px;
  text-align: left;
}

#about .about-text {
  flex: 2;
}

/* =============================================
   CONTACT SECTION — FIX #10: submit loading state
   ============================================= */
#contact form {
  max-width: 600px;
  margin: 30px auto 0;
  padding: 30px;
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  text-align: left;
}

#contact label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--secondary);
}

#contact input,
#contact textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--gray);
  background-color: var(--dark);
  color: var(--light);
  border-radius: 6px;
  transition: border-color 0.3s;
  font-size: 1rem;
}

#contact input:focus,
#contact textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 5px rgba(168, 85, 247, 0.5);
}

#contact button[type="submit"] {
  display: block;
  width: 100%;
  padding: 15px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border: none;
  color: var(--dark);
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

#contact button[type="submit"]:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

#contact button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Loading state: hide text, show loader */
#contact button[type="submit"] .btn-loader {
  display: none;
}

#contact button[type="submit"].loading .btn-text {
  display: none;
}

#contact button[type="submit"].loading .btn-loader {
  display: inline;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  background-color: var(--darker);
  padding: 50px 5% 35px;
  border-top: 1px solid rgba(168, 85, 247, 0.25);
  box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);
  text-align: center;
  position: relative;
  z-index: 2;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  text-align: left;
  gap: 20px;
}

.footer-col {
  flex: 1;
  min-width: 200px;
  margin: 10px 0;
}

.footer-col h4 {
  font-size: 1.2rem;
  color: var(--secondary);
  margin-bottom: 15px;
  letter-spacing: 0.03em;
}

.footer-col a,
.footer-link-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.95rem;
  color: #ccc;
  text-decoration: none;
  margin-bottom: 10px;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.footer-col a:hover,
.footer-link-btn:hover {
  color: var(--primary);
  transform: translateX(4px);
}

.footer-link-btn i {
  color: var(--primary);
  font-size: 0.85rem;
}

/* Share the Realm Footer Column */
.share-realm-col {
  min-width: 240px;
}

.share-realm-desc {
  color: #a0a6b8;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 14px;
}

.share-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 240px;
  padding: 11px 18px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(157, 184, 255, 0.15));
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: 8px;
  color: var(--primary);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.share-link-btn i {
  font-size: 0.95rem;
  transition: transform 0.3s ease;
}

.share-link-btn:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--darker);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.4);
}

.share-link-btn:hover i {
  transform: rotate(-45deg);
}

.share-link-btn.copied {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
  box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
}

.bookmark-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.82rem;
  color: #8892b0;
}

.bookmark-tip i {
  color: var(--secondary);
  font-size: 0.85rem;
}

.bookmark-tip kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--light);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.footer-bottom {
  margin-top: 35px;
  padding-top: 22px;
  border-top: 1px solid rgba(168, 85, 247, 0.2);
  font-size: 0.9rem;
  color: #888;
  text-align: center;
}

/* =============================================
   FIX #7: Sticky filter bar
   ============================================= */
#categories {
  padding: 0;
  max-width: unset;
  position: sticky;
  top: var(--header-height);
  z-index: 90;
}

.filter-bar {
  padding: 14px 5%;
  background-color: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  overflow-x: auto;
  white-space: nowrap;
  border-bottom: 1px solid var(--gray);
}

.filter-button {
  background: none;
  border: 2px solid var(--gray);
  color: var(--light);
  padding: 8px 15px;
  margin: 0 5px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.filter-button:hover,
.filter-button.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--darker);
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(168, 85, 247, 0.5);
}

.filter-teleport-pill {
  background: linear-gradient(135deg, rgba(157, 184, 255, 0.2), rgba(168, 85, 247, 0.15));
  border-color: rgba(157, 184, 255, 0.5);
  color: var(--secondary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.filter-teleport-pill:hover {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: var(--darker);
  border-color: transparent;
  box-shadow: 0 0 15px rgba(157, 184, 255, 0.6);
}

.teleport-pill-icon {
  width: 15px;
  height: 15px;
  animation: portalSpin 8s linear infinite;
}

.filter-teleport-pill:hover .teleport-pill-icon {
  animation-duration: 2.5s;
}

/* =============================================
   GALLERY
   ============================================= */
.wallpaper-gallery {
  padding: 30px 5%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  position: relative;
  z-index: 2;
}

/* FIX #2: Skeleton loader cards */
.skeleton-card {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: linear-gradient(
    90deg,
    var(--card-bg) 25%,
    #22283a 50%,
    var(--card-bg) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border: 1px solid rgba(157, 184, 255, 0.1);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.wallpaper-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background-color: var(--card-bg);
  border: 1px solid rgba(157, 184, 255, 0.15);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transform: perspective(900px) rotateX(0deg) rotateY(0deg) translateY(0);
  transition:
    transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.wallpaper-card:hover {
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.75),
    0 0 20px rgba(168, 85, 247, 0.3);
}

.wallpaper-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.wallpaper-card:hover img {
  transform: scale(1.06);
}

/* 3D Glare overlay */
.card-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 14px;
  background: radial-gradient(
    circle 260px at var(--glare-x, 50%) var(--glare-y, 50%),
    rgba(255, 255, 255, 0.22) 0%,
    rgba(168, 85, 247, 0.12) 35%,
    transparent 75%
  );
  opacity: var(--glare-opacity, 0);
  transition: opacity 0.25s ease;
  mix-blend-mode: screen;
  z-index: 2;
}

/* Runic Corner Accents */
.card-runic-corners {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.rune-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  opacity: 0.55;
  transition: all 0.3s ease;
}

.rune-tl {
  top: 7px;
  left: 7px;
  border-top: 2px solid rgba(168, 85, 247, 0.65);
  border-left: 2px solid rgba(168, 85, 247, 0.65);
  border-top-left-radius: 2px;
}

.rune-tr {
  top: 7px;
  right: 7px;
  border-top: 2px solid rgba(168, 85, 247, 0.65);
  border-right: 2px solid rgba(168, 85, 247, 0.65);
  border-top-right-radius: 2px;
}

.rune-bl {
  bottom: 7px;
  left: 7px;
  border-bottom: 2px solid rgba(168, 85, 247, 0.65);
  border-left: 2px solid rgba(168, 85, 247, 0.65);
  border-bottom-left-radius: 2px;
}

.rune-br {
  bottom: 7px;
  right: 7px;
  border-bottom: 2px solid rgba(168, 85, 247, 0.65);
  border-right: 2px solid rgba(168, 85, 247, 0.65);
  border-bottom-right-radius: 2px;
}

.wallpaper-card:hover .rune-corner {
  opacity: 1;
  border-color: var(--primary);
  filter: drop-shadow(0 0 5px var(--primary));
  width: 12px;
  height: 12px;
}

/* FIX #1: Always show condensed title bar; full overlay on hover */
.card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(7, 10, 22, 0.95) 0%,
    rgba(16, 20, 38, 0.8) 65%,
    transparent 100%
  );
  padding: 16px 14px 12px;
  color: var(--light);
  transition: padding 0.3s ease;
  z-index: 2;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* Condensed state: only title line visible */
.card-info .card-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-info h3 {
  font-size: 0.95rem;
  color: var(--secondary);
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 75%;
}

/* Stats hidden by default, visible on hover */
.card-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #ccc;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

.wallpaper-card:hover .card-stats,
.wallpaper-card:focus-within .card-stats {
  max-height: 30px;
  opacity: 1;
  margin-top: 6px;
}

.card-stats span i {
  margin-right: 4px;
}

/* FIX #6: Empty / no-results state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #888;
}

.empty-state i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 16px;
  display: block;
}

.empty-state h3 {
  font-size: 1.4rem;
  color: #bbb;
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 1rem;
  color: #777;
  text-align: center;
  margin-bottom: 20px;
}

.empty-state button {
  padding: 10px 24px;
  background: var(--primary);
  color: var(--darker);
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
}

.empty-state button:hover {
  background: var(--secondary);
  color: var(--dark);
  transform: translateY(-2px);
}

/* =============================================
   MODAL
   ============================================= */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.open {
  display: flex;
}

.modal-content {
  background-color: var(--card-bg);
  border-radius: 12px;
  width: 90%;
  max-width: 1100px;
  height: 90vh;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: row;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--light);
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.4s ease-in-out;
  z-index: 1010;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

.modal-close:hover {
  color: var(--darker);
  background-color: var(--primary);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 15px var(--primary);
}

/* =============================================
   ICON CREDITS — footer trigger + popup
   ============================================= */
.credits-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 14px;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 50px;
  color: var(--primary);
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.credits-trigger:hover {
  background: var(--primary);
  color: var(--darker);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.45);
  transform: translateY(-2px);
}

.credits-modal {
  background-color: rgba(4, 6, 14, 0.85);
  z-index: 1050;
  padding: 20px;
}

.credits-card {
  position: relative;
  background: linear-gradient(160deg, var(--card-bg), var(--darker));
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: 14px;
  max-width: 420px;
  width: 100%;
  padding: 36px 32px 32px;
  text-align: center;
  box-shadow:
    0 15px 40px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(168, 85, 247, 0.15);
  animation: fadeInUp 0.35s ease-out;
}

.credits-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.35));
}

.credits-card h2 {
  font-family: "Cinzel", Georgia, serif;
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.credits-card p {
  color: #ccc;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 10px;
}

.credits-card p a {
  color: var(--secondary);
  text-decoration: underline dotted;
  transition: var(--transition);
}

.credits-card p a:hover {
  color: var(--primary);
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}

.credits-attribution {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(168, 85, 247, 0.3);
  font-size: 0.9rem;
}

.credits-attribution a {
  color: var(--primary);
  font-weight: 600;
}

/* =============================================
   REALM POPUPS (FAQ & PRIVACY POLICY)
   ============================================= */
.realm-popup-modal {
  background-color: rgba(4, 6, 14, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1050;
  padding: 20px;
}

.realm-popup-card {
  position: relative;
  background: linear-gradient(160deg, var(--card-bg) 0%, var(--darker) 100%);
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: 16px;
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 36px 32px 30px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.75),
    0 0 30px rgba(168, 85, 247, 0.15);
  animation: fadeInUp 0.35s ease-out;
}

.realm-popup-header {
  text-align: center;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.25);
  margin-bottom: 20px;
  flex-shrink: 0;
}

.realm-popup-icon {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 10px;
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.6));
}

.realm-popup-header h2 {
  font-family: "Cinzel", Georgia, serif;
  color: var(--primary);
  font-size: 1.6rem;
  letter-spacing: 0.03em;
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
  margin-bottom: 6px;
}

.realm-popup-subtitle {
  color: var(--secondary);
  font-size: 0.9rem;
  font-style: italic;
  opacity: 0.9;
}

.realm-popup-content {
  overflow-y: auto;
  padding-right: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) rgba(255, 255, 255, 0.05);
}

.realm-popup-content::-webkit-scrollbar {
  width: 6px;
}

.realm-popup-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.realm-popup-content::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

/* FAQ items */
.faq-item {
  background: rgba(16, 20, 38, 0.7);
  border: 1px solid rgba(157, 184, 255, 0.15);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 14px;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(16, 20, 38, 0.95);
  transform: translateY(-1px);
}

.faq-question {
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.05rem;
  color: var(--light);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.faq-question i {
  color: var(--primary);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.faq-answer {
  color: #bbb;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Privacy sections */
.privacy-section {
  background: rgba(16, 20, 38, 0.7);
  border: 1px solid rgba(157, 184, 255, 0.15);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 14px;
  transition: var(--transition);
}

.privacy-section:hover {
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(16, 20, 38, 0.95);
  transform: translateY(-1px);
}

.privacy-section h3 {
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.05rem;
  color: var(--light);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.privacy-section h3 i {
  color: var(--primary);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.privacy-section p {
  color: #bbb;
  font-size: 0.92rem;
  line-height: 1.6;
}

.popup-inline-link {
  color: var(--secondary);
  text-decoration: underline dotted;
  transition: var(--transition);
}

.popup-inline-link:hover {
  color: var(--primary);
}

.modal-body {
  display: flex;
  width: 100%;
  height: 100%;
}

.modal-image-container {
  flex: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 55px 20px 20px;
  background-color: rgba(7, 10, 22, 0.65);
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  min-width: 50%;
  position: relative;
  overflow: hidden;
}

/* Screen Preview Mode Bar */
.modal-view-mode-bar {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 20, 38, 0.88);
  border: 1px solid rgba(157, 184, 255, 0.35);
  padding: 4px 6px;
  border-radius: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.view-mode-btn {
  background: none;
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  color: #9db8ff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.view-mode-btn:hover {
  color: var(--light);
  background-color: rgba(255, 255, 255, 0.08);
}

.view-mode-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--darker);
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.5);
}

/* Modal Preview Stage */
.modal-preview-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-preview-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.6);
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Clean Canvas Mode */
.modal-preview-stage.mode-canvas .mockup-overlay {
  display: none !important;
}

/* Desktop Mockup Mode */
.modal-preview-stage.mode-desktop {
  width: 95%;
  height: 90%;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.85), 0 0 0 2px rgba(157, 184, 255, 0.3);
}

.modal-preview-stage.mode-desktop img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 10px;
  clip-path: inset(0 round 10px);
}

.modal-preview-stage.mode-desktop .mockup-desktop {
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  clip-path: inset(0 round 10px);
}

.modal-preview-stage.mode-desktop .mockup-menubar {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

/* Mobile Mockup Mode */
.modal-preview-stage.mode-mobile {
  width: 275px;
  height: 96%;
  max-height: 520px;
  border-radius: 38px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 0 0 8px #131726,
    0 0 0 10px rgba(157, 184, 255, 0.35),
    0 20px 45px rgba(0, 0, 0, 0.9);
}

.modal-preview-stage.mode-mobile img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 38px;
  clip-path: inset(0 round 38px);
}

.modal-preview-stage.mode-mobile .mockup-mobile {
  display: flex;
  border-radius: 38px;
  overflow: hidden;
  clip-path: inset(0 round 38px);
}

/* Overlays Common */
.mockup-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: none;
  flex-direction: column;
  z-index: 5;
}

/* Desktop Menubar & Dock */
.mockup-desktop {
  justify-content: space-between;
  padding: 0;
}

.mockup-menubar {
  height: 26px;
  background: rgba(10, 14, 26, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  font-size: 0.72rem;
  color: #e5eaf8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mockup-menu-left,
.mockup-menu-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mockup-apple {
  color: var(--primary);
  font-size: 0.82rem;
}

.mockup-menu-item {
  font-weight: 500;
  opacity: 0.9;
}

.mockup-menu-icon {
  font-size: 0.72rem;
  opacity: 0.85;
}

.mockup-clock {
  font-weight: 600;
  font-size: 0.75rem;
  color: #fff;
}

.mockup-desktop-icons {
  position: absolute;
  top: 38px;
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.desktop-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 58px;
  text-align: center;
}

.desktop-shortcut i {
  font-size: 1.6rem;
  color: var(--secondary);
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.7));
}

.desktop-shortcut span {
  font-size: 0.65rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
  background: rgba(0, 0, 0, 0.45);
  padding: 1px 4px;
  border-radius: 4px;
}

.mockup-dock {
  align-self: center;
  margin-bottom: 10px;
  height: 42px;
  background: rgba(14, 18, 34, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.dock-app {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.dock-finder { background: linear-gradient(135deg, #2b7af0, #1952a8); }
.dock-term { background: linear-gradient(135deg, #2a2d36, #11141b); }
.dock-folder { background: linear-gradient(135deg, #a855f7, #7e22ce); }
.dock-music { background: linear-gradient(135deg, #ff4d6d, #d11a43); }
.dock-sliders { background: linear-gradient(135deg, #7b52f0, #4f27bd); }

/* Mobile Lockscreen Mockup */
.mockup-mobile-bezel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 14px 12px;
  position: relative;
}

.mockup-mobile-dynamic-island {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 18px;
  background: #000;
  border-radius: 12px;
  z-index: 10;
}

.mockup-mobile-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  padding: 2px 6px 0;
  z-index: 8;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.mockup-mobile-status-icons {
  display: flex;
  gap: 5px;
  font-size: 0.68rem;
}

.mockup-mobile-lock-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 18px;
  text-align: center;
}

.mockup-mobile-lock-icon {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 4px;
}

.mockup-mobile-date {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.mockup-mobile-clock {
  font-size: 2.8rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  margin-bottom: 18px;
}

.mockup-mobile-notification {
  background: rgba(16, 20, 38, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 8px 10px;
  width: 92%;
  text-align: left;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 3px;
}

.notif-badge i {
  color: var(--primary);
  margin-right: 3px;
}

.notif-time {
  color: #8892b0;
  font-weight: normal;
}

.notif-body {
  font-size: 0.68rem;
  color: #eaeefc;
  line-height: 1.3;
}

.mockup-mobile-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px 4px;
}

.mockup-circle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(14, 18, 34, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.mockup-home-indicator {
  width: 80px;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 3px;
}

/* Realm Essences (Palette) */
.realm-essences-wrapper {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(168, 85, 247, 0.2);
}

.realm-essences-palette {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.essence-chip {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: monospace;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.essence-chip:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
}

.essence-placeholder,
.essence-extracting {
  font-size: 0.82rem;
  color: #8892b0;
  font-style: italic;
}

/* Portal Warp Dimensional Overlay */
.portal-warp-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: radial-gradient(circle at center, rgba(16, 20, 38, 0.88) 0%, rgba(4, 6, 14, 0.97) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.portal-warp-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.warp-portal-core {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.warp-portal-emblem {
  position: relative;
  width: 250px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.warp-ring {
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: 50%;
  pointer-events: none;
  transform-origin: center center;
}

.ring-1 {
  width: 140px;
  height: 140px;
  border: 2px dashed rgba(168, 85, 247, 0.65);
  animation: portalSpin 6s linear infinite;
}

.ring-2 {
  width: 190px;
  height: 190px;
  border: 2px dashed rgba(157, 184, 255, 0.55);
  animation: portalSpinRev 9s linear infinite;
}

.ring-3 {
  width: 240px;
  height: 240px;
  border: 1.5px dotted rgba(168, 85, 247, 0.4);
  animation: portalSpin 14s linear infinite;
}

@keyframes portalSpinRev {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

.warp-crest {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 72px;
  height: 72px;
  animation: portalSpin 3s linear infinite;
  filter: drop-shadow(0 0 16px var(--primary)) drop-shadow(0 0 30px var(--secondary));
  z-index: 2;
  transform-origin: center center;
}

.warp-label {
  font-family: "Cinzel", Georgia, serif;
  color: var(--primary);
  font-size: 1.5rem;
  margin-top: 24px;
  letter-spacing: 0.08em;
  text-shadow: 0 0 15px rgba(168, 85, 247, 0.6);
  z-index: 2;
}

.warp-subtext {
  color: #a0a8c0;
  font-size: 0.92rem;
  margin-top: 6px;
  z-index: 2;
}

.modal-details {
  flex: 1;
  padding: 30px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.scrollable-info {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 15px;
  margin-bottom: 20px;
}

.modal-details h2 {
  font-size: 1.8rem;
  color: var(--secondary);
  margin-bottom: 15px;
}

.modal-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 20px;
  margin-bottom: 10px;
}

.modal-meta > div {
  padding: 12px;
  background-color: var(--darker);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: 0 0 5px rgba(168, 85, 247, 0.2);
  border: 1px solid var(--gray);
  transition: var(--transition);
}

.modal-meta > div:hover {
  border-color: var(--secondary);
  box-shadow: 0 0 10px rgba(157, 184, 255, 0.4);
  transform: translateY(-1px);
}

.meta-label {
  font-size: 0.8rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.meta-label i {
  margin-right: 5px;
  color: var(--primary);
  font-size: 1.1rem;
}

.modal-meta span {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--secondary);
}

/* FIX #8: Modal action buttons with labels */
.modal-actions {
  flex-shrink: 0;
  display: flex;
  gap: 25px;
  justify-content: center;
  padding-top: 20px;
}

.action-button-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.action-label {
  font-size: 0.75rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  transition: color 0.3s;
}

.action-button-wrapper:hover .action-label {
  color: var(--secondary);
}

.action-button {
  width: 60px;
  height: 60px;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-weight: 700;
  position: relative;
  overflow: hidden;
  z-index: 1;
  font-size: 1.5rem;
}

.like-button {
  background-color: transparent;
  border: 3px solid var(--danger);
  color: var(--danger);
  box-shadow: 0 0 15px rgba(255, 77, 77, 0.3);
}

.like-button:hover {
  color: var(--light);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 5px 20px rgba(255, 77, 77, 0.7);
  background-color: var(--danger);
}

/* FIX #8: Pulse animation on liked state */
.like-button.liked {
  background-color: rgba(255, 77, 77, 0.1);
  animation: heartPulse 0.4s ease;
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.like-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 77, 77, 0.3),
    transparent
  );
  transition: all 0.4s ease-in-out;
  z-index: -1;
}

.like-button:hover::before {
  left: 100%;
}

.download-button {
  background: linear-gradient(45deg, var(--primary), #c084fc);
  color: var(--darker);
  border: 3px solid transparent;
  box-shadow: 0 5px 20px rgba(168, 85, 247, 0.5);
  background-size: 200% auto;
}

.download-button.downloaded {
  background: linear-gradient(45deg, var(--success), #66bb6a);
  color: var(--darker);
}

.download-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.55);
  background-position: right center;
}

.download-button i {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); opacity: 0.9; }
  100% { transform: scale(1); }
}

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

/* --- Large Tablets & Small Desktops (max 1024px) --- */
@media (max-width: 1024px) {
  .wallpaper-gallery {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
  }

  .modal-content {
    width: 95%;
    max-width: 95%;
  }

  .hero-content h1 {
    font-size: 3rem;
  }
}

/* --- Tablets (max 900px) --- */
@media (max-width: 900px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .search-input-group {
    max-width: 420px;
  }

  #about .about-container {
    flex-direction: column;
    gap: 24px;
  }

  #about .about-text {
    order: 2;
  }

  .footer-content {
    justify-content: center;
    text-align: center;
  }

  .footer-col {
    min-width: 45%;
    flex: unset;
    margin-bottom: 20px;
    text-align: center;
  }

  .footer-col a {
    display: inline-block;
    margin: 0 8px 8px 8px;
  }

  .social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .page-btn {
    padding: 10px 15px;
    font-size: 0.9rem;
  }

  .page-number {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  .modal-meta {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- Mobile (max 768px) --- */
@media (max-width: 768px) {
  header {
    padding: 0 5%;
  }

  .logo {
    font-size: 1.5rem;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--dark);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
    z-index: 99;
    padding: 0;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
    margin: 0;
  }

  .nav-links a {
    margin: 0;
    padding: 14px 20px;
    border-bottom: 1px solid var(--gray);
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  .submit-button a {
    border-radius: 0;
    display: block;
    padding: 14px 20px;
  }

  .mobile-menu {
    display: block;
  }

  #hero {
    min-height: calc(80svh - var(--header-height));
    padding: 70px 5% 50px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }

  .hero-button {
    font-size: 1rem;
    padding: 10px 24px;
  }

  .search-input-group {
    max-width: 100%;
  }

  #search-input {
    font-size: 0.95rem;
    padding: 12px 45px 12px 16px;
  }

  .content-section {
    padding: 50px 5%;
  }

  .content-section h2 {
    font-size: 2rem;
  }

  .content-section p {
    font-size: 1rem;
  }

  .wallpaper-gallery {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    padding: 20px 4%;
  }

  .filter-bar {
    padding: 12px 4%;
  }

  #contact form {
    padding: 20px 15px;
    margin: 20px auto 0;
  }

  .footer-col {
    min-width: 100%;
    text-align: center;
  }

  .slideshow-controls {
    bottom: 15px;
  }

  .pagination {
    gap: 8px;
    flex-wrap: wrap;
  }

  .page-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .page-number {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  .page-info {
    font-size: 0.82rem;
    padding: 0 10px;
    text-align: center;
  }

  /* Modal - stack vertically */
  .modal-content {
    flex-direction: column;
    width: 96%;
    height: 94vh;
    max-height: 94vh;
    overflow: hidden;
    border-radius: 12px;
  }

  .modal-body {
    flex-direction: column;
    height: 100%;
    overflow: hidden;
  }

  .modal-image-container {
    height: 48%;
    flex: none;
    flex-shrink: 0;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    border-bottom-left-radius: 0;
    padding: 42px 10px 10px;
    min-width: unset;
  }

  .modal-view-mode-bar {
    top: 8px;
    padding: 3px 4px;
    gap: 3px;
  }

  .view-mode-btn {
    padding: 4px 9px;
    font-size: 0.74rem;
    gap: 4px;
  }

  .modal-image-container img {
    max-height: 100%;
    width: auto;
    max-width: 100%;
  }

  .modal-details {
    flex: 1;
    padding: 16px;
    overflow: hidden;
    min-height: 0;
  }

  .scrollable-info {
    padding-right: 8px;
  }

  .modal-details h2 {
    font-size: 1.4rem;
  }

  .modal-meta {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
  }

  .action-button {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
  }

  .modal-actions {
    padding-top: 14px;
    gap: 20px;
  }
}

/* --- Small Mobile (max 480px) --- */
@media (max-width: 480px) {
  .sound-toggle-label {
    display: none;
  }

  .sound-toggle-btn {
    padding: 6px 11px;
  }

  #hero {
    min-height: calc(100svh - var(--header-height));
    padding: 65px 4% 40px;
  }

  .hero-content {
    padding: 20px 10px;
  }

  .hero-content h1 {
    font-size: 1.7rem;
    line-height: 1.3;
  }

  .hero-content p {
    font-size: 0.875rem;
    line-height: 1.6;
  }

  .search-bar-container {
    margin: 20px 0;
  }

  #search-input {
    font-size: 0.875rem;
    padding: 11px 42px 11px 14px;
  }

  .search-icon {
    font-size: 1rem;
    right: 14px;
  }

  .hero-button {
    font-size: 0.9rem;
    padding: 10px 20px;
  }

  .slideshow-controls {
    gap: 8px;
    bottom: 12px;
  }

  .slideshow-dot {
    width: 9px;
    height: 9px;
  }

  .wallpaper-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 15px 3%;
  }

  .content-section {
    padding: 40px 4%;
  }

  .content-section h2 {
    font-size: 1.7rem;
  }

  .filter-bar {
    padding: 10px 3%;
  }

  .filter-button {
    padding: 6px 11px;
    font-size: 0.78rem;
    margin: 0 3px;
  }

  #contact form {
    padding: 16px 12px;
    border-radius: 10px;
  }

  #contact input,
  #contact textarea {
    font-size: 0.9rem;
  }

  .pagination {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  .page-numbers {
    order: 2;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  .page-btn {
    order: 1;
    padding: 9px 18px;
    font-size: 0.85rem;
    min-width: 110px;
    justify-content: center;
  }

  .page-btn:last-of-type {
    order: 3;
  }

  .page-number {
    width: 34px;
    height: 34px;
    font-size: 0.82rem;
  }

  .modal-content {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .modal-image-container {
    height: 38%;
    border-radius: 0;
  }

  .modal-details {
    padding: 12px;
  }

  .modal-details h2 {
    font-size: 1.2rem;
    margin-bottom: 8px;
  }

  .modal-meta {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
  }

  .modal-meta > div {
    padding: 9px;
  }

  .meta-label {
    font-size: 0.68rem;
  }

  .modal-meta span {
    font-size: 0.95rem;
  }

  .modal-actions {
    padding-top: 10px;
    gap: 18px;
  }

  .action-button {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }

  .modal-close {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
}

/* --- Very Small Mobile (max 360px) --- */
@media (max-width: 360px) {
  .hero-content h1 {
    font-size: 1.45rem;
  }

  .wallpaper-gallery {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 3%;
  }

  .filter-button {
    padding: 5px 9px;
    font-size: 0.75rem;
  }
}

/* --- Landscape Mobile --- */
@media (max-height: 500px) and (orientation: landscape) {
  #hero {
    min-height: unset;
    height: auto;
    padding: 80px 5% 40px;
  }

  .hero-content h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
  }

  .hero-content p {
    font-size: 0.875rem;
    margin-bottom: 14px;
  }

  .search-bar-container {
    margin: 14px 0;
  }

  .slideshow-controls {
    bottom: 8px;
  }

  .modal-content {
    flex-direction: row;
    height: 96vh;
  }

  .modal-body {
    flex-direction: row;
    height: 100%;
  }

  .modal-image-container {
    height: 100%;
    flex: 2;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    border-top-right-radius: 0;
  }

  .modal-details {
    flex: 1;
    overflow: hidden;
  }
}

/* --- Mobile optimizations for Realm Popups & Badges --- */
@media (max-width: 600px) {
  .realm-popup-card {
    padding: 28px 16px 20px;
    max-height: 90vh;
  }
  .realm-popup-header h2 {
    font-size: 1.35rem;
  }
  .faq-item,
  .privacy-section {
    padding: 12px 14px;
    margin-bottom: 10px;
  }
  .share-realm-col {
    min-width: 100%;
  }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  .logo-mark {
    animation: none;
  }
}