/* assets/css/style.css - Main Stylesheet with Variables - ENHANCED VERSION */

/* ========================================
   CSS CUSTOM PROPERTIES (VARIABLES)
======================================== */

@import url('https://fonts.googleapis.com/css2?family=El+Messiri:wght@400..700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
  /* Colors */
  --primary-color: #bf1e2b;
  --primary-hover: #a01823;
  --primary-light: rgba(191, 30, 43, 0.3);
  --primary-lighter: rgba(191, 30, 43, 0.1);

  --success-color: #4caf50;
  --warning-color: #ffa000;
  --badge-color: #ffd700;
  --background-color: #f7f7f7;
  --white: #ffffff;
  --black: #000000;
  --gray-text: #333;
  --gray-light: #666;
  --gray-lighter: #cccccc;
  --gray-bg: #f0f0f0;
  --gray-bg-hover: #e0e0e0;
  --gray-disabled: #d5d4d4a7;

  /* NEW: Control Button Colors */
  --start-btn-color: #2196f3;
  --start-btn-hover: #1976d2;
  --stop-btn-color: #dc3545;
  --stop-btn-hover: #c82333;
  --control-btn-disabled: #cccccc;

  /* Typography */
  --font-family: "Inter", sans-serif;
  --font-weight-normal: 400;
  --font-weight-bold: 600;
  --font-weight-heavy: 900;

  /* Font Sizes (using clamp for responsive) */
  --font-size-xs: clamp(9px, 2vw, 11px);
  --font-size-sm: clamp(11px, 2.5vw, 14px);
  --font-size-base: clamp(14px, 3vw, 16px);
  --font-size-lg: clamp(16px, 3.5vw, 20px);
  --font-size-xl: clamp(18px, 4.5vw, 26px);
  --font-size-2xl: clamp(16px, 3.5vw, 28px);
  --font-size-3xl: clamp(22px, 4vw, 28px);
  --font-size-4xl: clamp(28px, 3.5vw, 28px);

  /* Spacing */
  --spacing-xs: clamp(5px, 1vw, 8px);
  --spacing-sm: clamp(8px, 2vw, 12px);
  --spacing-base: clamp(10px, 2vw, 15px);
  --spacing-lg: clamp(15px, 3vw, 20px);
  --spacing-xl: clamp(20px, 4vw, 30px);
  --spacing-2xl: clamp(25px, 5vw, 40px);
  --spacing-3xl: clamp(30px, 6vw, 50px);

  /* Container Sizes */
  --wheel-size-mobile: min(85vw, 85vh, 400px);
  --wheel-size-tablet: min(70vw, 70vh, 500px);
  --wheel-size-desktop: min(60vw, 60vh, 600px);
  --wheel-size-large: min(50vw, 50vh, 650px);

  --main-container-mobile: min(95vw, 95vh, 500px);
  --main-container-desktop: min(95vw, 95vh, 800px);

  /* Logo Sizes */
  --logo-size-mobile: clamp(65px, 12vw, 80px);
  --logo-size-tablet: clamp(100px, 15vw, 180px);
  --logo-size-desktop: clamp(150px, 12vw, 200px);
  --logo-size-large: clamp(180px, 10vw, 220px);

  /* Platform Icons */
  --platform-width: clamp(80px, 16vw, 110px);
  --platform-height: clamp(100px, 18vw, 130px);
  --platform-width-mobile: clamp(70px, 20vw, 90px);
  --platform-height-mobile: clamp(90px, 22vw, 110px);
  --platform-gap: clamp(15px, 4vw, 25px);
  --platform-gap-mobile: 12px;

  /* NEW: Control Button Sizes - SMALLER & CLOSER */
  --control-btn-width: clamp(60px, 12vw, 80px);
  --control-btn-height: clamp(30px, 5vh, 40px);
  --control-btn-font: clamp(11px, 2.8vw, 14px);
  --control-btn-gap: clamp(15px, 3vw, 25px);

  /* Border Radius */
  --radius-sm: clamp(6px, 1.5vw, 8px);
  --radius-base: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-round: 25px;
  --radius-full: 50%;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(191, 30, 43, 0.3);
  --shadow-base: 0 4px 15px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-pointer: 0 2px 3px rgba(0, 0, 0, 0.3);
  --shadow-logo: 0 2px 8px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.8s ease-out;

  /* Z-Index */
  --z-pointer: 2;
  --z-logo: 100;
  --z-share: 110;
  --z-banner: 50;
  --z-controls: 60;
  --z-celebration: 200;
  --z-popup: 1000;
  --z-feedback: 10000;

  /* Breakpoints (for use in media queries) */
  --bp-xs: 320px;
  --bp-sm: 375px;
  --bp-md: 480px;
  --bp-lg: 580px;
  --bp-xl: 768px;
  --bp-2xl: 1024px;
  --bp-3xl: 1400px;

  /* Chart Sizes */
  --chart-container-height: 420px;
  --chart-wrapper-height: 320px;
  --chart-container-height-tablet: 380px;
  --chart-wrapper-height-tablet: 280px;
  --chart-container-height-mobile: 340px;
  --chart-wrapper-height-mobile: 240px;
}



