/* ==========================================================================
   D20 KITTYMO - LUXURY ROYAL EGIRL DESIGN SYSTEM
   Optimized for iPhone 15 Pro (393px x 852px)
   ========================================================================== */

:root {
  --primary-pink: #ff1493;
  --hot-pink: #ff007f;
  --neon-pink: #ff3399;
  --pastel-pink: #ffb6c1;
  --glow-pink: rgba(255, 20, 147, 0.5);
  --gold-accent: #ffd700;
  --queen-gold: #ffdf79;
  
  --bg-deep: #0a010d;
  --bg-dark-plum: #16041c;
  --bg-card: rgba(30, 8, 38, 0.72);
  --bg-card-hover: rgba(50, 12, 62, 0.85);
  
  --border-pink: rgba(255, 20, 147, 0.35);
  --border-pink-glow: rgba(255, 105, 180, 0.8);
  
  --text-white: #ffffff;
  --text-dim: #f3c7e8;
  --text-gold: #ffeaa7;

  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-royal: 'Playfair Display', Georgia, serif;
  
  --iphone-width: 393px;
  --iphone-height: 852px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: var(--font-main);
  background: #050007;
  color: var(--text-white);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Backdrops */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
  animation: pulseGlow 8s ease-in-out infinite alternate;
}
.glow-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #ff007f 0%, transparent 70%);
  top: -100px;
  left: -100px;
}
.glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #9b1fe8 0%, transparent 70%);
  bottom: -150px;
  right: -100px;
  animation-delay: -3s;
}
.glow-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #ff69b4 0%, transparent 70%);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -5s;
}

@keyframes pulseGlow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.35; }
  50% { transform: scale(1.15) translate(30px, -20px); opacity: 0.55; }
  100% { transform: scale(0.95) translate(-20px, 20px); opacity: 0.35; }
}

/* ==========================================================================
   iPhone 15 Pro Bezel Frame
   ========================================================================== */
