/* FONT */
@import url('https://fonts.googleapis.com/css2?family=Anton&display=swap');

:root {
  --safe-top: 15px + env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
}


/* ======================================================
   MAIN MENU TITLE
   ====================================================== */
.dd-title {
    font-family: 'Game2', sans-serif;
    font-size: 1.5em;
    margin-bottom: 0.6em;
    text-align: left;
    color: #02154a;
    text-shadow: 1px 1px 2px #FFF;
}



/* ======================================================
   MENU ROOT
====================================================== */

.dd-menu-root {
  position: fixed;
  inset: 0;

  display: grid;
  place-items: center;

  overflow: hidden;
}


/* ======================================================
   MENU VISIBILITY CONTROL
====================================================== */

.dd-menu-root.hidden {
  opacity: 0;
  pointer-events: none;
}


/* ======================================================
   FULLSCREEN BACKDROP
====================================================== */

.dd-menu-backdrop {
  position: absolute;
  inset: 0;

  background-image: url("/images/ui/ui_backdrop_02.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  z-index: 0;
}


/* ======================================================
   PANEL CONTAINER
====================================================== */

.dd-menu-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 500px);
  min-width: 500px;
  transform: scale(1.08); 
  transform-origin: center;
}

.dd-menu-panel.active {
    display: flex;
}

.dd-menu-panel.hidden {
    display: none;
}


/* ======================================================
   PANEL IMAGE
====================================================== */

.dd-menu-panel-bg {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}


/* ======================================================
   PANEL CONTENT SLOT
====================================================== */

.dd-menu-panel-content {
  position: absolute;
  inset: 0;

  display: flex;
  flex-direction: column;
  align-items: center;

  pointer-events: auto;
}




/* ======================================================
   HOME MENU LAYOUT
====================================================== */

.dd-menu-home {
  justify-content: center;
  gap: 30px;
  padding-top: 0px;
}


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

.dd-menu-home img {
  width: auto;
  max-width: 100%;
  cursor: pointer;

  transition:
    transform 0.12s ease,
    filter 0.12s ease;
}

.dd-menu-home img.margin {
    margin-top: 30px;
}

.dd-menu-home img:hover {
  transform: scale(1.04);
  filter: brightness(1.0);
}

.dd-menu-home img:active {
  transform: scale(0.97);
}

#dd-home-welcome {
    font-family: "Game2", sans-serif;
    font-size: 19px;
    /* letter-spacing: 1px; */
    color: #0a2b6c;
    width: 58%;
    padding: 8px 11px;
    text-align: center;
    border-radius: 14px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(235, 245, 255, 0.9) 45%,
        rgba(215, 232, 250, 0.85) 100%
      );
    backdrop-filter: blur(6px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 6px 18px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

#dd-home-welcome .dd-username {
  color: #2f82c3;
  text-shadow:
    0 0 6px rgba(47, 130, 195, 0.4);
}



/* ======================================================
   PANEL FOOTER (VERSION / USER)
====================================================== */

.dd-menu-footer {
  font-family: sans-serif;
  margin-top: 10px;
  text-align: center;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.9;
  user-select: none;
  text-shadow: 2px 2px 0px #000;
}

.dd-menu-version {
  margin-bottom: 4px;
  font-size: 15px;  
}

.dd-menu-user {
  font-size: 15px;
}

.dd-menu-user .dd-username {
  font-weight: 600;
}

.dd-menu-user .dd-sep {
  margin: 0 4px;
  opacity: 0.6;
}

.dd-menu-user a {
  color: #ffffff;
  text-decoration: underline;
  cursor: pointer;
  opacity: 0.9;
}

.dd-menu-user a:hover {
  opacity: 1;
}


/* ======================================================
   MENU PANEL VISIBILITY (ANIMATED)
====================================================== */

.dd-menu-panel-content {
  position: absolute;
  inset: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;

  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.dd-menu-panel-content.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dd-menu-panel-content.exiting {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}



/* ======================================================
   PLACEHOLDER VISUALS
====================================================== */

#dd-menu-root .dd-menu-placeholder {
  color: #ffffff;
  font-size: 16px;
  opacity: 0.75;
  text-align: center;
  user-select: none;
}





/* ======================================================
   RESPONSIVE SAFETY (optional, conservative)
====================================================== */

@media (max-height: 620px) {
  .dd-menu-panel {
    width: min(96vw, 380px);
  }

  .dd-menu-home {
    padding-top: 60px;
    gap: 12px;
  }
}






/* ======================================================
   MOUNTAIN SELECT PANEL
====================================================== */

/* Title */
#dd-menu-mountains .dd-menu-title {
  font-family: "Game2";
  color: #ffffff;
  text-align: center;
  font-size: 24px;
  text-shadow: 2px 2px 0px #000;
  line-height: 1.4;
}


/* ======================================================
   SCROLL CONTAINER (SHOWS EXACTLY 2 MOUNTAINS)
====================================================== */

:root {
  --dd-mountain-card-height: 180px;
}

#dd-menu-mountains .dd-mountain-scroll {
  width: 66%;  
  height: 83%;
  max-height: 83%;
  overflow-y: scroll;
  overflow-x: auto;

  padding: 12px;
  border-radius: 14px;

  background: rgb(46 29 8 / 81%);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.25),
    0 6px 16px rgba(0,0,0,0.35);

  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Scrollbar */
#dd-menu-mountains .dd-mountain-scroll::-webkit-scrollbar {
  width: 6px;
}
#dd-menu-mountains .dd-mountain-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.4);
  border-radius: 4px;
}
#dd-menu-mountains .dd-mountain-scroll::-webkit-scrollbar-track {
  background: transparent;
}


/* ======================================================
   MOUNTAIN LIST
====================================================== */

#dd-menu-mountains .dd-mountain-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}


/* ======================================================
   MOUNTAIN CARD (MATCHES MOCK)
====================================================== */

#dd-menu-mountains .dd-mountain-card {
  width: 100%;
  height: var(--dd-mountain-card-height);

  position: relative;
  box-sizing: border-box;

  background-image: url("/images/ui/ui_mountain_item_panel.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;

  padding: 16px 18px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  
  user-select: none;
  font-family: "Baloo2";

  transition: transform 0.2s ease, filter 0.2s ease;
}


.dd-mountain-top {
  margin-top: 12px;
}

/* ======================================================
   TOP SECTION (LOGO + TEXT)
====================================================== */

#dd-menu-mountains .dd-mountain-logo {
  width: 60px;
  height: auto;
  float: left;
  margin-right: 8px;
  pointer-events: none;
}

#dd-menu-mountains .dd-mountain-info {
  display: block;
}

#dd-menu-mountains .dd-mountain-name {
  font-family: "Game2";
  font-size: 22px;
  color: #ffffff;
  text-shadow: 2px 2px 0 #000;
  line-height: 1.0;
  margin-top: 4px;
}

#dd-menu-mountains .dd-mountain-slopes {
  font-size: 15px;
  color: #11ff66;
  margin-top: 4px;
}


/* ======================================================
   BOTTOM SECTION (PROGRESS + BUTTON)
====================================================== */