/* ========================================
 RESET & BASE STYLES
======================================== */

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: var(--spacing-xs) var(--spacing-base);
  background: var(--background-color);
  overflow-x: hidden;
  position: relative;
}

/* ========================================
 FLOATING BACKGROUND BUBBLES - LIKE LANDING PAGE
======================================== */

.background-decoration {
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  top: 0;
  left: 0;
  pointer-events: none;
}

.bg-circle {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(45deg,
      rgba(191, 30, 43, 0.1),
      rgba(191, 30, 43, 0.05));
  animation: float 6s ease-in-out infinite;
}

.bg-circle:nth-child(1) {
  width: 200px;
  height: 200px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.bg-circle:nth-child(2) {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.bg-circle:nth-child(3) {
  width: 100px;
  height: 100px;
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

.bg-circle:nth-child(4) {
  width: 120px;
  height: 120px;
  top: 35%;
  right: 25%;
  animation-delay: 1s;
}

.bg-circle:nth-child(5) {
  width: 80px;
  height: 80px;
  bottom: 15%;
  right: 8%;
  animation-delay: 3s;
}

.bg-circle:nth-child(6) {
  width: 90px;
  height: 90px;
  top: 50%;
  left: 5%;
  animation-delay: 5s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.4;
  }

  33% {
    transform: translateY(-20px) rotate(120deg);
    opacity: 0.7;
  }

  66% {
    transform: translateY(-10px) rotate(240deg);
    opacity: 0.5;
  }
}

/* ========================================
 LAYOUT CONTAINERS
======================================== */

.main-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100vw;
  gap: var(--spacing-base);
  position: relative;
  z-index: 1;
  min-height: 80vh;
  justify-content: center;
  /* padding-top: clamp(80px, 12vh, 120px); */
  /* padding-bottom: var(--spacing-xl); */
}

.wheel-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  width: 100%;
  flex: 1;
  justify-content: center;
}

.logo-container {
  position: fixed;
  top: var(--spacing-base);
  right: var(--spacing-base);
  width: var(--logo-size-mobile);
  z-index: var(--z-logo);
}

.logo-container svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(var(--shadow-logo));
}

/* ========================================
 SHARE BUTTON - REPOSITIONED TO TOP LEFT
======================================== */

.share-container {
  position: fixed;
  top: calc(var(--spacing-base) + 10px);
  /* Pushed down 10px */
  left: var(--spacing-base);
  z-index: var(--z-share);
  margin: 0;
  text-align: left;
}

.share-btn {
  background-color: var(--white);
  color: var(--primary-color);
  border: none;
  border-radius: var(--radius-round);
  padding: var(--spacing-sm) var(--spacing-base);
  font-size: clamp(12px, 3vw, 14px);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  direction: rtl;
  box-shadow: var(--shadow-sm);
  min-width: auto;
}

.share-btn:hover {
  background-color: var(--gray-disabled);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--primary-light);
}

.share-btn:active {
  transform: scale(0.95) translateY(0);
}

/* ========================================
 TYPOGRAPHY
======================================== */

.page-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--primary-color);
  text-align: center;
  margin-top: clamp(60px, 8vh, 80px);
  margin-bottom: var(--spacing-base) var(--spacing-xl);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  direction: rtl;
  line-height: 1.3;
  padding: 0 var(--spacing-base);
  max-width: calc(100% - var(--spacing-2xl));
  margin-left: auto;
  margin-right: auto;
}

.new-badge {
  color: var(--black);
  font-weight: var(--font-weight-heavy);
  font-size: 0.7em;
  background: var(--badge-color);
  padding: 2px var(--spacing-xs);
  border-radius: var(--radius-lg);
  margin: 0 var(--spacing-xs);
}

#result {
  margin-top: var(--spacing-xs);
  margin-bottom: var(--spacing-sm);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--success-color);
  min-height: clamp(30px, 5vh, 40px);
  text-align: center;
  padding: 0 var(--spacing-base);
  line-height: 1.3;
}

/* ========================================
 SPINNING WHEEL & NEW CONTROL BUTTONS
======================================== */