.iphone-frame {
  position: relative;
  width: var(--iphone-width);
  height: var(--iphone-height);
  background: linear-gradient(165deg, #1b0722 0%, #0d0112 50%, #15021a 100%);
  border-radius: 52px;
  box-shadow: 
    0 0 0 4px #2b1136,
    0 0 0 7px #120317,
    0 0 0 9px #4d1558,
    0 25px 60px rgba(0, 0, 0, 0.85),
    0 0 80px rgba(255, 20, 147, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 10;
  border: 1px solid rgba(255, 105, 180, 0.3);
  transition: box-shadow 0.5s ease, border-color 0.5s ease;
}

/* ==========================================================================
   SUPER LUCKY MODE (RAINBOW OUTLINE & SHIFTING COLORS)
   ========================================================================== */
.iphone-frame.super-lucky-mode {
  border-color: #fff !important;
  animation: rainbowBorderPulse 3s linear infinite, rainbowHueShift 4s linear infinite !important;
}

@keyframes rainbowHueShift {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

@keyframes rainbowBorderPulse {
  0% {
    box-shadow: 
      0 0 0 4px #ff007f,
      0 0 0 8px #9400d3,
      0 0 35px #00ffff,
      0 0 70px #ff007f,
      0 25px 60px rgba(0, 0, 0, 0.85);
  }
  50% {
    box-shadow: 
      0 0 0 5px #00ffea,
      0 0 0 9px #ff007f,
      0 0 50px #ff00ff,
      0 0 90px #00ff88,
      0 25px 60px rgba(0, 0, 0, 0.85);
  }
  100% {
    box-shadow: 
      0 0 0 4px #ff007f,
      0 0 0 8px #9400d3,
      0 0 35px #00ffff,
      0 0 70px #ff007f,
      0 25px 60px rgba(0, 0, 0, 0.85);
  }
}

.super-lucky-mode .ambient-glow {
  animation: pulseGlow 5s ease-in-out infinite alternate, rainbowHueShift 4s linear infinite;
  opacity: 0.7;
}

/* ==========================================================================
   MONEY BONUS MODE (EMERALD GREEN & GOLD OUTLINE)
   ========================================================================== */
.iphone-frame.money-mode {
  border-color: #00ff88 !important;
  animation: moneyPulseGlow 2.5s ease-in-out infinite alternate !important;
}

@keyframes moneyPulseGlow {
  0% {
    box-shadow: 
      0 0 0 4px #00ff88,
      0 0 0 8px #043817,
      0 0 35px rgba(0, 255, 136, 0.8),
      0 0 75px rgba(255, 215, 0, 0.6),
      0 25px 60px rgba(0, 0, 0, 0.85);
  }
  100% {
    box-shadow: 
      0 0 0 5px #a8ffb2,
      0 0 0 10px #00ff88,
      0 0 55px rgba(0, 255, 136, 1),
      0 0 95px rgba(255, 215, 0, 0.85),
      0 25px 60px rgba(0, 0, 0, 0.85);
  }
}

.money-mode .ambient-glow.glow-1 {
  background: radial-gradient(circle, #00ff88 0%, transparent 70%);
  opacity: 0.65;
}
.money-mode .ambient-glow.glow-2 {
  background: radial-gradient(circle, #ffd700 0%, transparent 70%);
  opacity: 0.6;
}
.money-mode .task-bar-item {
  border-color: rgba(0, 255, 136, 0.45);
}
.money-mode .task-number-pill {
  background: linear-gradient(135deg, #00c853, #ffd700);
  color: #000;
  box-shadow: 0 3px 12px rgba(0, 255, 136, 0.6);
}

/* ==========================================================================
   BABYMO MODE (PASTEL BABY BLUE THEME)
   ========================================================================== */
.iphone-frame.baby-blue-mode {
  border-color: #89cff0 !important;
  animation: babyBluePulseGlow 3s ease-in-out infinite alternate !important;
}

@keyframes babyBluePulseGlow {
  0% {
    box-shadow: 
      0 0 0 4px #89cff0,
      0 0 0 8px #103048,
      0 0 35px rgba(137, 207, 240, 0.75),
      0 0 70px rgba(190, 230, 255, 0.5),
      0 25px 60px rgba(0, 0, 0, 0.85);
  }
  100% {
    box-shadow: 
      0 0 0 5px #bfe6ff,
      0 0 0 10px #89cff0,
      0 0 50px rgba(137, 207, 240, 0.95),
      0 0 90px rgba(190, 230, 255, 0.7),
      0 25px 60px rgba(0, 0, 0, 0.85);
  }
}

.baby-blue-mode .ambient-glow.glow-1 {
  background: radial-gradient(circle, #89cff0 0%, transparent 70%);
  opacity: 0.6;
}
.baby-blue-mode .ambient-glow.glow-2 {
  background: radial-gradient(circle, #bfe6ff 0%, transparent 70%);
  opacity: 0.55;
}
.baby-blue-mode .task-bar-item {
  border-color: rgba(137, 207, 240, 0.45);
}
.baby-blue-mode .task-number-pill {
  background: linear-gradient(135deg, #89cff0, #4da6e0);
  color: #032030;
  box-shadow: 0 3px 12px rgba(137, 207, 240, 0.6);
}
.baby-blue-mode .kittymo-bubble {
  border-color: #89cff0;
  box-shadow: 0 4px 16px rgba(137, 207, 240, 0.4);
}
.baby-blue-mode .bubble-arrow {
  border-top-color: #89cff0;
}

/* ==========================================================================
   BUNNYMO MODE (WARM FLUFFY BROWN & CARAMEL THEME)
   ========================================================================== */
.iphone-frame.fluffy-brown-mode {
  border-color: #c68e55 !important;
  animation: brownPulseGlow 3s ease-in-out infinite alternate !important;
}

@keyframes brownPulseGlow {
  0% {
    box-shadow: 
      0 0 0 4px #c68e55,
      0 0 0 8px #382010,
      0 0 35px rgba(198, 142, 85, 0.7),
      0 0 70px rgba(255, 230, 200, 0.45),
      0 25px 60px rgba(0, 0, 0, 0.85);
  }
  100% {
    box-shadow: 
      0 0 0 5px #e6ba8a,
      0 0 0 10px #c68e55,
      0 0 50px rgba(198, 142, 85, 0.95),
      0 0 90px rgba(255, 230, 200, 0.65),
      0 25px 60px rgba(0, 0, 0, 0.85);
  }
}

.fluffy-brown-mode .ambient-glow.glow-1 {
  background: radial-gradient(circle, #c68e55 0%, transparent 70%);
  opacity: 0.6;
}
.fluffy-brown-mode .ambient-glow.glow-2 {
  background: radial-gradient(circle, #e6ba8a 0%, transparent 70%);
  opacity: 0.55;
}
.fluffy-brown-mode .task-bar-item {
  border-color: rgba(198, 142, 85, 0.45);
}
.fluffy-brown-mode .task-number-pill {
  background: linear-gradient(135deg, #e6ba8a, #8b5a2b);
  color: #fff;
  box-shadow: 0 3px 12px rgba(198, 142, 85, 0.6);
}
.fluffy-brown-mode .kittymo-bubble {
  border-color: #c68e55;
  box-shadow: 0 4px 16px rgba(198, 142, 85, 0.4);
}
.fluffy-brown-mode .bubble-arrow {
  border-top-color: #c68e55;
}

/* ==========================================================================
   PUMPKINMO MODE (VIBRANT NEON ORANGE & PUMPKIN THEME)
   ========================================================================== */
.iphone-frame.pumpkin-orange-mode {
  border-color: #ff7800 !important;
  animation: pumpkinPulseGlow 3s ease-in-out infinite alternate !important;
}

@keyframes pumpkinPulseGlow {
  0% {
    box-shadow: 
      0 0 0 4px #ff7800,
      0 0 0 8px #401800,
      0 0 35px rgba(255, 120, 0, 0.75),
      0 0 70px rgba(255, 180, 50, 0.5),
      0 25px 60px rgba(0, 0, 0, 0.85);
  }
  100% {
    box-shadow: 
      0 0 0 5px #ffa245,
      0 0 0 10px #ff7800,
      0 0 50px rgba(255, 120, 0, 0.95),
      0 0 90px rgba(255, 180, 50, 0.7),
      0 25px 60px rgba(0, 0, 0, 0.85);
  }
}

.pumpkin-orange-mode .ambient-glow.glow-1 {
  background: radial-gradient(circle, #ff7800 0%, transparent 70%);
  opacity: 0.65;
}
.pumpkin-orange-mode .ambient-glow.glow-2 {
  background: radial-gradient(circle, #ffb347 0%, transparent 70%);
  opacity: 0.6;
}
.pumpkin-orange-mode .task-bar-item {
  border-color: rgba(255, 120, 0, 0.45);
}
.pumpkin-orange-mode .task-number-pill {
  background: linear-gradient(135deg, #ffa245, #d35400);
  color: #fff;
  box-shadow: 0 3px 12px rgba(255, 120, 0, 0.6);
}
.pumpkin-orange-mode .kittymo-bubble {
  border-color: #ff7800;
  box-shadow: 0 4px 16px rgba(255, 120, 0, 0.4);
}
.pumpkin-orange-mode .bubble-arrow {
  border-top-color: #ff7800;
}


/* Dynamic Island */
.dynamic-island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 125px;
  height: 35px;
  background: #000000;
  border-radius: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.7);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}
.dynamic-island:hover {
  width: 220px;
  background: #0f0012;
  box-shadow: 0 0 20px rgba(255, 20, 147, 0.4);
}
.island-camera {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #111;
  box-shadow: inset 0 0 3px #003366;
}
.island-sensor {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0d0d0d;
}
.island-content {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--pastel-pink);
}
.dynamic-island:hover .island-content {
  display: flex;
}

/* Status Bar */
.status-bar {
  height: 52px;
  padding: 14px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  z-index: 90;
}
.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

/* Home Indicator Bar */
.iphone-home-bar {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 135px;
  height: 4.5px;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 4px;
  z-index: 100;
}

/* App Viewport */
.app-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Screens */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  padding: 6px 16px 24px;
  overflow-y: auto;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.screen.active {
  display: flex;
  opacity: 1;
  transform: scale(1);
}

/* Custom Scrollbars */
.screen::-webkit-scrollbar,
.script-content::-webkit-scrollbar,
.task-bars-list::-webkit-scrollbar {
  width: 4px;
}
.screen::-webkit-scrollbar-thumb,
.script-content::-webkit-scrollbar-thumb,
.task-bars-list::-webkit-scrollbar-thumb {
  background: rgba(255, 20, 147, 0.4);
  border-radius: 4px;
}

/* ==========================================================================
   SCREEN 1: PASSWORD GATE
   ========================================================================== */
.lock-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 14px;
}

.crown-badge {
  background: linear-gradient(90deg, #ff1493, #ff007f);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 5px 14px;
  border-radius: 20px;
  box-shadow: 0 0 15px rgba(255, 20, 147, 0.6);
  margin-bottom: 18px;
  text-transform: uppercase;
}

.lock-avatar-container {
  position: relative;
  width: 130px;
  height: 130px;
  margin-bottom: 16px;
}
.avatar-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 105, 180, 0.7);
  animation: rotateRing 14s linear infinite;
}
@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.lock-kittymo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(255, 20, 147, 0.6));
  animation: floatAvatar 3s ease-in-out infinite alternate;
}
@keyframes floatAvatar {
  from { transform: translateY(0px) scale(1); }
  to { transform: translateY(-8px) scale(1.03); }
}

.lock-title {
  font-family: var(--font-royal);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #ffffff 10%, #ff85c8 60%, #ff007f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
  text-shadow: 0 0 30px rgba(255, 20, 147, 0.4);
}

.lock-subtitle {
  font-size: 13px;
  color: var(--text-dim);
  max-width: 280px;
  line-height: 1.45;
  margin-bottom: 24px;
}

.password-form {
  width: 100%;
  max-width: 310px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
}
.input-wrapper input {
  width: 100%;
  height: 52px;
  background: rgba(40, 10, 50, 0.65);
  border: 1.5px solid var(--border-pink);
  border-radius: 26px;
  padding: 0 46px 0 44px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 600;
  outline: none;
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}
.input-wrapper input:focus {
  border-color: var(--neon-pink);
  box-shadow: 0 0 20px rgba(255, 20, 147, 0.5);
  background: rgba(50, 12, 65, 0.85);
}
.input-wrapper input::placeholder {
  color: rgba(243, 199, 232, 0.5);
}
.toggle-pw-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--pastel-pink);
  cursor: pointer;
  font-size: 16px;
}

.error-msg {
  min-height: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #ff4d6d;
  text-shadow: 0 0 8px rgba(255, 77, 109, 0.6);
}

.lock-hint {
  margin-top: 24px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 182, 193, 0.7);
  letter-spacing: 0.5px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-royal-pink {
  background: linear-gradient(135deg, #ff1493 0%, #ff007f 50%, #d40066 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 26px;
  height: 50px;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 0, 127, 0.45);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-transform: uppercase;
  width: 100%;
}
.btn-royal-pink:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 26px rgba(255, 20, 147, 0.65);
}
.btn-royal-pink:active {
  transform: translateY(1px) scale(0.98);
}
.btn-large {
  height: 56px;
  font-size: 17px;
}

.btn-secondary-pink {
  background: rgba(255, 20, 147, 0.15);
  color: var(--pastel-pink);
  border: 1.5px solid var(--border-pink);
  border-radius: 26px;
  height: 48px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}
.btn-secondary-pink:hover {
  background: rgba(255, 20, 147, 0.3);
  border-color: var(--neon-pink);
  color: #fff;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 20, 147, 0.3);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s ease;
}
.icon-btn:hover {
  background: rgba(255, 20, 147, 0.35);
  transform: scale(1.08);
}

.close-icon-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--pastel-pink);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.close-icon-btn:hover {
  background: rgba(255, 0, 127, 0.4);
  color: #fff;
}

/* ==========================================================================
   SCREEN 2: MAIN DASHBOARD & STAGE
   ========================================================================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 10px;
  border-bottom: 1px solid rgba(255, 20, 147, 0.2);
}
.header-badge {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #ffdf79, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}
.header-sub {
  font-size: 11px;
  color: var(--pastel-pink);
  font-weight: 600;
}
.header-actions {
  display: flex;
  gap: 8px;
}

/* Stage: 3D Dice + Ragdoll */
.stage-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4px 6px;
  min-height: 195px;
}

.dice-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.dice-canvas-wrapper {
  width: 160px;
  height: 155px;
  cursor: pointer;
  position: relative;
  filter: drop-shadow(0 12px 20px rgba(255, 20, 147, 0.35));
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dice-canvas-wrapper:hover {
  transform: scale(1.04);
}
.dice-canvas-wrapper:active {
  transform: scale(0.96);
}
.dice-tap-hint {
  font-size: 11px;
  font-weight: 700;
  color: var(--pastel-pink);
  background: rgba(255, 20, 147, 0.2);
  border: 1px solid rgba(255, 105, 180, 0.4);
  padding: 3px 10px;
  border-radius: 12px;
  margin-top: 2px;
  animation: pulseHint 2s infinite ease-in-out;
}
@keyframes pulseHint {
  0%, 100% { opacity: 0.8; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

/* Kittymo Ragdoll Sprite Area */
.ragdoll-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  height: 185px;
}

/* Kittymo Speech Bubble */
.kittymo-bubble {
  position: absolute;
  top: 0px;
  background: rgba(45, 10, 55, 0.92);
  border: 1.5px solid var(--neon-pink);
  box-shadow: 0 4px 16px rgba(255, 20, 147, 0.4);
  border-radius: 14px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  max-width: 150px;
  z-index: 20;
  animation: bubblePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bubble-arrow {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--neon-pink);
}
@keyframes bubblePop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.ragdoll-sprite-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center bottom;
  cursor: pointer;
  transition: transform 0.15s ease-out;
}
.ragdoll-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(255, 20, 147, 0.4));
  pointer-events: none;
}
.ragdoll-shadow {
  width: 90px;
  height: 12px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.65) 0%, transparent 70%);
  margin-top: -6px;
}