#dd-menu-mountains .dd-progress {
  width: 100%;
  height: 26px;

  margin-top: 10px;
  padding: 3px;

  border-radius: 999px;
  box-sizing: border-box;

  background: linear-gradient(
    to bottom,
    #7a4a1f,
    #5c3817
  );

  box-shadow:
    inset 0 1px 2px rgba(255,255,255,0.25),
    inset 0 -1px 2px rgba(0,0,0,0.4);
}

#dd-menu-mountains .dd-progress-bar {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: #2b2b2b;
}

#dd-menu-mountains .dd-progress-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #6cf0ff,
    #5cff7a
  );
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.6s ease;
}

#dd-menu-mountains .dd-progress-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 12px;

  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.9);

  pointer-events: none;
}


/* ======================================================
   SKI BUTTON
====================================================== */

#dd-menu-mountains .dd-mountain-action {
  margin-top: 8px;
  display: flex;
  justify-content: center;
}

#dd-menu-mountains .dd-mountain-action img {
  width: auto;
  max-width: 100%;
  height: auto;

  transition: transform 0.12s ease, filter 0.12s ease;
}

#dd-menu-mountains .dd-mountain-action img:hover {
  transform: scale(1.04);
  filter: brightness(1.1);
}









/* ======================================================
   UNIVERSAL MENU HEADER
====================================================== */

.dd-menu-header {
  position: relative;
  max-width: 340px;
  margin-top: 40px;  
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ----------------------
   BACK BUTTON
----------------------- */

.dd-menu-back-btn {
  position: absolute;
  left: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 42px;
  height: 42px;

  cursor: pointer;
  user-select: none;

  transition: transform 0.15s ease, opacity 0.15s ease;
  opacity: 0.9;
}

.dd-menu-back-btn img {
  width: 30px;
  height: auto;
  pointer-events: none;  
  transition: transform 0.15s ease, filter 0.15s ease;
  margin-top: 4px;
  margin-left: 6px;
}

.dd-menu-back-btn:hover {  
  filter: brightness(1.08);
}

.dd-menu-back-btn:active {  
}





/* ----------------------
   TITLE PLATE
----------------------- */

.dd-menu-title {
  position: relative;
  width: 340px; /* matches panel_title_bg.png */
  height: auto;

  display: flex;
  align-items: center;
  justify-content: center;

  pointer-events: none;
}

.dd-menu-title-bg {
  width: 100%;
  height: auto;
  display: block;  
}

.dd-menu-title-text {
  position: absolute;

  font-family: "Game2";
  font-size: 25px;
  color: #ffffff;
  white-space: nowrap;

  text-shadow:
    0 2px 3px rgba(0,0,0,0.7);
}

.dd-menu-panel {
  position: relative;
}

.dd-menu-panel-bg {
  position: relative;
  z-index: 1;
}

.dd-menu-panel-content {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.dd-menu-back-btn {
  position: absolute;
  z-index: 3;
}


/* ======================================================
   SLOPE SELECT – CARD-BASED REDESIGN (FIXED)
====================================================== */

/* ---------- PANEL ---------- */

#dd-menu-slopes .dd-slope-panel {
    width: 100%;
    height: 87%;
    padding: 12px;
    border-radius: 14px;
    background: rgb(46 29 8 / 81%);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25),
    0 6px 16px rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.dd-slope-list-info {
  text-align: center;
  font-family: "Game2";
  font-size: 17px;
  color: #fff;
  margin-bottom: 8px;
  background: #363636;
  border-radius: 8px;
  padding: 4px;
}

/* ---------- LIST ---------- */

#dd-slope-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
}

/* ---------- CARD ROOT ---------- */

.dd-slope-item {
  position: relative;
  width: 100%;
  min-height: 155px;
  border-radius: 14px;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  justify-content: space-evenly;

  font-family: "Game2", sans-serif;
  color: #fff;
}

/* NEW: panel image */
.dd-slope-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 0;
}

/* Existing content now layered above */
.dd-slope-header,
.dd-slope-footer,
.dd-slope-ticker {
  position: relative;
  z-index: 1;
}

.dd-slope-item.has-ticker .dd-slope-footer {
  margin-top: 13px;
}

/* ---------- HEADER ---------- */

.dd-slope-header {
    display: flex;
    align-items: center;
    gap: 11px;
    padding-top: 7px;
    padding-left: 7px;
    margin-top: 5px;
    margin-left: 14px;
}

/* Difficulty icon container (NEW) */
.dd-slope-difficulty {
  width: 25px;
  height: 25px;
  flex-shrink: 0;

  background: #ffffff;
  border: 3px solid #000;
  border-radius: 8px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.dd-slope-difficulty img {
  width: 80%;
  height: auto;
  display: block;
}

.dd-slope-name {
  font-size: 20px;
  line-height: 1.1;
  text-shadow: 0 2px 3px rgba(0,0,0,0.6);
}

/* ---------- FOOTER ---------- */

.dd-slope-footer {
    display: flex;
    align-items: center;
    gap: 12px;    
    padding: 0px 8px;
    margin: 0px 15px;
}

/* ---------- PROGRESS BAR ---------- */

.dd-slope-progress {
  flex: 1;
  height: 28px;
  padding: 4px;

  border-radius: 999px;
  background: linear-gradient(#7a4a1f, #5c3817);

  box-shadow:
    inset 0 1px 2px rgba(255,255,255,0.25),
    inset 0 -1px 2px rgba(0,0,0,0.4),
    0 2px 4px rgba(0,0,0,0.35);

  box-sizing: border-box;
}

.dd-slope-progress-bar {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: #2b2b2b;
}

.dd-slope-progress-fill {
  position: absolute;
  inset: 0;
  border-radius: 999px;

  background: linear-gradient(
    -90deg,
    #6df2ff,
    #4ecbff,
    #4cff8f
  );

  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.6s ease;
}

.dd-slope-progress-fill::before {
  content: "";
  position: absolute;
  inset: 0;

  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 10px,
    rgba(0,0,0,0.35) 10px,
    rgba(0,0,0,0.35) 20px
  );

  opacity: 0.45;
  mix-blend-mode: overlay;
}

.dd-slope-progress-text {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 12px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  pointer-events: none;
}

/* ---------- ACTION BUTTON ---------- */


/* ======================================================
   SLOPE ACTION BUTTON – SKI NOW
====================================================== */

.dd-slope-action {
  height: 36px;
  min-width: 64px;
  padding: 0 14px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;  
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;

  font-family: "Game2";
  font-size: 14px;
  letter-spacing: 0.5px;

  color: #0f3a1c;

  background: linear-gradient(
    to bottom,
    #6cff9d,
    #3fdc75
  );

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    inset 0 -1px 0 rgba(0,0,0,0.15),
    0 3px 6px rgba(0,0,0,0.35);

  transition:
    transform 0.12s ease,
    filter 0.12s ease;
}

/* Text */
.dd-slope-action::after {
  content: "SKI";
  text-shadow: 0px 1px 1px #fff;
}

/* Hover / press */
.dd-slope-action:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.dd-slope-action:active {
  transform: scale(0.96);
}

/* ======================================================
   DISABLED STATE
====================================================== */

.dd-slope-action.disabled {
  pointer-events: none;
  opacity: 0.55;
  filter: grayscale(60%);
}


/* ---------- LOCKED STATE ---------- */

/* ---------- LOCKED STATE DARKENING LAYER ---------- */

.dd-slope-item.is-locked::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;

  background: rgba(0,0,0,0.45);

  z-index: 2;
  pointer-events: none;
}


