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

/* Non-blocking hint toast (replaces the old full-screen rotate overlay) */
.rotate-alert {
  display: none;
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%) translateY(16px);
  max-width: 90vw;
  background: rgba(20, 20, 20, 0.92);
  z-index: 10000;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 10px 16px;
  border: 1px solid rgba(255, 180, 0, 0.6);
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.rotate-alert.visible {
  display: flex;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.rotate-alert-icon {
  font-size: 20px;
  margin: 0;
}

.rotate-alert-text {
  color: #ffd700;
  font-size: 13px;
  font-weight: bold;
  margin: 0;
}

/* sub line not used by the compact toast */
.rotate-alert-sub {
  display: none;
}

.orientation-toggle {
  display: none;
  position: fixed;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 180, 0, 0.95);
  border: 2px solid rgba(61, 28, 0, 0.85);
  cursor: pointer;
  z-index: 10001;
  font-size: 20px;
  color: #000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, background 0.2s ease;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.orientation-toggle:hover {
  transform: scale(1.1);
}

.orientation-toggle:active {
  transform: scale(0.95);
}

.orientation-toggle.visible {
  display: flex;
}

body {
  overflow: hidden;
  background: #3a6ea5;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  cursor: url('Cursor1.cur'), auto;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Desktop wallpaper layer - sits behind everything and is the only thing
   that gets blurred. Extends past the viewport so the blur has no edge gap.
   background-size: cover keeps the image aspect ratio and fills big screens. */
#desktop-bg {
  position: fixed;
  inset: -24px;
  z-index: -1;
  background-image: url('assets/bg.jpg');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: blur(var(--bg-blur, 0px));
  transition: filter 0.3s ease;
  pointer-events: none;
}

.xp-window {
  display: flex;
  flex-direction: column;
  border: 3px solid #0054e3;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  background: #ece9d8;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  transform-origin: center center;
  transition: transform 0.3s ease;
  will-change: transform;
  backface-visibility: hidden;
}

.xp-logo {
  position: absolute;
  top: 32px;
  left: -31px;
  z-index: 1;
  pointer-events: none;
  transform: scale(0.75);
  transform-origin: top left;
  -webkit-mask: radial-gradient(ellipse, black 30%, transparent 65%);
  mask: radial-gradient(ellipse, black 30%, transparent 65%);
}

.xp-titlebar {
  background:
    linear-gradient(180deg,
      #0e6dfb 0%, #2f8bff 4%, #1276f3 9%, #0a64ea 14%,
      #0a5ce3 22%, #0a57dd 45%, #0a55da 55%, #0b5ce2 80%,
      #1a6ef2 88%, #0c57dd 93%, #0a47cf 97%, #0a3cc2 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), inset 0 -1px 0 rgba(0,0,40,0.25);
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  overflow: hidden;
}

.xp-titlebar-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.xp-titlebar-text {
  flex: 1;
  color: white;
  font-family: 'Trebuchet MS', 'Segoe UI', Tahoma, sans-serif;
  font-size: 13px;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0,0,40,0.55);
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}

.xp-titlebar-scroll {
  display: inline-block;
  padding-left: 100%;
  animation: scrollTitleltr 12s linear infinite;
}

@keyframes scrollTitleltr {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes scrollTitlertl {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.xp-titlebar-buttons {
  display: flex;
  gap: 2px;
}

.xp-btn {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 3px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,40,0.5);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.6), inset 0 -2px 3px rgba(0,0,40,0.25);
}