/* Ragdoll dynamic animation classes */
.ragdoll-anticipate {
  animation: ragdollWobble 0.35s ease-in-out infinite alternate;
}
@keyframes ragdollWobble {
  0% { transform: rotate(-8deg) scale(0.96, 1.04); }
  100% { transform: rotate(8deg) scale(1.04, 0.96); }
}

.ragdoll-bouncing {
  animation: ragdollBounceDance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 3;
}
@keyframes ragdollBounceDance {
  0%, 100% { transform: translateY(0) scale(1, 1) rotate(0deg); }
  35% { transform: translateY(-24px) scale(0.92, 1.1) rotate(-6deg); }
  65% { transform: translateY(-30px) scale(1.08, 0.95) rotate(6deg); }
  85% { transform: translateY(2px) scale(1.15, 0.88); }
}

/* Kittymo Leaving & Returning Animations */
.ragdoll-leaving {
  animation: kittymoLeaveRight 2.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) forwards;
  pointer-events: none;
}

@keyframes kittymoLeaveRight {
  0% { transform: translateX(0) translateY(0); opacity: 1; }
  20% { transform: translateX(45px) translateY(-30px); }
  40% { transform: translateX(95px) translateY(0); }
  60% { transform: translateX(150px) translateY(-34px); }
  80% { transform: translateX(205px) translateY(0); }
  100% { transform: translateX(290px) translateY(-25px); opacity: 0; }
}