.wheel-container {
  position: relative;
  width: 90%;
  max-width: 500px;
  margin: 0 auto 40px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Container 3D enhancement */
  perspective: 1200px;
  perspective-origin: center center;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-base);

  /* Enhanced rendering for crispy graphics */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: optimizeSpeed;

  /* Hardware acceleration */
  transform: translateZ(0);
  will-change: transform;

  /* Better font rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

#pointer {
  width: 0;
  height: 0;
  border-left: clamp(8px, 2vw, 12px) solid transparent;
  border-right: clamp(8px, 2vw, 12px) solid transparent;
  border-top: clamp(12px, 2.5vw, 18px) solid var(--primary-color);
  position: absolute;
  top: -3%;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-pointer);
  filter: drop-shadow(var(--shadow-pointer));
}

.canvas-3d-subtle {
  width: 100%;
  height: 100%;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-full);

  /* Multi-layered shadows for depth */
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.15),
    0 4px 8px rgba(0, 0, 0, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);

  /* Slight perspective */
  transform: perspective(1000px) rotateX(2deg);
  transition: transform 0.3s ease;
}

.canvas-3d-subtle:hover {
  transform: perspective(1000px) rotateX(0deg) scale(1.02);
}

/* 🎨 OPTION 2: Dramatic 3D with Glow */
.canvas-3d-dramatic {
  width: 100%;
  height: 100%;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-full);
  position: relative;

  /* Dramatic shadows */
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 10px 20px rgba(0, 0, 0, 0.2),
    0 5px 10px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    0 0 60px rgba(220, 53, 69, 0.3);
  /* Red glow */

  /* 3D perspective */
  transform: perspective(784px) rotateX(1deg);
  transition: all 0.4s ease;
}

.canvas-3d-dramatic:hover {
  transform: perspective(784px) rotateX(0deg) scale(1.01);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.4),
    0 15px 30px rgba(0, 0, 0, 0.3),
    0 8px 15px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    0 0 80px rgba(220, 53, 69, 0.5);
}

/* 🌟 OPTION 3: Floating 3D with Ring */
.canvas-3d-floating {
  width: 100%;
  height: 100%;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-full);
  position: relative;

  /* Floating effect */
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.25),
    0 12px 25px rgba(0, 0, 0, 0.15),
    0 6px 12px rgba(0, 0, 0, 0.1);

  transform: perspective(1000px) rotateX(8deg) translateY(-10px);
  transition: all 0.5s ease;
}

.canvas-3d-floating::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: var(--radius-full);
  border: 3px solid transparent;
  background: linear-gradient(45deg,
      rgba(220, 53, 69, 0.8),
      rgba(255, 193, 7, 0.8),
      rgba(40, 167, 69, 0.8),
      rgba(0, 123, 255, 0.8)) border-box;
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  z-index: -1;
  animation: rotate3d 4s linear infinite;
}

@keyframes rotate3d {
  0% {
    transform: rotateZ(0deg);
  }

  100% {
    transform: rotateZ(360deg);
  }
}

/* 🔮 OPTION 4: Glass Morphism 3D */
.canvas-3d-glass {
  width: 100%;
  height: 100%;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-full);
  position: relative;

  /* Glass effect */
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);

  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.2),
    0 8px 15px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);

  transform: perspective(1000px) rotateX(3deg);
  transition: all 0.3s ease;
}

.canvas-3d-glass::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 20%;
  width: 30%;
  height: 30%;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.4) 0%,
      rgba(255, 255, 255, 0.1) 50%,
      transparent 100%);
  border-radius: 50%;
  filter: blur(20px);
  pointer-events: none;
}

/* 🚀 OPTION 5: Cyberpunk 3D */
.canvas-3d-cyber {
  width: 100%;
  height: 100%;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-full);
  position: relative;

  /* Cyberpunk glow */
  box-shadow:
    0 0 20px rgba(0, 255, 255, 0.5),
    0 0 40px rgba(255, 0, 255, 0.3),
    0 15px 30px rgba(0, 0, 0, 0.3),
    inset 0 0 20px rgba(255, 255, 255, 0.1);

  transform: perspective(1200px) rotateX(10deg);
  transition: all 0.4s ease;

  /* Animated border */
  border: 2px solid transparent;
  background: linear-gradient(45deg, #00ffff, #ff00ff, #ffff00, #00ffff) border-box;
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: cyberPulse 2s ease-in-out infinite alternate;
}

@keyframes cyberPulse {
  0% {
    box-shadow:
      0 0 20px rgba(0, 255, 255, 0.5),
      0 0 40px rgba(255, 0, 255, 0.3),
      0 15px 30px rgba(0, 0, 0, 0.3);
  }

  100% {
    box-shadow:
      0 0 30px rgba(0, 255, 255, 0.8),
      0 0 60px rgba(255, 0, 255, 0.5),
      0 20px 40px rgba(0, 0, 0, 0.4);
  }
}