.xp-minimize,
.xp-maximize {
  background:
    linear-gradient(180deg, #6fb2f7 0%, #2f86ec 10%, #1f6ed8 45%,
      #1a63cf 80%, #2f86ec 92%, #1351bd 100%);
}

.xp-close {
  background:
    linear-gradient(180deg, #f6b9a8 0%, #e8654a 9%, #db3f20 42%,
      #cf3417 80%, #ee7d63 92%, #c22f12 100%);
}

.xp-btn:hover {
  filter: brightness(1.2);
}

.xp-btn:active {
  filter: brightness(0.9);
}

.xp-menubar {
  background: #ece9d8;
  border-bottom: 1px solid #aca899;
  padding: 2px 4px;
  display: flex;
  gap: 2px;
  position: relative;
  z-index: 10;
}

.xp-menu-item {
  padding: 2px 8px;
  font-size: 11px;
  color: #000;
  cursor: pointer;
  border-radius: 2px;
}

.xp-menu-item:hover {
  background: #316ac5;
  color: white;
}

.xp-window-body {
  padding: 0;
  background: #000;
}

/* =========================================================================
   WINDOW STYLE THEMES
   Base chrome above = Windows XP (Luna). These blocks re-skin the same markup
   when the admin picks a style; JS sets data-os on .xp-window.
   ========================================================================= */

/* ---------- Windows 7 (Aero glass) ---------- */
.xp-window[data-os="win7"] {
  border: 1px solid #6f9fd0;
  border-radius: 8px 8px 0 0;
  background: #dceaf7;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.65), 0 10px 34px rgba(0,0,0,0.45);
}
.xp-window[data-os="win7"] .xp-titlebar {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(228,240,251,0.72) 46%, rgba(198,222,244,0.66) 50%, rgba(216,233,248,0.78) 100%),
    linear-gradient(180deg, #eef5fc, #d2e5f7);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), inset 0 -1px 0 rgba(130,170,210,0.45);
  border-bottom: 1px solid rgba(150,180,215,0.6);
  min-height: 30px;
}
.xp-window[data-os="win7"] .xp-titlebar-text {
  color: #11283f;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-weight: 600;
  text-shadow: 0 0 4px rgba(255,255,255,0.95), 0 0 9px rgba(255,255,255,0.8);
}
.xp-window[data-os="win7"] .xp-btn {
  width: 29px;
  height: 19px;
  border: 1px solid rgba(255,255,255,0.6);
  border-top: none;
  border-radius: 0 0 4px 4px;
  color: #0b2a4a;
  text-shadow: 0 1px 1px rgba(255,255,255,0.7);
  background: linear-gradient(180deg, rgba(255,255,255,0.7) 0%, rgba(214,232,248,0.45) 50%, rgba(190,217,243,0.5) 100%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.8);
}
.xp-window[data-os="win7"] .xp-close {
  width: 47px;
  color: #fff;
  text-shadow: 0 1px 1px rgba(120,0,0,0.6);
  background: linear-gradient(180deg, rgba(244,150,135,0.85) 0%, rgba(224,80,62,0.85) 50%, rgba(198,45,30,0.9) 100%);
}
.xp-window[data-os="win7"] .xp-btn:hover { filter: none; box-shadow: inset 0 0 10px rgba(130,200,255,0.85), inset 0 1px 1px rgba(255,255,255,0.9); }
.xp-window[data-os="win7"] .xp-close:hover { background: linear-gradient(180deg, #f7a18f, #d83a28); box-shadow: inset 0 0 10px rgba(255,150,130,0.9); }
.xp-window[data-os="win7"] .xp-menubar { background: #f3f8fd; border-bottom: 1px solid #cdd9e6; }
.xp-window[data-os="win7"] .xp-menu-item { color: #15314f; }
.xp-window[data-os="win7"] .xp-menu-item:hover { background: #d4e7fb; color: #0b2a4a; border: 1px solid #92c0f0; padding: 1px 7px; }

/* ---------- Windows 10 (flat) ---------- */
.xp-window[data-os="win10"] {
  border: 1px solid #b9b9b9;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.06), 0 12px 32px rgba(0,0,0,0.38);
}
.xp-window[data-os="win10"] .xp-titlebar {
  background: #ffffff;
  box-shadow: none;
  border-bottom: 1px solid #ededed;
  min-height: 32px;
  padding: 0 0 0 10px;
  gap: 8px;
}
.xp-window[data-os="win10"] .xp-titlebar-text {
  color: #000;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-weight: 400;
  font-size: 12px;
  text-shadow: none;
}
.xp-window[data-os="win10"] .xp-titlebar-buttons { gap: 0; align-self: stretch; }
.xp-window[data-os="win10"] .xp-btn {
  width: 46px;
  height: 32px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #1a1a1a;
  text-shadow: none;
  box-shadow: none;
  font-weight: 400;
}
.xp-window[data-os="win10"] .xp-btn:hover { background: #e5e5e5; filter: none; }
.xp-window[data-os="win10"] .xp-close:hover { background: #e81123; color: #fff; }
.xp-window[data-os="win10"] .xp-menubar { background: #fff; border-bottom: 1px solid #ededed; }
.xp-window[data-os="win10"] .xp-menu-item { color: #1a1a1a; border-radius: 0; }
.xp-window[data-os="win10"] .xp-menu-item:hover { background: #e5e5e5; color: #000; }
.xp-window[data-os="win10"] .xp-window-body { background: #fff; }

/* ---------- Windows 11 (rounded, Mica) ---------- */
.xp-window[data-os="win11"] {
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 10px;
  background: #f3f3f3;
  box-shadow: 0 16px 44px rgba(0,0,0,0.38);
}
.xp-window[data-os="win11"] .xp-titlebar {
  background: #f3f3f3;
  box-shadow: none;
  border-bottom: none;
  min-height: 34px;
  padding: 0 0 0 12px;
  gap: 10px;
}
.xp-window[data-os="win11"] .xp-titlebar-text {
  color: #1a1a1a;
  font-family: 'Segoe UI Variable Text', 'Segoe UI', Tahoma, sans-serif;
  font-weight: 400;
  font-size: 12px;
  text-shadow: none;
}
.xp-window[data-os="win11"] .xp-titlebar-buttons { gap: 0; align-self: stretch; }
.xp-window[data-os="win11"] .xp-btn {
  width: 46px;
  height: 34px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #1a1a1a;
  text-shadow: none;
  box-shadow: none;
  font-weight: 400;
}
.xp-window[data-os="win11"] .xp-btn:hover { background: rgba(0,0,0,0.06); filter: none; }
.xp-window[data-os="win11"] .xp-close:hover { background: #e81123; color: #fff; border-top-right-radius: 9px; }
.xp-window[data-os="win11"] .xp-menubar { background: #f3f3f3; border-bottom: 1px solid #e7e7e7; }
.xp-window[data-os="win11"] .xp-menu-item { color: #1a1a1a; border-radius: 4px; }
.xp-window[data-os="win11"] .xp-menu-item:hover { background: rgba(0,0,0,0.06); color: #1a1a1a; }
.xp-window[data-os="win11"] .xp-window-body { background: #f3f3f3; }

.game-container {
  width: 800px;
  height: 600px;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  transform-origin: center center;
}

/* Responsive sizing is now handled by JS (whole-window transform scaling),
   so the old per-element media-query transforms are removed to avoid conflicts. */

.background {
  position: absolute;
  top: 0;
  left: 0;
  width: 800px;
  height: 600px;
  background: url('assets/title_1_en.jpeg') center center / 800px 600px no-repeat;
  z-index: 0;
}

.landing-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 800px;
  height: 600px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: url('Cursor3.cur'), pointer;
  opacity: 1;
  transition: opacity 1.5s ease-in-out;
  pointer-events: auto;
  padding-top: 355px;
}

.landing-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.landing-content {
  text-align: center;
}

.landing-text {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 28px;
  font-weight: bold;
  color: #fff;
  text-shadow:
    -2px -2px 0 #5C3317,
    2px -2px 0 #5C3317,
    -2px 2px 0 #5C3317,
    2px 2px 0 #5C3317,
    0 -2px 0 #5C3317,
    0 2px 0 #5C3317,
    -2px 0 0 #5C3317,
    2px 0 0 #5C3317,
    0 0 10px rgba(255, 200, 0, 0.8),
    0 0 20px rgba(255, 150, 0, 0.6),
    0 0 40px rgba(255, 200, 0, 0.5);
  letter-spacing: 2px;
  animation: landingPulse 2s ease-in-out infinite;
}

.landing-text.flicker {
  animation: flickerText 0.1s linear 10 forwards;
}

@keyframes flickerText {
  0%, 49% { opacity: 1; }
  50%, 99% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes landingPulse {
  0%, 100% {
    opacity: 0.6;
    text-shadow:
      -2px -2px 0 #5C3317,
      2px -2px 0 #5C3317,
      -2px 2px 0 #5C3317,
      2px 2px 0 #5C3317,
      0 -2px 0 #5C3317,
      0 2px 0 #5C3317,
      -2px 0 0 #5C3317,
      2px 0 0 #5C3317,
      0 0 10px rgba(255, 200, 0, 0.4),
      0 0 20px rgba(255, 150, 0, 0.3),
      0 0 30px rgba(255, 200, 0, 0.2);
  }
  30%, 70% {
    opacity: 1;
    text-shadow:
      -2px -2px 0 #5C3317,
      2px -2px 0 #5C3317,
      -2px 2px 0 #5C3317,
      2px 2px 0 #5C3317,
      0 -2px 0 #5C3317,
      0 2px 0 #5C3317,
      -2px 0 0 #5C3317,
      2px 0 0 #5C3317,
      0 0 15px rgba(255, 200, 0, 1),
      0 0 30px rgba(255, 150, 0, 0.8),
      0 0 50px rgba(255, 200, 0, 0.6);
  }
}

.menu-content {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease-in-out 0.3s;
}

.menu-content.visible {
  opacity: 1;
  pointer-events: auto;
}

.buttons-container {
  position: absolute;
  top: calc(50% + 135px);
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1;
  transition: opacity 1s ease-in-out;
  pointer-events: auto;
}

.buttons-container.hidden {
  opacity: 0;
  pointer-events: none;
}

.buttons-bg {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  border: 2px solid #3d1c00;
}

.buttons-list {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  gap: 0;
  padding: 0;
}

.menu-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: url('Cursor3.cur'), pointer;
  transition: transform 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  width: 100%;
  position: relative;
}

.menu-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -30px;
  right: -30px;
  height: 18px;
  transform: translateY(-50%);
  background: radial-gradient(ellipse at center, rgba(240, 160, 20, 1) 0%, rgba(220, 140, 10, 0.8) 40%, transparent 70%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: -1;
}

.menu-btn:hover::before {
  opacity: 1;
}

.menu-btn:hover {
  filter: brightness(1.4);
}

.menu-btn img {
  display: block;
  height: 100%;
  width: auto;
  pointer-events: none;
}

.menu-btn:active {
  transform: scale(0.95);
}

.menu-btn.flicker::before {
  animation: flickerGlow 0.1s linear 10;
}

@keyframes flickerGlow {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.menu-btn.selected {
  outline: 1px solid rgba(255, 180, 0, 0.8);
  outline-offset: 1px;
}

.menu-btn.selected:hover {
  filter: brightness(1.4);
}

.downloads-page {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease-in-out;
  z-index: 5;
  border: 2px solid #3d1c00;
}

.downloads-page.visible {
  opacity: 1;
  pointer-events: auto;
}

.downloads-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  object-fit: fill;
  filter: blur(1px);
}

.downloads-list {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 10px 30px;
}

.download-item {
  width: 280px;
  padding: 8px 20px;
  background: none;
  border: none;
  color: white;
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    -2px -2px 0 #3d1c00,
    2px -2px 0 #3d1c00,
    -2px 2px 0 #3d1c00,
    2px 2px 0 #3d1c00,
    0 -2px 0 #3d1c00,
    0 2px 0 #3d1c00,
    -2px 0 0 #3d1c00,
    2px 0 0 #3d1c00;
  cursor: url('Cursor3.cur'), pointer;
  transition: transform 0.1s ease;
  position: relative;
}

.download-item::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -30px;
  right: -30px;
  height: 18px;
  transform: translateY(-50%);
  background: radial-gradient(ellipse at center, rgba(200, 120, 0, 1) 0%, rgba(180, 100, 0, 0.6) 40%, transparent 70%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: -1;
}

.download-item:hover::before {
  opacity: 1;
}

.download-item:hover {
  filter: brightness(1.4);
}

.download-item:active {
  transform: scale(0.95);
}

.download-item.flicker::before {
  animation: flickerGlow 0.1s linear 10;
}

.deck-page {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%) scale(0.85);
  transform-origin: bottom center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease-in-out;
  z-index: 5;
  border: 2px solid #3d1c00;
}

.deck-page.visible {
  opacity: 1;
  pointer-events: auto;
}

.deck-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  object-fit: fill;
  filter: blur(1px);
}

.deck-list {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 10px 30px;
  text-align: center;
}

.deck-item {
  width: 320px;
  padding: 8px 20px;
  background: none;
  border: none;
  color: white;
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    -2px -2px 0 #3d1c00,
    2px -2px 0 #3d1c00,
    -2px 2px 0 #3d1c00,
    2px 2px 0 #3d1c00,
    0 -2px 0 #3d1c00,
    0 2px 0 #3d1c00,
    -2px 0 0 #3d1c00,
    2px 0 0 #3d1c00;
  cursor: url('Cursor3.cur'), pointer;
  transition: transform 0.1s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.deck-item::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -30px;
  right: -30px;
  height: 18px;
  transform: translateY(-50%);
  background: radial-gradient(ellipse at center, rgba(200, 120, 0, 1) 0%, rgba(180, 100, 0, 0.6) 40%, transparent 70%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: -1;
}

.deck-item:hover::before {
  opacity: 1;
}

.deck-item:hover {
  filter: brightness(1.4);
}

.deck-item:active {
  transform: scale(0.95);
}

.deck-item.flicker::before {
  animation: flickerGlow 0.1s linear 10;
}

.deck-thumb {
  display: block;
  width: 320px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 8px;
  pointer-events: none;
  border: 3px solid #3d1c00;
  box-shadow: 0 0 5px rgba(61, 28, 0, 0.6);
}

.card-display {
  position: absolute;
  top: 0;
  left: 0;
  width: 800px;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease-in-out;
  z-index: 6;
  background: rgba(0, 0, 0, 0.85);
}

.card-display.visible {
  opacity: 1;
  pointer-events: auto;
}

.card-display-content {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  max-width: 750px;
  max-height: 550px;
}

.card-display-content img#cardDisplayImg {
  height: 500px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.card-display-text {
  color: #ddd;
  font-family: 'Merriweather', serif;
  font-size: 11px;
  line-height: 1.5;
  overflow-y: auto;
  max-height: 500px;
  padding: 5px 10px;
  text-align: left;
}

.card-display-text .section-label {
  color: #ffd700;
  font-weight: bold;
  font-size: 12px;
  margin-top: 8px;
}

.card-display-back {
  position: absolute;
  bottom: 30px;
  left: 40px;
  width: 70px;
  height: 70px;
  cursor: url('Cursor3.cur'), pointer;
  transition: transform 0.1s ease;
  filter: brightness(0.75) drop-shadow(0 0 3px rgba(0,0,0,0.6));
}

.card-display-back img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.card-display-back:hover {
  filter: brightness(1.1) drop-shadow(0 0 5px rgba(0,0,0,0.8));
}

.deck-download-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 20px;
  background: linear-gradient(to bottom, #c4a44a, #8b6914);
  color: #fff;
  font-family: 'Merriweather', serif;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  text-shadow: 1px 1px 2px #000;
  border: 2px solid #3d1c00;
  border-radius: 6px;
  cursor: url('Cursor3.cur'), pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.deck-download-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(196, 164, 74, 0.6);
}

.deck-download-btn:active {
  transform: scale(0.95);
}

.flying-back {
  position: absolute;
  bottom: 30px;
  left: 40px;
  width: 70px;
  height: 70px;
  cursor: url('Cursor3.cur'), pointer;
  z-index: 10;
  transition: transform 0.1s ease, opacity 0.5s ease;
  filter: drop-shadow(0 0 3px rgba(0,0,0,0.6));
  opacity: 0;
  pointer-events: none;
}

.flying-back.visible {
  opacity: 1;
  pointer-events: auto;
}

.flying-back img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.flying-back:hover {
  filter: brightness(1.3) drop-shadow(0 0 5px rgba(0,0,0,0.8));
}

.flying-back:active {
  transform: scale(0.9);
}

@keyframes flyFloat {
  0%, 100% { transform: translateY(0) translateX(0); }
  25% { transform: translateY(-8px) translateX(4px); }
  50% { transform: translateY(-3px) translateX(-3px); }
  75% { transform: translateY(-10px) translateX(2px); }
}

.copyright {
  position: absolute;
  bottom: 1px;
  right: 10px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.5px;
  text-shadow:
    -1px -1px 0 rgba(0,0,0,0.8),
    1px -1px 0 rgba(0,0,0,0.8),
    -1px 1px 0 rgba(0,0,0,0.8),
    1px 1px 0 rgba(0,0,0,0.8);
  z-index: 4;
  animation: breathe 3s ease-in-out infinite;
  text-decoration: none;
  cursor: pointer;
}

@keyframes breathe {
  0%, 100% { opacity: 0.5; }
  42%, 58% { opacity: 1; }
}