/* ---------- UNLOCK OVERLAY (FIXED) ---------- */

.dd-slope-unlock-overlay {
  position: absolute;
  inset: 8px;
  z-index: 5;

  display: flex;
  align-items: center;
  justify-content: center;

  pointer-events: auto;
}

/* Darkening layer UNDER button */
.dd-slope-item.is-locked::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: rgba(0,0,0,0.35);
  z-index: 1;
}

/* Unlock button */
.dd-slope-unlock-overlay img {
  height: 100%;
  max-height: 100%;
  width: auto;
  margin-top: 10px;
  z-index: 6;
  cursor: pointer;
}

.dd-slope-unlock-overlay img {
  filter: none !important;
  opacity: 1 !important;
}

/* ======================================================
   SLOPE BUTTON INTERACTIONS (HOVER / PRESS)
====================================================== */

/* Shared base safety */
.dd-slope-action img,
.dd-slope-unlock-overlay img {
  transition:
    transform 0.12s ease,
    filter 0.12s ease;
  will-change: transform;
}

/* ---------- SKI NOW BUTTON ---------- */

.dd-slope-action:not(.disabled):hover img {
  transform: translateY(-1px) scale(1.04);
  filter: brightness(1.12) saturate(1.1);
}

.dd-slope-action:not(.disabled):active img {
  transform: translateY(1px) scale(0.98);
  filter: brightness(0.95);
}

/* ---------- UNLOCK BUTTON ---------- */

.dd-slope-unlock-overlay img:hover {
  transform: scale(1.06);
  filter: brightness(1.18) saturate(1.15);
}

.dd-slope-unlock-overlay img:active {
  transform: scale(0.97);
  filter: brightness(0.95);
}

/* ---------- SLOPE UNLOCK STYLES ---------- */


.dd-slope-item.is-locked {
  /*filter: grayscale(1) brightness(0.7);*/
}

.dd-slope-item.is-unlocking {
  animation: slopeUnlockGlow 0.6s ease-out;
}

@keyframes slopeUnlockGlow {
  0% {
    box-shadow: 0 0 0 rgba(255,255,255,0);
  }
  50% {
    box-shadow: 0 0 24px rgba(255,255,255,0.35);
  }
  100% {
    box-shadow: 0 0 0 rgba(255,255,255,0);
  }
}

/* Unlock overlay exit */
.dd-slope-unlock-overlay.unlock-exit {
  animation: unlockFadePop 0.5s ease forwards;
}

@keyframes unlockFadePop {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

/* Ski now button pop */
.dd-slope-action.unlock-pop img {
  animation: buttonPop 0.4s ease-out;
}

@keyframes buttonPop {
  0%   { transform: scale(0.85); }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}


.dd-slope-ticker {
    position: relative;
    width: 79%;
    margin: 3px auto;
    padding: 4px 10px;
    overflow: hidden;
    background: linear-gradient(
    to bottom,
    rgba(60, 60, 60, 0.95),
    rgba(30, 30, 30, 0.95)
  );
    border-radius: 10px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.6),
    inset 0 -1px 1px rgba(255,255,255,0.08);
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
}


.dd-slope-ticker-track {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
  animation: dd-slope-ticker-scroll 26s linear infinite;
}

@keyframes dd-slope-ticker-scroll {
  from {
    transform: translateX(0%);
  }
  to {
    transform: translateX(-100%);
  }
}

.dd-slope-ticker-track {
  animation-delay: 1.0s;
}

.dd-slope-ticker-label {
  font-weight: 700;
  color: #ffffff;
  margin-right: 6px;
}

.dd-slope-ticker-track span {
  color: #e8e8e8;
}

.dd-slope-ticker-track span + span {
  margin-left: 6px;
}

.dd-slope-ticker-sep {
  margin: 0 12px;
  opacity: 0.65;
}



.dd-slope-ticker::before,
.dd-slope-ticker::after {
  content: "";
  position: absolute;
  top: 0;
  width: 20px;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.dd-slope-ticker::before {
  left: 0;
  background: linear-gradient(
    to right,
    rgba(30,30,30,1),
    rgba(30,30,30,0)
  );
}

.dd-slope-ticker::after {
  right: 0;
  background: linear-gradient(
    to left,
    rgba(30,30,30,1),
    rgba(30,30,30,0)
  );
}

.dd-slope-ticker.placeholder {
  height: 28px;               /* lock layout */
  opacity: 0.35;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.dd-slope-ticker-loading {
  font-size: 12px;
  opacity: 0.7;
  padding-left: 6px;
}

.dd-slope-item.has-ticker .dd-slope-ticker {
  opacity: 1;
  transition: opacity 180ms ease-out;
}











/* ======================================================
   GET READY PANEL — UNIFIED STYLES
====================================================== */

#dd-menu-getready .dd-getready-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 6px;
  box-sizing: border-box;
  color: #000000;
  font-size: 14px;
}

#dd-menu-getready .dd-slope-panel {
  display: flex;
  flex-direction: column;
  width: 62%;
  height: 62%;
  max-height: 62%;
  padding: 8px;
  box-sizing: border-box;
}

#dd-menu-getready .dd-slope-panel.gr {  
    height: 73%;
    max-height: 73%;
    width: 66%;    
    padding: 12px;
    border-radius: 14px;
    background: rgb(46 29 8 / 81%);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25),
    0 6px 16px rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}


#dd-menu-getready .dd-getready-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;

  padding-right: 6px;

  scrollbar-width: thin;
}

#dd-menu-getready .dd-getready-content::-webkit-scrollbar {
  width: 6px;
}

#dd-menu-getready .dd-getready-content::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.45);
  border-radius: 4px;
}

#dd-menu-getready .dd-getready-content::-webkit-scrollbar-track {
  background: transparent;
}


/* ======================================================
   SECTION WRAPPER
====================================================== */

#dd-menu-getready .dd-gr-section {
  background: rgba(255,255,255, 95%);
  border-radius: 14px;
  padding: 14px;
}

#dd-menu-getready .dd-gr-section-title {
  font-family: "Game2";
  font-size: 18px;  
  opacity: 1.0;
  margin-bottom: 8px;
}

/* ======================================================
   HEADER ROW (Slope name + status)
====================================================== */

#dd-menu-getready .dd-gr-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

#dd-menu-getready .dd-gr-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 6px rgba(61,220,132,0.8);
}

#dd-menu-getready .dd-gr-slope-name {
  font-family: "Game2";
  font-size: 16px;
}

/* ======================================================
   PROGRESS BAR (Gel Style)
====================================================== */

#dd-menu-getready .dd-gr-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

#dd-menu-getready .dd-gr-progress-bar {
  flex: 1;
  height: 20px;
  border-radius: 14px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
  position: relative;
  box-shadow:
    inset 0 0 6px rgba(0,0,0,0.45),
    0 0 14px rgba(0,0,0,0.25);
}