/* ========================================
 ENHANCED WHEEL CONTROL BUTTONS - FIXED POSITIONING & SIZING
======================================== */

.wheel-controls {
  position: absolute;
  bottom: clamp(-60px, -12vh, -45px);
  left: 50%;
  transform: translate(-50%, -120%);
  display: flex;
  gap: clamp(250px, 50vw, 350px) !important;
  /* Responsive gap */
  z-index: var(--z-controls);
  direction: rtl;
  align-items: center;
  justify-content: center;
}

/* Individual button styling - MADE SMALLER & MORE ELEGANT */
.control-btn {
  /* REDUCED button width significantly */
  width: clamp(60px, 8vw, 80px);
  /* Much smaller than before */
  height: clamp(32px, 4vh, 40px);
  /* Slightly smaller height */
  border: none;
  border-radius: clamp(8px, 2vw, 12px);
  /* Smaller border radius */
  font-size: clamp(12px, 2vw, 15px);
  /* Smaller font */
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-base);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  direction: rtl;
  padding: clamp(6px, 1.5vw, 10px);
  /* Reduced padding */
  min-width: auto;
}

/* Start button styling */
.start-btn {
  background: linear-gradient(135deg, #2196f3, #1976d2);
  color: var(--white);
  border: 2px solid transparent;
}

.start-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #1976d2, #1565c0);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.start-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: var(--shadow-base);
}

/* Stop button styling */
.stop-btn {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: var(--white);
  border: 2px solid transparent;
}

.stop-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #c82333, #bd2130);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.stop-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: var(--shadow-base);
}

/* Disabled state for both buttons */
.control-btn:disabled {
  background: #6c757d !important;
  color: #adb5bd !important;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  border: 2px solid #6c757d !important;
}

/* REMOVED: Old wheel banner styles are now commented out or deleted */
.wheel-banner {
  display: none !important;
  /* Force hide the old banner */
}

/* ========================================
 BUTTONS
======================================== */

.buttons {
  display: flex;
  gap: var(--spacing-base);
  width: 100%;
  max-width: min(95vw, 450px);
  direction: rtl;
  flex-wrap: wrap;
}

button {
  padding: clamp(10px, 2vh, 12px) clamp(15px, 3vw, 20px);
  font-size: clamp(14px, 3.5vw, 18px);
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex: 1;
  min-width: clamp(140px, 30vw, 160px);
  transition: all var(--transition-base);
  display: flex;
  justify-content: center;
  align-items: center;
  direction: rtl;
  text-align: center;
  font-weight: var(--font-weight-bold);
  box-shadow: var(--shadow-sm);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  white-space: nowrap;
}

button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--primary-light);
}

button:active {
  transform: scale(0.95) translateY(0);
  box-shadow: 0 1px 4px var(--primary-light);
}

button:disabled {
  background-color: var(--gray-lighter);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  direction: rtl;
}

button:disabled:hover {
  background-color: var(--gray-lighter);
  transform: none;
}

/* ========================================
 PLATFORM ICONS - ALWAYS VISIBLE
======================================== */

.platforms-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: var(--spacing-lg);
  width: 100%;
}

.platforms-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--primary-color);
  margin: var(--spacing-lg);
  text-align: center;
  direction: rtl;
}

.platforms-icons {
  display: flex;
  justify-content: center;
  gap: var(--platform-gap);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-xl);
}

.platform-icon {
  width: var(--platform-width);
  min-height: var(--platform-height);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-base);
  transition: all var(--transition-base);
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  position: relative;
  cursor: pointer;
}

.platform-icon:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.platform-icon:active {
  transform: translateY(-2px);
}

.platform-icon.inactive {
  opacity: 0.6;
  cursor: default;
}

.platform-icon.inactive:hover {
  transform: none;
  box-shadow: var(--shadow-base);
}

.platform-icon img {
  width: 70%;
  height: auto;
  max-height: 60%;
  object-fit: contain;
  margin-bottom: var(--spacing-xs);
}

.platform-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--gray-text);
  text-align: center;
  padding: 0 var(--spacing-xs);
  line-height: 1.2;
  direction: rtl;
}

.coming-soon {
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--warning-color);
  color: var(--white);
  font-size: var(--font-size-xs);
  padding: 2px var(--spacing-xs);
  border-radius: var(--radius-base);
  font-weight: var(--font-weight-bold);
}

.platform-icon::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-lighter);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.platform-icon:active::before {
  opacity: 1;
}