.ragdoll-returning {
  animation: kittymoReturnLeft 1.4s cubic-bezier(0.25, 1.25, 0.5, 1) forwards;
}

@keyframes kittymoReturnLeft {
  0% { transform: translateX(290px) translateY(-25px); opacity: 0; }
  50% { transform: translateX(75px) translateY(-32px); opacity: 1; }
  80% { transform: translateX(-15px) translateY(0); }
  100% { transform: translateX(0) translateY(0); opacity: 1; }
}

/* Bunnymo Idle Hopping Animation */
.bunnymo-idle-hop {
  animation: bunnymoIdleHopAnim 0.75s ease-in-out infinite alternate !important;
}

@keyframes bunnymoIdleHopAnim {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(-3deg); }
  100% { transform: translateY(-24px) rotate(3deg); }
}

/* Kittymo Eating the Dice Animations */
.dice-eaten {
  transform: scale(0) rotate(360deg) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: all 0.45s cubic-bezier(0.55, 0.05, 0.67, 0.19) !important;
}

.dice-respawning {
  animation: diceRespawnPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes diceRespawnPop {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.ragdoll-eating-lunge {
  animation: kittymoEatLunge 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes kittymoEatLunge {
  0% { transform: translate(0, 0) scale(1); }
  40% { transform: translate(-80px, -20px) scale(1.2) rotate(-15deg); }
  70% { transform: translate(-60px, -10px) scale(1.15) rotate(5deg); }
  100% { transform: translate(0, 0) scale(1) rotate(0deg); }
}


/* ==========================================================================
   TASK BARS (1 - 6)
   ========================================================================== */
.tasks-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  overflow: hidden;
}

.tasks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 6px;
}
.tasks-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--pastel-pink);
}
.tasks-pool-info {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
}