#dd-menu-getready .dd-gr-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background:
    linear-gradient(90deg,
      rgba(74,222,128,1) 0%,
      rgba(34,211,238,1) 40%,
      rgba(129,140,248,1) 80%),
    radial-gradient(circle at 50% -30%,
      rgba(255,255,255,0.45),
      transparent 60%);
  background-blend-mode: overlay;
  box-shadow:
    inset 0 0 10px rgba(255,255,255,0.3),
    0 0 14px rgba(34,211,238,0.6);
  transition: width 0.0s cubic-bezier(.22,.68,.18,1.08);
  position: relative;
  overflow: hidden;
}

#dd-menu-getready .dd-gr-progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(255,255,255,0.6),
    rgba(255,255,255,0.15) 40%,
    rgba(255,255,255,0) 60%
  );
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: 0.75;
}

#dd-menu-getready .dd-gr-progress-fill::before {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.4),
    transparent
  );
  animation: ddGelSheen 2.4s infinite;
  opacity: 0.35;
}

@keyframes ddGelSheen {
  0% { left: -40%; }
  60%,100% { left: 120%; }
}


/* ======================================================
   SPEED CHALLENGE PANEL
====================================================== */

.dd-gr-speed-challenge {
  padding: 14px;
}

.dd-gr-speed-header {
  font-family: "Game2";
  font-size: 18px;
  margin-bottom: 0px;
}

/* Layout */
.dd-gr-speed-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

/* LEFT: target times */
.dd-gr-speed-targets {
  font-family: monospace;
  font-size: 14px;
  line-height: 1.4;
}

.dd-gr-speed-targets span {
  font-weight: 700;
}

/* RIGHT: medal */
.dd-gr-speed-medal {
    position: relative;
    width: 85px;
    height: 70px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
}

.dd-gr-speed-medal img {
 
  inset: 0;

  width: 80%;
  height: 80%;
  object-fit: contain;

  pointer-events: none;
}


/* Fastest time overlay */
.dd-gr-speed-fastest {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Game2";
    font-size: 20px;
    font-weight: 700;
    color: #111;
    text-shadow: 0 1px 2px rgba(255,255,255,0.85);
    pointer-events: none;
    z-index: 2;
}


/* Dim fastest time when no medal */
.dd-gr-speed-medal.none .dd-gr-speed-fastest {
  opacity: 1;
}


/* ======================================================
   CHALLENGE CHECKLIST
====================================================== */

#dd-menu-getready #dd-gr-challenges {
      
}

#dd-menu-getready .dd-challenge-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 2px;
  border-bottom: 1px solid rgba(255,255,255,0.22);
}

#dd-menu-getready .dd-challenge-row img {
  width: 28px;
  height: 28px;
}

#dd-menu-getready .dd-challenge-text {
  font-family: monospace;
  font-size: 0.85rem;  
  color: #012;
}

#dd-menu-getready .dd-challenge-text span {
  color: #ff008e;
}

/* ======================================================
   ACTION BUTTON
====================================================== */

#dd-menu-getready .dd-getready-start-wrap {
  margin-top: 4px;
  display: flex;
  justify-content: center;
}

#dd-menu-getready #dd-btn-start-run {
  width: 230px; 
  height: auto;

  cursor: pointer;
  user-select: none;

  transition: transform 0.15s ease, filter 0.15s ease;
}

#dd-menu-getready #dd-btn-start-run:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

#dd-menu-getready #dd-btn-start-run:active {
  transform: scale(0.97);
}


/* ======================================================
   RUN SUMMARY – CLASSIC CARD STYLE
====================================================== */

.dd-summary {
  position: fixed;
  inset: 0;
  z-index: 6000;

  display: flex;
  align-items: center;
  justify-content: center;
}

.dd-summary.hidden {
  display: none;
}

/* Backdrop */
.dd-summary-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

/* Card */
.dd-summary-card {
  position: relative;
  z-index: 1;

  width: 90%;
  max-width: 420px;

  background: #ffffff;
  border-radius: 20px;

  box-shadow:
    0 18px 40px rgba(0,0,0,0.45);

  padding: 0 18px 18px;
  box-sizing: border-box;

  font-family: system-ui, sans-serif;
  color: #111;
}

/* ======================================================
   HEADER BAR
====================================================== */

.dd-summary-card .dd-gr-header {
  display: flex;
  align-items: center;
  gap: 10px;

  background: #2c3e83;
  color: #fff;

  padding: 12px 14px;
  margin: 16px -6px 12px;

  border-radius: 12px;
}

.dd-summary-card .dd-gr-header h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 800;
  font-family: "Game2";
}

/* Difficulty icon wrapper */
#dd-sum-diff-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #fff;
  flex-shrink: 0;
}

/* ======================================================
   RUN RESULTS SECTION
====================================================== */

.dd-summary-card .dd-gr-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 11px;
    font-size: 20px;
    font-family: "Game2";
    font-weight: 700;
    color: #111;
}

.dd-summary-card .dd-gr-section h3::before {
  content: "";
  width: 4px;
  height: 18px;
  background: #4da3ff;
  border-radius: 2px;
}

/* Results list */
#dd-sum-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Individual result row */
.dd-sum-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: monospace;
    font-size: 16px;
    margin: 0px 5px;
}

/* Icon bubble */
.dd-sum-row img {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

/* Highlight numbers */
.dd-sum-highlight .value {
  color: #000;
  font-weight: 700;
}

.dd-sum-highlight span {
  color: #ff007a;
  font-weight: 700;
}

/* ======================================================
   BUTTON ROW
====================================================== */

.dd-gr-buttons {
  display: flex;
  gap: 14px;
  margin-top: 18px;
}

.dd-gr-buttons button {
    flex: 1;
    padding: 13px 25px;
    border-radius: 14px;
    border: none;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

/* Blue */
.dd-btn-blue {
  background: linear-gradient(#6cb8ff, #3f8de8);
}

/* Green */
.dd-btn-green {
  background: linear-gradient(#6df0a1, #38c172);
}

.dd-gr-buttons button:active {
  transform: translateY(1px);
}

/* ======================================================
   HOW TO PLAY PANEL
====================================================== */

.dd-htp-panel {
    width: 85%;
    height: 87%;
    display: flex;
    justify-content: center;
    align-items: stretch;
    box-sizing: border-box;
    /* margin-top: 18px; */
}

.dd-htp-panel.myaccount {
    width: 340px;
}


/* Frosted container */
.dd-htp-content {
  width: 92%;
  max-width: 420px;

  height: 100%;          /* fill panel */
  max-height: 100%;

  padding: 14px;
  box-sizing: border-box;

  /*background: rgba(255,255,255,0.8);*/
  backdrop-filter: blur(14px);

  border-radius: 18px;

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.25),
    0 8px 20px rgba(0,0,0,0.35);

  display: flex;
  flex-direction: column;
  gap: 17px;

  overflow-y: auto;      /* ✅ ENABLE SCROLLING */
  overflow-x: hidden;
  box-sizing: border-box;
}

.dd-mp-section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgb(255 255 255 / 79%);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.15);
    color: #000;
}


.dd-htp-content {
  height: 96%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0; /* important */
}



.dd-htp-scroll-inner {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.dd-htp-content p {
    margin: 0px;
}

.dd-htp-content p.section {
    font-family: "Game2";
    font-size: 18px;
    margin-bottom: 12px;
    margin-top: 18px;
}

.dd-htp-content p.section.nomargin {
    margin-top: 0px;
}

.dd-htp-content p.content {
    font-family: monospace;
    font-size: 14px;
}

.dd-htp-content p.content.space {
    margin-top: 9px;
}


/* ======================================================
   SETTINGS PANEL
====================================================== */

.dd-settings-panel {
    width: 100%;
    height: 80%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    box-sizing: border-box;
    margin-top: 10px;
}

/* Frosted container */
.dd-settings-content {
    /*width: 92%;
    max-width: 420px;*/
    max-height: 100%;
    padding: 14px;
    box-sizing: border-box;
    background: rgb(47 24 5 / 90%);
    backdrop-filter: blur(14px);
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25),
    0 8px 20px rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
    gap: 17px;
}

/* ======================================================
   SETTINGS ROWS
====================================================== */

.dd-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgb(255 255 255 / 79%);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.15);
    color: #000;
    width: 250px;
}

