/* ==========================================================
   CUPCAKE ARCADE
   Version 1.0
========================================================== */


/* ==========================
   BODY BACKGROUND
========================== */

body{

    background:
        radial-gradient(circle at top,#243b72 0%,#0f172a 60%);

    color:white;

    overflow-x:hidden;

}


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

.arcade-header{

    text-align:center;

    padding:60px 20px 30px;

}

.arcade-header .title{

    font-size:56px;

    color:white;

    text-shadow:
        0 0 15px #ff4fa3,
        0 0 35px #59d8ff;

}

.arcade-header .subtitle{

    font-size:20px;

    color:#d8e4ff;

}


/* ==========================
   DASHBOARD
========================== */

.dashboard{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));

    gap:20px;

    margin:40px 0;

}

.stat-card{

    display:flex;

    align-items:center;

    gap:20px;

    padding:22px;

    background:rgba(255,255,255,.08);

    border:1px solid rgba(255,255,255,.15);

    border-radius:18px;

    backdrop-filter:blur(16px);

    transition:.35s;

}

.stat-card:hover{

    transform:translateY(-8px);

    box-shadow:
        0 0 30px rgba(89,216,255,.35);

}

.stat-card span{

    font-size:44px;

}

.stat-card h3{

    margin-bottom:5px;

}

.stat-card p{

    font-size:22px;

    font-weight:bold;

}


/* ==========================
   WEATHER
========================== */

.weather-banner{

    margin:35px 0;

    text-align:center;

}


/* ==========================
   FEATURED GAME
========================== */

.featured-game{

    text-align:center;

    margin:50px 0;

}

.featured-game h3{

    margin:20px 0;

    font-size:34px;

}

.featured-game p{

    max-width:700px;

    margin:auto;

    line-height:1.7;

}


/* ==========================
   GAMES GRID
========================== */

.games-grid{

    display:grid;

    grid-template-columns:
        repeat(auto-fit,minmax(260px,1fr));

    gap:25px;

    margin:60px 0;

}

.game-card{

    text-align:center;

    cursor:pointer;

    transition:.35s;

    min-height:220px;

    display:flex;

    flex-direction:column;

    justify-content:center;

}

.game-card:hover{

    transform:
        translateY(-10px)
        scale(1.03);

    box-shadow:
        0 0 35px rgba(255,79,163,.45);

}

.game-card h2{

    margin-bottom:15px;

}


/* ==========================
   DAILY CHALLENGE
========================== */

.daily{

    margin:60px 0;

    text-align:center;

}


/* ==========================
   PLAY BUTTON
========================== */

#openWheel{

    margin-top:30px;

}


/* ==========================
   FLOATING LIGHTS
========================== */

body::before{

    content:"";

    position:fixed;

    inset:0;

    pointer-events:none;

    opacity:.25;

    background-image:

        radial-gradient(circle,#ffffff 2px,transparent 2px);

    background-size:90px 90px;

    animation:
        sparkle 20s linear infinite;

}


/* ==========================
   ANIMATIONS
========================== */

@keyframes sparkle{

    from{

        transform:translateY(0);

    }

    to{

        transform:translateY(-90px);

    }

}
/* ==========================================
   MODAL SYSTEM
========================================== */

#cc-modal-overlay{

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.75);

    display:flex;

    justify-content:center;

    align-items:center;

    z-index:9999;

    backdrop-filter:blur(8px);

    animation:fadeIn .25s ease;

}

#cc-modal{

    width:min(700px,90%);

    background:#182340;

    border:2px solid rgba(255,255,255,.15);

    border-radius:20px;

    box-shadow:
        0 0 40px rgba(255,79,163,.35);

    overflow:hidden;

}

.cc-modal-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:18px 24px;

    background:rgba(255,255,255,.08);

}

.cc-modal-header h2{

    margin:0;

}

#cc-close-btn{

    border:none;

    background:none;

    color:white;

    font-size:22px;

    cursor:pointer;

}

#cc-close-btn:hover{

    transform:scale(1.2);

}

.cc-modal-body{

    padding:30px;

}

@keyframes fadeIn{

    from{

        opacity:0;

    }

    to{

        opacity:1;

    }

}

/* ===== LUCKY WHEEL FIXED POINTER ===== */

.lucky-wheel {
    position: relative;
}

#wheel-pointer {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;

    font-size: 42px;
    line-height: 1;
    color: #ff4f8b;

    text-shadow:
        0 2px 3px rgba(0, 0, 0, 0.35),
        0 0 8px rgba(255, 79, 139, 0.5);

    pointer-events: none;
}

/* ===== LUCKY WHEEL POINTER CLICK ===== */

#wheel-pointer {
    transform-origin: 50% 0%;
}

#wheel-pointer.pointer-click {
    animation: pointerClick 0.3s ease;
}

@keyframes pointerClick {
    0% {
        transform: translateX(-50%) rotate(0deg);
    }

    35% {
        transform: translateX(-50%) rotate(18deg);
    }

    70% {
        transform: translateX(-50%) rotate(-10deg);
    }

    100% {
        transform: translateX(-50%) rotate(0deg);
    }
}