.task-bars-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  padding-bottom: 20px;
}

.task-bar-item {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-pink);
  border-radius: 14px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}
.task-bar-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--neon-pink);
  transform: translateX(3px);
}
.task-bar-item.highlighted {
  border-color: #ff007f;
  background: linear-gradient(90deg, rgba(255, 20, 147, 0.4), rgba(45, 10, 55, 0.9));
  box-shadow: 0 0 25px rgba(255, 0, 127, 0.7);
  transform: scale(1.02);
  animation: barPulse 1s ease-in-out infinite alternate;
}
@keyframes barPulse {
  from { box-shadow: 0 0 15px rgba(255, 0, 127, 0.5); }
  to { box-shadow: 0 0 30px rgba(255, 0, 127, 0.95); }
}

@keyframes slideInFromRight {
  0% {
    opacity: 0;
    transform: translateX(110%);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.task-bar-item.slide-in {
  animation: slideInFromRight 0.45s cubic-bezier(0.25, 1.25, 0.5, 1) both;
}

/* Floating Princess Points Combat Text */
.combat-float-text {
  position: absolute;
  pointer-events: none;
  font-family: var(--font-royal);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffd700 0%, #ffffff 40%, #ff1493 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(255, 0, 127, 0.9));
  z-index: 1000;
  animation: floatCombatText 1.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes floatCombatText {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.75);
  }
  20% {
    opacity: 1;
    transform: translateY(0) scale(1.15);
  }
  75% {
    opacity: 1;
    transform: translateY(-35px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-60px) scale(0.9);
  }
}

.task-number-pill {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff1493, #7a0044);
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(255, 20, 147, 0.4);
  flex-shrink: 0;
}
.task-info {
  flex: 1;
  min-width: 0;
}
.task-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.task-bar-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-bar-emoji {
  font-size: 14px;
}
.task-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
}
.badge-work-pill {
  color: #ffdf79;
  font-weight: 700;
}
.badge-rarity-pill {
  color: #ff9ed2;
  font-weight: 600;
}
.badge-makeup-pill {
  color: #a8ffb2;
  font-weight: 600;
}