/* Label block */
.dd-settings-row label {
  flex: 1;
  cursor: pointer;
}

/* Title */
.dd-settings-title {
  font-family: "Game2";
  font-size: 14px;
  color: #000;
}

/* Description */
.dd-settings-desc {
  font-family: monospace;
  margin-top: 2px;
  font-size: 10px;
  color: #000;
  line-height: 1.25;
}

/* ======================================================
   INPUT CONTROLS
====================================================== */

/* Checkboxes */
.dd-settings-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  cursor: pointer;
}

/* Select dropdown */
.dd-settings-row select {    
    padding: 6px 10px;
    border-radius: 8px;
    font-family: "Game2";
    font-size: 14px;
    background: rgba(255,255,255,0.85);
    color: #111;
    border: none;
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25),
    0 2px 4px rgba(0,0,0,0.25);
    cursor: pointer;
}
.dd-settings-row select.dd-mp-select {
    width: 95%;
    padding: 6px 10px;
    border-radius: 8px;
    font-family: "Game2";
    font-size: 19px;
    background: rgba(255,255,255,0.85);
    color: #111;
    border: none;
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25),
    0 2px 4px rgba(0,0,0,0.25);
    cursor: pointer;
}


/* ======================================================
   SETTINGS SAVE BUTTON (IMAGE)
====================================================== */

.dd-settings-actions {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

#dd-settings-save {
  width: auto;
  max-width: 220px;

  cursor: pointer;
  user-select: none;

  transition:
    transform 0.12s ease,
    filter 0.12s ease,
    box-shadow 0.12s ease;

  /* Optional subtle glow baseline */
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.45));
}

/* Hover = lift + brighten */
#dd-settings-save:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.08)
          drop-shadow(0 6px 14px rgba(0,0,0,0.55));
}

/* Active = press */
#dd-settings-save:active {
  transform: translateY(1px) scale(0.97);
  filter: brightness(0.98)
          drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}





/* ======================================================
   MULTIPLAYER PANEL (MENU INTEGRATED)
====================================================== */

/* ------------------------------------------------------
   PANEL INTERACTION (CRITICAL CONTRACT)
------------------------------------------------------ */

/* Panels exist in DOM but only active panels receive input */
.dd-menu-panel-content {
  pointer-events: none;
}

.dd-menu-panel-content.active {
  pointer-events: auto;
}










/* ======================================================
   MULTIPLAYER PANEL – SAFE + POLISHED FINAL
====================================================== */

#dd-menu-multiplayer {
  width: 100%;
  height: 100%;
}

/* ------------------------------------------------------
   GLOBAL SAFETY GATE
   Multiplayer is completely inert unless ACTIVE
------------------------------------------------------ */

#dd-menu-multiplayer:not(.active),
#dd-menu-multiplayer:not(.active) * {
  pointer-events: none !important;
}

/* ------------------------------------------------------
   CONTAINER (inherits How-To-Play layout)
------------------------------------------------------ */

#dd-menu-multiplayer .dd-htp-panel {
  width: 100%;
  max-width: 100%;
  height: auto;
}

#dd-menu-multiplayer .dd-htp-scroll-inner {
  padding: 10px 8px;
}

/* ------------------------------------------------------
   TABS
------------------------------------------------------ */

#dd-menu-multiplayer .dd-mp-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

#dd-menu-multiplayer .dd-mp-tab {
  flex: 1;
  padding: 11px 0;
  border-radius: 16px;
  cursor: pointer;

  font-family: "Game2", sans-serif;
  font-size: 1.05rem;

  color: #0a2b6c;
  background: rgba(255, 255, 255, 0.7);
  border: none;

  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    0 3px 10px rgba(0, 0, 0, 0.12);

  transition:
    background 0.18s ease,
    transform 0.12s ease,
    box-shadow 0.18s ease;
}

#dd-menu-multiplayer .dd-mp-tab:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-1px);
}

#dd-menu-multiplayer.active .dd-mp-tab.active {
  background: linear-gradient(
    180deg,
    #9cd0ff 0%,
    #67b4f8 45%,
    #2f82c3 100%
  );
  color: #ffffff;
  box-shadow:
    0 5px 16px rgba(47, 130, 195, 0.45),
    inset 0 1px 2px rgba(255, 255, 255, 0.55);
}

/* ------------------------------------------------------
   TAB PANELS (HARD-GATED)
------------------------------------------------------ */

#dd-menu-multiplayer .dd-mp-panel {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;

  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

#dd-menu-multiplayer.active .dd-mp-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ------------------------------------------------------
   SETTINGS ROWS
------------------------------------------------------ */

#dd-menu-multiplayer .dd-settings-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  text-align: center;
  background: none;
  box-shadow: none;
  color: #FFF;
}

#dd-menu-multiplayer .dd-settings-title {
    font-family: "Game2", sans-serif;
    font-size: 22px;
    color: #ffffff;
}

#dd-menu-multiplayer .dd-settings-desc {
  font-size: 13px;
  opacity: 1;
  color: #FFF;
}

/* ------------------------------------------------------
   INPUTS (SELECT + TEXT)
   Unified look & feel
------------------------------------------------------ */

#dd-menu-multiplayer .dd-mp-select,
#dd-menu-multiplayer .dd-input {
  min-width: 180px;
  padding: 11px 14px;

  border-radius: 14px;
  border: 2px solid rgba(0, 0, 0, 0.18);

  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-align: center;

  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);

  color: #0a2b6c;

  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.12),
    0 3px 12px rgba(0, 0, 0, 0.15);

  outline: none;

  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

#dd-menu-multiplayer .dd-mp-select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #0a2b6c 50%),
    linear-gradient(135deg, #0a2b6c 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

#dd-menu-multiplayer .dd-mp-select:focus,
#dd-menu-multiplayer .dd-input:focus {
  background: rgba(255, 255, 255, 0.97);
  border-color: #3d9fff;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.12),
    0 0 14px rgba(61, 159, 255, 0.45);
}

#dd-menu-multiplayer .dd-input::placeholder {
  color: rgba(10, 43, 108, 0.45);
  letter-spacing: 0.14em;
}

/* ------------------------------------------------------
   ROOM CODE DISPLAY (MATCHES INPUT STYLE)
------------------------------------------------------ */