/* ===== PRIZE LABELS INSIDE WHEEL ===== */

.wheel-label {
    position: absolute;
    width: 90px;
    text-align: center;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.05;
    color: white;
    text-shadow: 1px 2px 3px rgba(0, 0, 0, 0.8);
    z-index: 5;
}

/* Top-left */
.wheel-label.l1 {
    top: 15%;
    left: 25%;
}

/* Top-right */
.wheel-label.l2 {
    top: 15%;
    right: 25%;
}

/* Right-upper */
.wheel-label.l3 {
    top: 34%;
    right: 7%;
}

/* Right-lower */
.wheel-label.l4 {
    bottom: 24%;
    right: 8%;
}


/* =========================================
   LUCKY CUPCAKE WHEEL - IMAGE VERSION
========================================= */

#wheel {
    width: 420px;
    height: auto;
    margin: 0 auto;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    position: relative;
}

#wheel-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 0;
}

/* ===== Lucky Wheel Fixed Pointer ===== */

#wheel-container {
  position: relative;
  width: fit-content;
  margin: 0 auto;
}

#wheel {
  position: relative;
  overflow: hidden;
}

#wheel-image {
  display: block;
  width: 100%;
  transition: transform 4s cubic-bezier(0.12, 0.8, 0.2, 1);
}

#fixed-wheel-pointer {
  position: absolute;
  top: 50%;
  right: -18px;
  transform: translateY(-50%);
  z-index: 20;
  font-size: 46px;
  color: orange;
  pointer-events: none;
}
/* Hide the red pointers built into the wheel image */
#wheel {
  clip-path: circle(46% at 50% 50%);
  overflow: hidden;
}

/* ===== 3D WHEEL ANIMATED LIGHTS ===== */

#wheel-container::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 12;

  background: repeating-conic-gradient(
    from 0deg,
    rgba(255,255,255,0.95) 0deg 3deg,
    transparent 3deg 11deg
  );

  -webkit-mask: radial-gradient(
    circle,
    transparent 0%,
    transparent 43%,
    #000 44%,
    #000 49%,
    transparent 50%
  );

  mask: radial-gradient(
    circle,
    transparent 0%,
    transparent 43%,
    #000 44%,
    #000 49%,
    transparent 50%
  );

  opacity: 0;
}

#wheel-container.lights-running::after {
  opacity: 1;
  animation: wheelLightsChase 0.45s linear infinite;
}

@keyframes wheelLightsChase {
  from {
    transform: rotate(0deg);
    filter: brightness(1);
  }

  to {
    transform: rotate(360deg);
    filter: brightness(1.8);
  }
}

/* ===== XP LEVEL PROGRESS ===== */

.xp-progress-wrap {
  width: 320px;
  max-width: 90%;
  margin: 18px auto 0;
  padding: 14px 16px;
  background: rgba(12, 24, 60, 0.88);
  border: 1px solid rgba(255, 215, 0, 0.45);
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 0 18px rgba(255, 193, 7, 0.18);
}

.xp-progress-label {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 800;
  color: white;
}

.xp-progress-track {
  width: 100%;
  height: 16px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  overflow: hidden;
}

#xp-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, #ffd700, #ff9f1c);
  box-shadow: 0 0 10px rgba(255, 193, 7, 0.65);
  transition: width 0.6s ease;
}

#view-level-rewards-btn {
  margin-top: 12px;
  padding: 10px 18px;
  border: none;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, #ffd700, #ff9f1c);
  color: #172554;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

#view-level-rewards-btn:hover {
  transform: scale(1.04);
}


/* CUPCAKE ARCADE — MOBILE BACK BUTTON */

.arcade-mobile-back {
    display: none;
}

@media (max-width: 600px) {
    .arcade-mobile-back {
        display: block;
        width: fit-content;
        max-width: calc(100% - 40px);
        margin: 20px 20px 0;
        padding: 12px 20px;
        border: 1px solid #e8b8dc;
        border-radius: 30px;
        background: linear-gradient(135deg, #d93f91, #8539c5);
        color: #ffffff;
        font-size: 15px;
        font-weight: 700;
        text-decoration: none;
        text-align: center;
        box-shadow: 0 4px 14px rgba(150, 55, 155, 0.3);
    }
}


/* ANDROID LUCKY WHEEL FIT FIX */
@media (max-width: 768px) {

  .lucky-wheel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  #wheel-container {
    position: relative !important;
    display: block !important;
    width: min(76vw, 320px) !important;
    height: min(76vw, 320px) !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 20px auto 35px !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    box-sizing: border-box !important;
  }

  #wheel {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    clip-path: circle(46% at 50% 50%) !important;
  }

  #wheel-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
  }

  #fixed-wheel-pointer {
    right: -12px !important;
    font-size: 28px !important;
  }

  #spin-wheel-btn {
    position: relative !important;
    display: block !important;
    margin: 20px auto 35px !important;
    z-index: 1 !important;
  }

}
/* END ANDROID LUCKY WHEEL FIT FIX */