/* ==========================================================================
   MODALS & POPUPS
   ========================================================================== */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 1, 15, 0.85);
  backdrop-filter: blur(14px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.25s ease;
}
.modal-overlay.active {
  display: flex;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  width: 100%;
  max-width: 345px;
  background: linear-gradient(170deg, #2b0b38 0%, #170420 100%);
  border: 1.5px solid var(--border-pink-glow);
  border-radius: 28px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 35px rgba(255, 20, 147, 0.4);
  position: relative;
}
.modal-card.bounce-in {
  animation: bounceInModal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes bounceInModal {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-sparkles {
  font-size: 14px;
  letter-spacing: 4px;
  margin-bottom: 8px;
}
.outcome-dice-badge {
  display: inline-block;
  background: rgba(255, 20, 147, 0.25);
  border: 1px solid var(--neon-pink);
  color: var(--pastel-pink);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 14px;
  margin-bottom: 12px;
}
.outcome-emoji {
  font-size: 48px;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 12px rgba(255, 20, 147, 0.5));
}
.outcome-task-name {
  font-family: var(--font-royal);
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 10px;
}
.outcome-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 22px;
}
.badge-work, .badge-rarity, .badge-makeup {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 20, 147, 0.3);
}
.badge-work { color: #ffdf79; }
.badge-rarity { color: #ff9ed2; }
.badge-makeup { color: #a8ffb2; }

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==========================================================================
   SKIP DECISION MODAL
   ========================================================================== */
.skip-avatar-box {
  width: 90px;
  height: 90px;
  margin: 0 auto 12px;
  position: relative;
}
.skip-kittymo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(255, 20, 147, 0.5));
  animation: floatAvatar 2s ease-in-out infinite alternate;
}
.skip-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}
.skip-message {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.45;
  margin-bottom: 18px;
}
.skip-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==========================================================================
   TASK DETAIL (LET'S GO!) MODAL
   ========================================================================== */
.modal-card-fullscreen {
  max-width: 100%;
  height: 92%;
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 18px 16px;
  border-radius: 32px;
}
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 20, 147, 0.25);
  padding-bottom: 10px;
}
.detail-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.detail-emoji {
  font-size: 34px;
}
.detail-titles h2 {
  font-family: var(--font-royal);
  font-size: 19px;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 4px;
}
.detail-badges {
  display: flex;
  gap: 6px;
}
.badge-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 20, 147, 0.3);
  color: var(--pastel-pink);
}