#dd-menu-multiplayer #mp-room-code {
  margin-top: 10px;
}

#dd-menu-multiplayer .dd-mp-code {
  padding: 12px 18px;

  font-family: ui-monospace, monospace;
  font-size: 1.3rem;
  letter-spacing: 0.2em;

  border-radius: 14px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95),
    rgba(235, 245, 255, 0.95)
  );

  border: 2px solid rgba(47, 130, 195, 0.35);

  color: #0a2b6c;

  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.12),
    0 4px 16px rgba(47, 130, 195, 0.35);
}

/* ------------------------------------------------------
   STATUS TEXT
------------------------------------------------------ */

#dd-menu-multiplayer #mp-status-text {
  margin-top: 16px;
  min-height: 1.6em;
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.85;
}

/* ------------------------------------------------------
   HOSTING STATE (VISUAL FEEDBACK)
------------------------------------------------------ */

#dd-menu-multiplayer.is-hosting #mp-slope-select {
  opacity: 0.55;
  pointer-events: none;
}

#dd-menu-multiplayer.is-hosting #mp-tab-join {
  opacity: 0.4;
  pointer-events: none;
}

#dd-menu-multiplayer.is-hosting #mp-host-btn {
  opacity: 0.8;
}

/* Room code only visible while hosting */
#dd-menu-multiplayer:not(.is-hosting) #mp-room-code {
  display: none;
}


/* ======================================================
   MULTIPLAYER BUTTONS – POLISHED GAME STYLE
====================================================== */

/* Base multiplayer buttons */
#dd-menu-multiplayer .dd-btn {
  min-width: 180px;
  padding: 12px 18px;

  border-radius: 18px;
  border: none;

  font-family: "Game2", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.05em;

  cursor: pointer;

  color: #ffffff;

  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.45),
    0 6px 18px rgba(0, 0, 0, 0.28);

  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease,
    background 0.18s ease;
}

/* Hover */
#dd-menu-multiplayer .dd-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.55),
    0 8px 22px rgba(0, 0, 0, 0.35);
}

/* Pressed */
#dd-menu-multiplayer .dd-btn:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.25),
    0 3px 10px rgba(0, 0, 0, 0.25);
}

/* Disabled */
#dd-menu-multiplayer .dd-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ------------------------------------------------------
   START HOSTING (GREEN – PRIMARY)
------------------------------------------------------ */

#dd-menu-multiplayer .dd-btn-green {
  background: linear-gradient(
    180deg,
    #6be39a 0%,
    #2fbf71 45%,
    #179c57 100%
  );
}

#dd-menu-multiplayer .dd-btn-green:hover {
  filter: brightness(1.05);
}

/* ------------------------------------------------------
   STOP HOSTING (RED – DESTRUCTIVE)
------------------------------------------------------ */

#dd-menu-multiplayer.is-hosting #mp-host-btn {
  background: linear-gradient(
    180deg,
    #ff8a8a 0%,
    #e34b4b 45%,
    #b92f2f 100%
  );
}

#dd-menu-multiplayer.is-hosting #mp-host-btn:hover {
  filter: brightness(1.05);
}

/* ------------------------------------------------------
   JOIN MATCH (BLUE – SECONDARY)
------------------------------------------------------ */

#dd-menu-multiplayer .dd-btn-blue {
  background: linear-gradient(
    180deg,
    #9cd0ff 0%,
    #67b4f8 45%,
    #2f82c3 100%
  );
}

#dd-menu-multiplayer .dd-btn-blue:hover {
  filter: brightness(1.05);
}

/* ------------------------------------------------------
   BUTTON LAYOUT HELPERS
------------------------------------------------------ */

#dd-menu-multiplayer .dd-settings-row button {
  margin-top: 6px;
}

/* Subtle pulse while waiting for player */
@keyframes mp-wait-pulse {
  0%   { box-shadow: 0 0 0 rgba(47, 130, 195, 0.0); }
  50%  { box-shadow: 0 0 18px rgba(47, 130, 195, 0.45); }
  100% { box-shadow: 0 0 0 rgba(47, 130, 195, 0.0); }
}

#dd-menu-multiplayer.is-hosting #mp-host-btn {
  animation: mp-wait-pulse 2.2s ease-in-out infinite;
}


/* ===============================
   MULTIPLAYER SUMMARY
================================ */

.dd-mp-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.dd-mp-player {
  background: rgba(255,255,255,0.85);
  border-radius: 14px;
  padding: 14px;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.15);
}

.dd-mp-player.winner {
  box-shadow:
    0 0 16px rgba(255,215,100,0.75),
    inset 0 0 8px rgba(255,255,255,0.6);
  transform: scale(1.02);
}

.dd-mp-player h3 {
  margin: 0 0 10px 0;
  font-family: "Anton", sans-serif;
  font-size: 1.3rem;
  text-align: center;
  color: #0a2b6c;
}

.dd-mp-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-family: monospace;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.dd-mp-row:last-child {
  border-bottom: none;
}

.dd-mp-total {
  margin-top: 8px;
  font-size: 1.4rem;
  font-weight: bold;
  text-align: center;
  color: #ff008e;
}



#dd-mp-novip {
    display: block;
    margin-top: 20px;
    background: #28190b;
    width: 225px;
    padding: 20px;
    text-align: center;
    font-family: "Game2";
    font-size: 20px;
    color: #FFF;
}




















/* ======================================================
   UNIFIED MENU PANEL LAYOUT
   ====================================================== */

.dd-menu-panel-content {
  display: flex;
  flex-direction: column;

  /* full height of panel */
  height: 100%;

  /* existing behavior preserved */
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;

  transition: opacity 0.18s ease, transform 0.18s ease;
}

.dd-menu-panel-content.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ------------------------------------------------------
   HEADER — FIXED IN FLOW
------------------------------------------------------ */

.dd-menu-header {
  flex: 0 0 auto;

  /* ensures consistent vertical size */
  min-height: 72px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding-top: 6px;  
  margin-top: 45%;
}

/* ------------------------------------------------------
   BODY — ALWAYS BELOW HEADER
------------------------------------------------------ */

.dd-menu-body {
  flex: 1 1 auto;

  display: flex;
  flex-direction: column;

  /* prevents header jump */
  min-height: 0;

  /* panel spacing consistency */
  padding-top: 0px;
  align-items: center;
}

.dd-menu-body.wide {
    width: 69%;
}

/* ------------------------------------------------------
   SCROLL SAFETY
------------------------------------------------------ */

.dd-menu-body > * {
  min-height: 0;
}





/* ================================
   USER INFO PANEL (FIXED IN MENU)
================================ */

#dd-user-panel {
  position: absolute;
  top: 115px;
  left: 50%;
  transform: translateX(-50%);
  width: 67%;
  max-width: 355px;
  z-index: 5;
  pointer-events: none;
}

.dd-user-panel-bg {
  width: 100%;
  display: block;
}

/* ================================
   PANEL CONTENT OVERLAY
================================ */

.dd-user-panel-content {
  position: absolute;
  inset: 0;
  height: 100%;

  padding: 12px 16px;
  box-sizing: border-box;

  display: flex;
  align-items: center;

  margin-left: 10px;
  pointer-events: auto;
}