/* ========================================
 SHARE POPUP
======================================== */

.share-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--z-popup);
  align-items: center;
  justify-content: center;
}

.share-popup.show {
  display: flex;
  animation: fadeIn var(--transition-base);
}

.share-popup-content {
  background: var(--white);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-xl);
  max-width: 350px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-xl);
  direction: rtl;
}

.share-popup-title {
  font-size: var(--spacing-lg);
  font-weight: var(--font-weight-bold);
  color: var(--primary-color);
  margin-bottom: var(--spacing-lg);
}

.share-options {
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.share-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.share-option:hover {
  transform: scale(1.05);
}

.share-option-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 24px;
  box-shadow: var(--shadow-base);
}

.share-option-text {
  font-size: 12px;
  color: var(--gray-light);
  font-weight: var(--font-weight-bold);
}

.close-popup {
  background: var(--primary-color);
  color: var(--white) !important;
  width: 100%;
  border: none;
  border-radius: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  cursor: pointer;
  font-size: var(--font-size-base);
  color: var(--gray-light);
  transition: background-color var(--transition-fast);
}

.close-popup:hover {
  /* background: var(--gray-bg-hover); */
}

/* ========================================
 CHART COMPONENTS (for analytics page)
======================================== */

.chart-container {
  background: var(--white);
  padding: var(--spacing-lg);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-base);
  margin-bottom: var(--spacing-lg);
  position: relative;
  height: var(--chart-container-height);
  max-height: var(--chart-container-height);
  overflow: hidden;
}

.chart-wrapper {
  position: relative;
  height: var(--chart-wrapper-height);
  width: 100%;
  margin: 0 auto;
  max-height: var(--chart-wrapper-height);
}

.chart-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--primary-color);
  margin-bottom: var(--spacing-base);
  text-align: center;
  position: relative;
  z-index: 1;
}

/* ========================================
 ANIMATIONS
======================================== */

.countdown {
  display: inline-block;
  margin-left: var(--spacing-xs);
}

.celebration {
  position: fixed;
  color: var(--primary-color);
  font-weight: var(--font-weight-bold);
  font-size: clamp(18px, 4vw, 24px);
  animation: fall 3s linear forwards;
  z-index: var(--z-celebration);
  user-select: none;
  pointer-events: none;
}

@keyframes fall {
  0% {
    opacity: 1;
    transform: translateY(-10vh) rotate(0deg);
  }

  100% {
    opacity: 0;
    transform: translateY(110vh) rotate(360deg);
  }
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
 RESPONSIVE DESIGN - MOBILE FIRST
======================================== */

/* Extra Small Phones (320px and below) Not sure who is using this :) */
@media (max-width: 320px) {
  .logo-container {
    width: 65px;
    top: var(--spacing-xs);
    right: var(--spacing-xs);
  }

  .share-container {
    top: calc(var(--spacing-xs) + 10px);
    left: var(--spacing-xs);
  }

  .share-btn {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 10px;
  }

  .page-title {
    font-size: 13px;
    margin-top: 75px;
    padding: 0 var(--spacing-xs);
    max-width: calc(100% - 80px);
  }

  #pointer {
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 18px solid var(--primary-color);
  }

  /* NEW: Control buttons for extra small screens - SMALLER */
  .wheel-controls {
    bottom: clamp(-25px, -6vh, -15px);
    gap: clamp(12px, 3vw, 18px);
  }

  .control-btn {
    width: clamp(55px, 12vw, 70px);
    height: clamp(28px, 4.5vh, 32px);
    font-size: clamp(10px, 2.5vw, 12px);
    padding: 8px;
  }
}

/* Small Phones (375px and below) */
@media (max-width: 375px) {
  .logo-container {
    width: 70px;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
  }

  .share-container {
    top: calc(var(--spacing-sm) + 10px);
    left: var(--spacing-sm);
  }

  .page-title {
    font-size: 14px;
    margin-top: 80px;
    padding: 0 var(--spacing-sm);
    max-width: calc(100% - 85px);
  }

  /* NEW: Control buttons for small phones - SMALLER */
  .wheel-controls {
    bottom: clamp(-28px, -7vh, -18px);
    gap: clamp(15px, 3.5vw, 22px);
  }

  .control-btn {
    width: clamp(58px, 13vw, 75px);
    height: clamp(30px, 5vh, 35px);
    font-size: clamp(11px, 2.8vw, 13px);
    padding: 9px;
  }
}