.detail-script-box {
  flex: 1;
  background: rgba(18, 3, 24, 0.75);
  border: 1px solid var(--border-pink);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.script-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--pastel-pink);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(255, 20, 147, 0.3);
}
.script-badge {
  background: rgba(255, 20, 147, 0.25);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 9px;
}
.script-content {
  flex: 1;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.6;
  color: #f7d8ef;
  white-space: pre-wrap;
  font-family: var(--font-main);
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btn-ref-video {
  background: linear-gradient(135deg, #74119c 0%, #ff007f 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  height: 46px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 0, 127, 0.4);
}

/* ==========================================================================
   REFERENCE VIDEO MODAL
   ========================================================================== */
.modal-card-video {
  max-width: 355px;
  padding: 16px 14px 14px;
}
.ref-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ref-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--pastel-pink);
}
.ref-counter {
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
}
.video-container {
  width: 100%;
  height: 380px;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-pink);
}
#refVideoPlayer {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-fallback-notice {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  background: rgba(255, 0, 127, 0.85);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 6px;
  border-radius: 8px;
  text-align: center;
}

.ref-nav-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.ref-nav-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-pink);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.ref-nav-btn:hover {
  background: var(--primary-pink);
}
.ref-dots {
  display: flex;
  gap: 5px;
}
.ref-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}
/* ==========================================================================
   CHARACTER APPEAR MODAL & PRINCESS AWARD MODAL
   ========================================================================== */