/* ================================
   GRID LAYOUT (FIXED)
================================ */

.dd-user-grid {
  width: 100%;
  height: 100%;

  display: grid;
  grid-template-columns: 0.8fr auto;
  column-gap: 26px;

  align-items: center;
  margin-top: 5px;
}

/* ================================
   LEFT COLUMN
================================ */

.dd-user-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.dd-user-name {
  font-family: "Game2", sans-serif;
  font-size: 25px;
  color: #ffffff;
  text-shadow: 2px 3px 1px rgb(0 0 0);
  line-height: 1.1;


}

.dd-user-name-header {
  font-family: "Game2", sans-serif;
  font-size: 25px;
  color: #ffffff; 
  height: 25px;   
  display: flex;
  align-items: center;
  justify-content: center;

  font-size: clamp(14px, 2.2vw, 20px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ================================
   RIGHT COLUMN
================================ */

.dd-user-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

/* ================================
   USER STATS (GENERIC)
================================ */

.dd-user-stat {
  display: flex;
  align-items: center;
  gap: 6px;

  font-family: "Baloo2", sans-serif;
  font-size: 17px;
  color: #ffffff;

  text-shadow: 0 2px 2px rgba(0,0,0,0.5);
}

.dd-user-stat img {
  width: 32px;
  height: auto;
}

.dd-user-stat img.slopepass {
  width: 46px;
}

/* ================================
   VIP PASS STYLING
================================ */

.dd-user-stat.vip {
  font-size: 14px;
  line-height: 1;
}

/* Inactive (default) */
.dd-user-stat.vip .vip-icon {
  width: 40px;
  height: auto;
  filter: grayscale(100%) brightness(0.85);
  opacity: 0.7;
}

/* Active */
.dd-user-stat.vip.active .vip-icon {
  filter: none;
  opacity: 1;
}

.dd-user-stat.vip.active .vip-label {
  color: #ffe37a;
  text-shadow:
    0 0 6px rgba(255, 215, 100, 0.55),
    0 2px 2px rgba(0,0,0,0.6);
}






/* ===============================
   MODAL (FROSTY + WOODSY)
================================ */

#dd-modal-overlay {
  position: fixed;
  inset: 0;

  background: radial-gradient(
    circle at 50% 35%,
    rgba(255,255,255,0.65),
    rgba(190,220,255,0.75)
  );

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 9999;

  /* match original behavior */
  opacity: 1;
  pointer-events: none;
}

#dd-modal-overlay.show {
  pointer-events: auto;
}


/* ---- MODAL BOX ---- */
.dd-modal {
  background: linear-gradient(
    180deg,
    #ffffff,
    #eaf4ff
  );

  border-radius: 18px;
  width: 90%;
  max-width: 420px;
  max-height: 80vh;

  display: flex;
  flex-direction: column;
  overflow: hidden;

  box-shadow:
    0 16px 36px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.9);

  opacity: 0;
  transform: translateY(20px) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#dd-modal-overlay.show .dd-modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}


/* ---- HEADER (WOOD PLANK) ---- */
.dd-modal-header {
  padding: 14px 18px;

  background: linear-gradient(
    180deg,
    #5fb8ff,
    #3f8fd8
  );

  font-family: "Game2", sans-serif;
  font-size: 20px;
  color: #ffffff;

  text-shadow:
    0 2px 2px rgba(0,0,0,0.35);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    inset 0 -2px 0 rgba(0,0,0,0.25);
}


/* ---- BODY ---- */
.dd-modal-body {
  font-family: "Baloo2";
  padding: 18px;

  color: #163a5f; /* DARKER = readable */
  font-size: 16px;
  line-height: 1.45;

  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.9),
    rgba(235,245,255,0.85)
  );
}


/* ---- FOOTER ---- */
.dd-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;

  padding: 14px 18px;

  background: #e3f0ff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}


/* ---- BUTTONS ---- */
.dd-modal-btn {
  padding: 10px 18px;

  font-family: "Game2", sans-serif;
  font-size: 14px;

  border-radius: 999px;
  border: none;
  cursor: pointer;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.6),
    inset 0 -2px 0 rgba(0,0,0,0.25),
    0 3px 6px rgba(0,0,0,0.25);

  transition:
    transform 0.1s ease,
    filter 0.1s ease;
}

.dd-modal-btn:hover {
  transform: scale(1.06);
  filter: brightness(1.1);
}

.dd-modal-btn:active {
  transform: scale(0.96);
}


/* Variants */
.dd-modal-btn.primary {
  background: linear-gradient(180deg, #6df2ff, #4ecbff);
  color: #0b3550;
}

.dd-modal-btn.secondary {
  background: linear-gradient(180deg, #ffffff, #e6eef6);
  color: #24445f;
}

.dd-modal-btn.danger {
  background: linear-gradient(180deg, #ff7a7a, #e45353);
  color: #fff;
}






/* ======================================================
   VIP SLOPE PASS USERNAME
====================================================== */

.username-vip {
  font-family: "Game2";
  font-weight: 100;
  font-size: 24px;
  letter-spacing: 0.5px;

  background-image: repeating-linear-gradient(
    90deg,
    #ff4d4d 0px,
    #ffb84d 40px,
    #ffff4d 80px,
    #4dff88 120px,
    #4dd2ff 160px,
    #8b6cff 200px,
    #ff4dd2 240px,
    #ff4d4d 280px
  );

  background-size: 280px 100%;
  background-position: 0 50%;

  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  animation: vip-rainbow-scroll 6s linear infinite;

  /* Gradient-safe shadow */
  filter:
    drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9))
    drop-shadow(0 0 4px rgba(0, 0, 0, 0.6));
}

.username-vip.ticker {
  font-family: "Game2";
  font-weight: 100;
  font-size: 13px;
  letter-spacing: 0.5px;
}

@keyframes vip-rainbow-scroll {
  from { background-position:    0px 50%; }
  to   { background-position: -280px 50%; }
}


/* Optional: subtle glow on dark backgrounds */
.username-vip::selection {
  background: rgba(255, 255, 255, 0.2);
}










/* ======================================================
   MY ACCOUNT PANEL
====================================================== */

.dd-htp-panel.myaccount {
  width: 100%;
  height: 83%;
  padding: 12px;
  border-radius: 14px;

  background: rgb(46 29 8 / 81%);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.25),
    0 6px 16px rgba(0,0,0,0.35);

  box-sizing: border-box;
}

.dd-htp-panel .dd-htp-content {
    width: 100%;
    max-width: 420px;
    height: 100%;
    max-height: 100%;
    padding: 0px;
    box-sizing: border-box;
    background: none;
    backdrop-filter: none;
    border-radius: 0px;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 17px;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}
/* ======================================================
   SECTION
====================================================== */