/* Medium Phones (480px and below) */
@media (max-width: 480px) {
  .share-container {
    top: var(--spacing-xs);
    left: var(--spacing-xs);
  }

  .share-btn {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 11px;
  }

  .platforms-icons {
    gap: var(--platform-gap-mobile);
  }

  .platform-icon {
    width: var(--platform-width-mobile);
    min-height: var(--platform-height-mobile);
  }

  .platform-name {
    font-size: 10px;
  }

  .chart-container {
    padding: var(--spacing-sm);
    height: var(--chart-container-height-mobile);
    max-height: var(--chart-container-height-mobile);
  }

  .chart-wrapper {
    height: var(--chart-wrapper-height-mobile);
    max-height: var(--chart-wrapper-height-mobile);
  }

  .chart-title {
    font-size: 14px;
    margin-bottom: var(--spacing-sm);
  }

  /* NEW: Control buttons for medium phones - SMALLER */
  .wheel-controls {
    bottom: clamp(-30px, -8vh, -20px);
    gap: clamp(18px, 4vw, 25px);
  }

  .control-btn {
    width: clamp(60px, 14vw, 78px);
    height: clamp(32px, 5.5vh, 38px);
    font-size: clamp(12px, 3vw, 14px);
    padding: 10px;
  }
}

/* Large Phones (580px and below) like Samsung S23 Ultra */
@media (max-width: 580px) {
  .logo-container {
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    width: 80px;
  }

  .logo-container svg {
    width: 100%;
    height: auto;
  }

  .share-container {
    top: calc(var(--spacing-sm) + 10px);
    left: var(--spacing-sm);
  }

  .page-title {
    /* font-size: clamp(14px, 3.5vw, 18px); */
    /* Smaller on mobile */
    margin-top: clamp(15px, 2vh, 25px);
    margin-bottom: var(--spacing-3xl);
    line-height: 1.1;
    width: 90%;
  }

  .main-container {
    min-height: 100vh;
    justify-content: center;
    padding: var(--spacing-base);
    gap: var(--spacing-base);
    /* Reduced gap due to title */
  }

  .wheel-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    max-width: min(80vw, 60vh);
    /* Slightly smaller to accommodate title */
    margin: 0 auto;
  }

  #result {
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    min-height: 35px;
  }

  .platforms-section {
    margin-top: var(--spacing-base);
    margin-top: 0px;
  }

  .platforms-title {
    margin-bottom: var(--spacing-base);
  }

  /* NEW: Control buttons for large phones like my samsung s23 ultra */
  .wheel-controls {
    bottom: clamp(-32px, -8vh, -22px);
    gap: clamp(250px, 30vh, 300px);
  }

  .control-btn {
    width: clamp(50px, 4vh, 75px);
    height: var(--control-btn-height);
    font-size: var(--control-btn-font);
  }
}

/* Extra tall mobile screens (Samsung S23 Ultra, etc.) */
@media (max-width: 580px) and (min-height: 800px) {
  .main-container {
    min-height: 100vh;
    width: 100vw;
    justify-content: center;
    padding: var(--spacing-lg) var(--spacing-base);
    gap: var(--spacing-lg);
  }

  .wheel-container {
    max-width: min(75vw, 55vh);
    /* Adjusted for title space */
  }

  .page-title {
    /* font-size: clamp(15px, 3.2vw, 19px); */
    /* margin-top: clamp(20px, 3vh, 30px); */
    margin-bottom: var(--spacing-base);
  }

  /* NEW: Control buttons for extra tall screens mmmm what is this */
  .wheel-controls {
    /* bottom: clamp(-35px, -9vh, -25px); */
    gap: clamp(250px, 30vw, 300px);
  }

  .control-btn {
    width: clamp(50px, 4vh, 75px);
    height: clamp(38px, 6.5vh, 48px);
    font-size: clamp(14px, 3.5vw, 17px);
  }
}

/* Tablets (581px - 768px) */
@media (min-width: 581px) and (max-width: 768px) {
  .logo-container {
    width: 100px;
    top: var(--spacing-base);
    right: var(--spacing-base);
  }

  .share-container {
    top: calc(var(--spacing-base) + 10px);
    left: var(--spacing-base);
  }

  .page-title {
    font-size: var(--font-size-2xl);
    max-width: calc(100% - 20px);
    margin-bottom: var(--spacing-xl);
  }

  .chart-container {
    padding: var(--spacing-base);
    height: var(--chart-container-height-tablet);
    max-height: var(--chart-container-height-tablet);
  }

  .chart-wrapper {
    height: var(--chart-wrapper-height-tablet);
    max-height: var(--chart-wrapper-height-tablet);
  }

  .chart-title {
    font-size: 16px;
    margin-bottom: var(--spacing-sm);
  }

  /* NEW: Control buttons for tablets - SMALLER */
  .wheel-controls {
    bottom: clamp(-32px, -6vh, -22px);
    gap: clamp(20px, 4vw, 30px);
  }

  .control-btn {
    width: clamp(65px, 10vw, 85px);
    height: clamp(35px, 4vh, 42px);
    font-size: clamp(13px, 2vw, 16px);
    padding: 10px;
  }
}