.char-appear-card {
  max-width: 320px;
  background: linear-gradient(170deg, #2a0b36 0%, #15051e 100%);
  border: 2px solid var(--neon-pink);
  box-shadow: 0 0 35px rgba(255, 0, 127, 0.45);
}
.char-appear-card.baby-blue-card {
  border-color: #89cff0;
  box-shadow: 0 0 35px rgba(137, 207, 240, 0.55);
}
.char-appear-card.fluffy-brown-card {
  border-color: #c68e55;
  box-shadow: 0 0 35px rgba(198, 142, 85, 0.55);
}
.char-appear-card.pumpkin-orange-card {
  border-color: #ff7800;
  box-shadow: 0 0 35px rgba(255, 120, 0, 0.55);
}

/* Beautiful Princess Award Modal & Stage */
.award-card {
  max-width: 360px;
  background: linear-gradient(175deg, #380838 0%, #18021c 100%);
  border: 2px solid #ffd700;
  box-shadow: 0 0 45px rgba(255, 215, 0, 0.5), 0 0 25px rgba(255, 20, 147, 0.4);
  padding: 20px 14px 22px;
}

.award-stage {
  position: relative;
  width: 100%;
  height: 155px;
  background: radial-gradient(ellipse at 50% 90%, rgba(255, 215, 0, 0.25) 0%, rgba(255, 0, 127, 0.15) 45%, transparent 75%);
  border-radius: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  margin: 10px 0 14px;
  border-bottom: 2px solid rgba(255, 215, 0, 0.4);
}

.stage-spotlight {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 80%);
  clip-path: polygon(30% 0%, 70% 0%, 100% 100%, 0% 100%);
  pointer-events: none;
}

.award-characters-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  padding-bottom: 8px;
}

.award-char-box {
  width: 72px;
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
  position: relative;
}

.award-char-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}

/* Solo character dancing on stage */
.award-char-solo {
  position: absolute;
  width: 110px;
  height: 125px;
  left: 50%;
  transform: translateX(-50%);
  bottom: 10px;
  animation: soloDanceSpin 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) infinite alternate;
}

@keyframes soloDanceSpin {
  0% { transform: translateX(-50%) translateY(0) scale(1) rotate(-8deg); }
  50% { transform: translateX(-50%) translateY(-22px) scale(1.1) rotate(0deg); }
  100% { transform: translateX(-50%) translateY(-6px) scale(1.05) rotate(8deg); }
}

/* All 4 dancing together */
.award-char-sync-dance {
  animation: syncPartyDance 0.65s ease-in-out infinite alternate;
}
.award-char-box:nth-child(1) .award-char-sync-dance { animation-delay: 0s; }
.award-char-box:nth-child(2) .award-char-sync-dance { animation-delay: 0.15s; }
.award-char-box:nth-child(3) .award-char-sync-dance { animation-delay: 0.3s; }
.award-char-box:nth-child(4) .award-char-sync-dance { animation-delay: 0.45s; }

@keyframes syncPartyDance {
  0% { transform: translateY(0) scale(1) rotate(-6deg); }
  100% { transform: translateY(-16px) scale(1.08) rotate(6deg); }
}

.award-points-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
  color: #2b0b00;
  font-size: 15px;
  font-weight: 900;
  padding: 6px 18px;
  border-radius: 20px;
  box-shadow: 0 4px 18px rgba(255, 215, 0, 0.6);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   MOBILE FULLSCREEN RESPONSIVENESS
   ========================================================================== */
@media (max-width: 480px) {
  body {
    padding: 0;
    align-items: stretch;
  }
  .iphone-frame {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
    border: none;
  }
  .dynamic-island {
    top: 8px;
  }
}