.dd-account-section {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.dd-account-section:last-child {
  border-bottom: none;
}

.dd-account-section-title {
  font-family: "Game2";
  font-size: 18px;
  color: #ffffff;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.8);
  margin-bottom: 12px;
}

/* ======================================================
   ROWS & LABELS
====================================================== */

.dd-account-row {
  margin-bottom: 12px;
}

.dd-account-row label {
  display: block;
  font-family: "Baloo2";
  font-size: 14px;
  color: #f0f0f0;
  margin-bottom: 4px;
}

/* ======================================================
   INPUTS
====================================================== */

.dd-account-input {
  width: 90%;
  height: 38px;
  padding: 0 10px;

  border-radius: 8px;
  border: none;
  outline: none;

  background: rgba(255,255,255,0.95);
  color: #222;

  font-family: "Baloo2";
  font-size: 15px;

  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.25);
}

.dd-account-input:focus {
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.25),
    0 0 0 2px rgba(108,240,255,0.65);
}

/* ======================================================
   INPUT + BUTTON ROW
====================================================== */

.dd-account-field {
  display: flex;
  gap: 8px;
  align-items: center;
}

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

.dd-account-btn {
  height: 38px;
  padding: 0 14px;

  border-radius: 8px;
  border: none;
  cursor: pointer;

  font-family: "Game2";
  font-size: 14px;
  white-space: nowrap;

  background: linear-gradient(
    to bottom,
    #6cf0ff,
    #4ecbff
  );

  color: #06263a;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 3px 6px rgba(0,0,0,0.35);

  transition:
    transform 0.12s ease,
    filter 0.12s ease,
    opacity 0.12s ease;
}

.dd-account-btn:hover {
  filter: brightness(1.08);
  transform: scale(1.03);
}

.dd-account-btn:active {
  transform: scale(0.97);
}

.dd-account-btn:disabled {
  opacity: 0.55;
  filter: grayscale(50%);
  pointer-events: none;
}

.dd-account-btn.wide {
  width: 100%;
  margin-top: 8px;
}

/* ======================================================
   HINT TEXT
====================================================== */

.dd-account-hint {
  font-family: "Baloo2";
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  margin-top: 4px;
}

/* ======================================================
   DANGER ZONE
====================================================== */

.dd-account-section.danger {
  background: rgba(90, 10, 10, 0.25);
  padding: 12px;
  border-radius: 12px;
}

.dd-account-section-title.danger {
  color: #ffb3b3;
}

.dd-account-hint.danger {
  color: rgba(255,200,200,0.85);
}

.dd-account-btn.danger {
  background: linear-gradient(
    to bottom,
    #ff6a6a,
    #e14a4a
  );
  color: #3a0000;
}

.dd-account-btn.danger:hover {
  filter: brightness(1.1);
}

/* ======================================================
   MOBILE TUNING
====================================================== */

@media (max-width: 420px) {
  .dd-account-field {
    flex-direction: column;
  }

  .dd-account-btn {
    width: 100%;
  }
}







































@media (max-height: 790px) {
    .dd-menu-panel {    
        transform: scale(0.9) translateY(-45px)    
    }
}



@media (max-width: 480px) {

    :root {
      --dd-mountain-card-height: 220px; /* single tuning knob */
    }
     .dd-menu-root {
        justify-content: center;
        align-content: center;
    }
    .dd-menu-home {
        padding-top: 30px;
        gap: 20px;
    }
    .dd-menu-panel {
        width: min(92vw, 455px);
        min-width: 455px;
        transform: scale(0.98);
        transform-origin: center;
    }
    .dd-menu-header {
        max-width: 300px;
    }
    #dd-menu-getready .dd-slope-panel.gr {
        height: 70%;
        max-height: 70%;
        width: 66%;
    }
    #dd-menu-slopes .dd-slope-panel, #dd-menu-getready .dd-slope-panel {
        width: 100%;
        max-height: 87%;
        height: 87%;        
    }
    .dd-htp-panel {
        width: 74%;
        height: 87%;        
    }
    .dd-settings-panel {
        width: 87%;
        height: 73%;    
        margin-top: 0px;
    }
    
    .dd-user-name {    
      font-size: 20px;      
    }

    .dd-user-stat {      
      font-size: 15px;      
    }

    .dd-slope-unlock-btn {
        max-height: 55px;
    }


    #dd-menu-mountains .dd-mountain-card {
      height: auto;
    }

    #dd-menu-mountains .dd-mountain-logo {
      width: 45px;
    }

    #dd-menu-mountains .dd-progress {
        width: 100%;
        height: 23px;
        padding: 4px;
        max-width: 100%;
        margin-top: 5px;
        border-radius: 50px;
        box-sizing: border-box;
        background: linear-gradient(
        to bottom,
        #7a4a1f,
        #5c3817
      );
        box-shadow: inset 0 1px 2px rgba(255,255,255,0.25),
        inset 0 -1px 2px rgba(0,0,0,0.4),
        0 2px 4px rgba(0,0,0,0.4);
    }
    
    #dd-menu-mountains .dd-mountain-name {
      font-size: 17px;
    }
    .dd-menu-header {
      margin-top: 46%;
    }
    #dd-menu-mountains .dd-mountain-card {
      justify-content: space-around;
    }

    
}




@media (max-width: 400px) {

    :root {
      --dd-mountain-card-height: 220px; /* single tuning knob */
    }
    .dd-menu-root {
        justify-content: center;
    }
    .dd-menu-home {
        padding-top: 30px;
        gap: 5px;
    }
    .dd-menu-panel {
        width: min(92vw, 440px);
        min-width: 440px;
        transform: scale(0.93);
        transform-origin: center;
    }
    .dd-menu-header {
        max-width: 300px;
    }
    #dd-menu-getready .dd-slope-panel.gr {
        height: 69%;
        max-height: 69%;
        width: 66%;
    }
    #dd-menu-slopes .dd-slope-panel, #dd-menu-getready .dd-slope-panel {
        width: 100%;
        max-height: 87%;
        height: 87%;        
    }
    .dd-htp-panel {
        width: 74%;
        height: 87%;        
    }
    .dd-settings-panel {
        width: 87%;
        height: 73%;    
        margin-top: 0px;
    }

    
}








































/* =====================
   PAUSE OVERLAY
===================== */
#dd-pause-overlay {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    z-index: 2147483600;
    background: radial-gradient(1000px 600px at 50% 35%,
            rgba(0, 0, 0, 0.35),
            rgba(0, 0, 0, 0.85));

}

#dd-pause-overlay .frosted-card {
    min-height: 50px;
    background: rgb(255 255 255 / 30%);
}

#dd-pause-overlay .dd-title {
    text-align: center;
}

#dd-pause-overlay.show {
    display: grid;
}

#dd-pause-overlay .dd-pause-card {
    text-align: center;
    max-width: 360px;
}

#dd-pause-overlay .dd-pause-sub {
    margin-top: 18px;
    font-size: 1rem;
    opacity: 0.8;
}


#dd-btn-pause-global {
    display: block;
    position: absolute;
    top: 15px;
    right: 15px;
    width: 55px;
    height: 55px;
}

#dd-btn-pause-global.hidden {
    display: none;
}





/* ======================================================
   MENU INTERACTION CONTRACT (GLOBAL, FINAL)
====================================================== */

/* Panels are NEVER interactive unless active */
.dd-menu-panel-content {
  pointer-events: none;
}

/* Active panels accept input */
.dd-menu-panel-content.active {
  pointer-events: auto;
}

/* Panels are non-interactive until active */
.dd-menu-panel-content:not(.active) * {
  pointer-events: none;
}