/* Large Tablets (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .logo-container {
    width: var(--logo-size-tablet);
  }

  .page-title {
    font-size: clamp(24px, 4vw, 32px);
    margin-top: clamp(100px, 12vh, 120px);
    max-width: 80%;
    line-height: 1.4;
  }

  .main-container {
    min-height: 100vh;
    width: 100vw;
    justify-content: center;
    padding: var(--spacing-lg) var(--spacing-base);
    gap: var(--spacing-lg);
  }


  .wheel-container {
    max-width: var(--wheel-size-tablet);
  }

  /* NEW: Control buttons for large tablets - SMALLER */
  .wheel-controls {
    bottom: clamp(-35px, -5vh, -25px);
    gap: clamp(25px, 3vw, 35px);
  }

  .control-btn {
    width: clamp(70px, 8vw, 90px);
    height: clamp(38px, 3.5vh, 45px);
    font-size: clamp(14px, 1.8vw, 17px);
    padding: 10px;
  }
}

/* Desktop (1025px - 1399px) */
/* My LG TV 65" */
@media (min-width: 1025px) and (max-width: 1399px) {
  .logo-container {
    width: var(--logo-size-desktop);
    top: clamp(25px, 4vh, 35px);
    right: clamp(25px, 4vw, 45px);
  }

  .share-container {
    top: calc(clamp(25px, 4vh, 35px) + 10px);
    left: clamp(25px, 4vw, 45px);
  }

  .page-title {
    font-size: var(--font-size-lg);
    margin-top: clamp(80px, 15vh, 120px);
    margin-bottom: clamp(10px, 15vh, 14px);
    max-width: 100%;
    line-height: 1.5;
  }

  .wheel-container {
    max-width: var(--wheel-size-desktop);
  }

  .main-container {
    max-width: var(--main-container-desktop);
  }

  /* NEW: Control buttons for desktop - SMALLER & CLOSER */
  .wheel-controls {
    bottom: clamp(-35px, -4vh, -25px);
    gap: clamp(20px, 2vw, 25px);
    /* MUCH SMALLER GAP FOR DESKTOP */
  }

  .control-btn {
    width: clamp(70px, 6vw, 85px);
    /* SMALLER ON DESKTOP */
    height: clamp(35px, 2.5vh, 42px);
    /* SMALLER HEIGHT */
    font-size: clamp(14px, 1.2vw, 16px);
    /* SMALLER FONT */
    padding: 10px;
  }
}

/* Large Desktop (1400px+) This is my PC*/
@media (min-width: 1400px) {
  .logo-container {
    width: var(--logo-size-large);
  }

  .main-container {
    max-width: var(--main-container-desktop);
  }

  .page-title {
    font-size: var(--font-size-lg);
    max-width: 100%;
    margin-bottom: var(--spacing-lg);
  }

  .wheel-container {
    max-width: var(--wheel-size-large);
  }

  /* NEW: Control buttons for large desktop - SMALLER & CLOSER */
  .wheel-controls {
    bottom: clamp(-40px, -3vh, -30px);
    gap: clamp(350px, 30vw, 400px);
    /* SMALL GAP FOR LARGE SCREENS */
  }

  .control-btn {
    width: clamp(75px, 5vw, 90px);
    /* SMALLER ON LARGE DESKTOP */
    height: clamp(38px, 2vh, 45px);
    /* SMALLER HEIGHT */
    font-size: clamp(15px, 1vw, 18px);
    /* SMALLER FONT */
    padding: 10px;
  }
}

/* ========================================
 EXTRACTED INLINE STYLES
======================================== */

/* Share button hover and positioning improvements */
.share-btn:hover {
  background-color: var(--gray-disabled);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--primary-light);
}

.share-btn:active {
  transform: scale(0.95) translateY(0);
}

/* Enhanced responsive adjustments */
@media (max-width: 480px) {
  .share-container {
    top: calc(var(--spacing-xs) + 10px);
    left: var(--spacing-xs);
  }

  .share-btn {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 11px;
  }

  .main-container {
    /* padding-top: clamp(70px, 10vh, 90px); */
  }
}

/* ========================================
   PRIZE POPUP STYLES
   Add this section to your style.css file
======================================== */

/* Prize Popup - Base (hidden by default) */
.prize-popup {
  display: none;
  /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  /* Or var(--z-popup) */
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

/* Prize Popup - Visible state */
.prize-popup.show {
  display: flex !important;
  animation: fadeIn 0.3s ease;
}

/* Prize Popup Content */
.prize-popup-content {
  background: white;
  border-radius: 20px;
  padding: 20px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  direction: rtl;
  text-align: center;
  position: relative;
  animation: slideUp 0.3s ease;
}

/* Close button */
.prize-close-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  background: transparent;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  padding: 5px 10px;
  line-height: 1;
  transition: color 0.2s ease;
}

.prize-close-btn:hover {
  color: #333;
}

/* Prize icon */
.prize-icon {
  font-size: 60px;
  margin-bottom: 20px;
}


/* ========================================
   PRIZE POPUP STYLES - Fluid Responsive with clamp()
======================================== */

/* Prize title */
.prize-title {
  color: #BF1E2B;
  margin-bottom: 15px;
  font-size: clamp(18px, 5vw, 28px);
  font-weight: 600;
}

/* Prize message */
.prize-message {
  font-size: clamp(16px, 4vw, 18px);
  color: #333;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* Prize code box */
.prize-code-box {
  background: #f8f9fa;
  border: 2px dashed #BF1E2B;
  border-radius: 10px;
  padding: clamp(15px, 4vw, 20px);
  margin: 20px 0;
  text-align: center;
}

.prize-code-label {
  color: #666;
  font-size: clamp(13px, 3vw, 14px);
  margin-bottom: 10px;
}

/* For aggregator codes (text only) */
.prize-code-value {
  font-size: clamp(28px, 6vw, 32px);
  font-weight: bold;
  color: #BF1E2B;
  letter-spacing: 2px;
  font-family: monospace;
  margin-bottom: 15px;
}

/* For in-store codes (text + barcode) */
.prize-code-text {
  font-size: clamp(20px, 5vw, 24px);
  font-weight: bold;
  color: #333;
  letter-spacing: 2px;
  font-family: monospace;
  margin-bottom: 15px;
}

.prize-barcode {
  max-width: 100%;
  height: auto;
  margin: 15px auto;
  display: block;
  background: white;
  padding: 10px;
  border-radius: 5px;
}

.prize-barcode-hint {
  font-size: clamp(12px, 2.5vw, 13px);
  color: #666;
  margin-top: 10px;
  font-style: italic;
}

/* Aggregator app name */
.prize-app-name {
  font-size: clamp(15px, 3.5vw, 16px);
  color: #666;
  margin: 20px 0;
}

/* Branch information box */
.prize-branch-box {
  background: #fff3cd;
  border-radius: 10px;
  padding: clamp(15px, 4vw, 20px);
  margin: 20px 0;
  text-align: right;
}

.prize-branch-title {
  display: none;
  /* Stopped temporary to save space */
  color: #856404;
  margin-bottom: 15px;
  font-size: clamp(18px, 4vw, 20px);
}

.prize-branch-info {
  color: #856404;
  line-height: 1.8;
  margin: 0;
  font-size: clamp(14px, 3vw, 16px);
}

/* Prize buttons container */
.prize-buttons {
  display: flex;
  gap: clamp(8px, 2vw, 10px);
  justify-content: center;
  margin-top: 25px;
  flex-wrap: wrap;
}

/* Prize button base styles */
.prize-btn {
  border: none;
  padding: 15px 30px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-size: var(--font-size-base);
  font-weight: normal;
  transition: all 0.3s ease;
  display: inline-block;
  flex: 1;
  min-width: 150px;
  text-align: center;
}

.prize-btn-primary {
  background: #BF1E2B;
  color: white;
  font-size: var(--font-size-base);
  font-family: var(--font-family);
}

.prize-btn-primary:hover {
  background: #a01823;
  transform: translateY(-2px);
}

.prize-btn-secondary {
  background: #6c757d;
  color: white;
  font-size: var(--font-size-base);
  font-family: var(--font-family);
}

.prize-btn-secondary:hover {
  background: #545b62;
}

.prize-btn-full {
  width: 100%;
  flex: none;
  /* Override flex for full width buttons */
}

/* Prize note */
.prize-note {
  font-size: clamp(13px, 3vw, 14px);
  color: #999;
  margin-top: 20px;
  font-style: italic;
}

/* Auto-stack buttons on very small screens */
@container (max-width: 400px) {
  .prize-buttons {
    flex-direction: column;
  }

  .prize-btn {
    width: 100%;
  }
}

/* Fallback for browsers without container queries */
@media (max-width: 400px) {
  .prize-buttons {
    flex-direction: column;
  }

  .prize-btn {
    width: 100%;
  }
}