/* ==========================================================================
   BUCKET DROP - STYLESHEET
   ========================================================================== */

/* Color Theme & Custom Variables */
:root {
  --font-logo: 'Orbitron', system-ui, -apple-system, sans-serif;
  --font-body: 'Outfit', 'Poppins', sans-serif;

  --color-bg-deep: #090a0f;
  --color-bg-dark: #0f111a;
  --color-bg-card: rgba(18, 22, 36, 0.85);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-glow: rgba(0, 242, 254, 0.25);
  
  --color-primary: #00f2fe;
  --color-primary-grad: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --color-secondary: #f35588;
  --color-secondary-grad: linear-gradient(135deg, #ff5e62 0%, #ff9966 100%);
  --color-accent: #ffb800;
  
  --color-glass-bg: rgba(20, 24, 38, 0.65);
  --color-glass-border: rgba(255, 255, 255, 0.06);
  --color-glass-shadow: rgba(0, 0, 0, 0.4);
  
  --color-text-light: #ffffff;
  --color-text-muted: #8c92ac;
  --color-text-dark: #121624;
  
  --transition-fast: 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-smooth: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-bounce: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg-deep);
  color: var(--color-text-light);
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Main Game Container */
#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #ffffff;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Canvas handles rendering and physics */
#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  background: transparent;
}

/* Common UI Layer Properties */
.hud-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
}

.hud-layer * {
  pointer-events: auto; /* Re-enable pointer events for interactive HUD elements */
}

.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none !important;
}

/* ==========================================================================
   HUD / IN-GAME UI
   ========================================================================== */

/* Top Header */
.hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 15px;
}

/* Glass Pill Buttons & Containers */
.icon-btn {
  background: var(--color-glass-bg);
  border: 1px solid var(--color-glass-border);
  color: var(--color-text-light);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--color-glass-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition-fast);
}

.icon-btn:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  box-shadow: 0 8px 30px rgba(0, 242, 254, 0.25);
  color: var(--color-primary);
}

.icon-btn:active {
  transform: translateY(1px);
}

.level-info-card {
  background: var(--color-glass-bg);
  border: 1px solid var(--color-glass-border);
  border-radius: 24px;
  padding: 8px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 8px 24px var(--color-glass-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.level-title {
  font-family: var(--font-logo);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--color-primary);
}

.star-rating-preview {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.star-dot {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.15);
  transition: var(--transition-fast);
}

.star-dot.active {
  color: var(--color-accent);
  text-shadow: 0 0 8px var(--color-accent);
}

.hud-coins-pill {
  background: rgba(18, 22, 36, 0.85); /* dark glass */
  border: 1px solid rgba(255, 184, 0, 0.35);
  color: var(--color-accent);
  border-radius: 20px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Ink Meter */
.ink-meter-wrapper {
  position: absolute;
  top: 85px;
  left: 20px;
  right: 20px;
  background: rgba(18, 22, 36, 0.85); /* dark glass */
  border-radius: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

.ink-meter-header {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  color: var(--color-text-muted);
}

.ink-percent {
  font-family: var(--font-logo);
  color: var(--color-primary);
  font-size: 11px;
}

.ink-progress-track {
  position: relative;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.ink-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00f2fe 0%, #4facfe 100%);
  border-radius: 4px;
  transition: width 0.08s ease-out;
  box-shadow: 0 0 10px var(--color-primary);
}

/* Ink threshold markers (Stars limits) */
.ink-threshold-marker {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--color-accent);
  box-shadow: 0 0 4px var(--color-accent);
  opacity: 0.7;
}
.ink-threshold-marker.t3 {
  left: 70%; /* 3-star line threshold */
}
.ink-threshold-marker.t2 {
  left: 35%; /* 2-star line threshold */
}

/* Actions floating bar (bottom) */
.hud-actions-bar {
  display: flex;
  justify-content: center;
  gap: 15px;
  width: 100%;
  margin-bottom: 5px;
}

.action-pill-btn {
  background: var(--color-glass-bg);
  border: 1px solid var(--color-glass-border);
  color: var(--color-text-light);
  border-radius: 24px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--color-glass-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition-fast);
}

.action-pill-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.action-pill-btn:active {
  transform: translateY(1px);
}

.action-pill-btn.hint-btn {
  border-color: rgba(255, 184, 0, 0.2);
}
.action-pill-btn.hint-btn:hover {
  border-color: var(--color-accent);
  box-shadow: 0 8px 28px rgba(255, 184, 0, 0.2);
  color: var(--color-accent);
}

.action-pill-btn.drop-btn {
  border-color: rgba(23, 185, 120, 0.2);
}
.action-pill-btn.drop-btn:hover {
  border-color: #17b978;
  box-shadow: 0 8px 28px rgba(23, 185, 120, 0.25);
  color: #17b978;
}

/* ==========================================================================
   UI SCREENS & MODALS (OVERLAYS)
   ========================================================================== */

/* Background overlay for screens/menus */
.ui-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  background: #0b0c13;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.menu-backdrop-glow {
  position: absolute;
  width: 130%;
  height: 130%;
  background: radial-gradient(circle at 70% 30%, rgba(0, 242, 254, 0.15) 0%, rgba(243, 85, 136, 0.1) 40%, rgba(9, 10, 15, 0) 70%);
  animation: bg-shift 15s infinite alternate ease-in-out;
  pointer-events: none;
}

@keyframes bg-shift {
  0% { transform: rotate(0deg) scale(1); }
  100% { transform: rotate(360deg) scale(1.15); }
}

.menu-content-card {
  width: 90%;
  max-width: 480px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 28px;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 50px rgba(0, 242, 254, 0.05);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 2;
  position: relative;
}

/* Brand badge */
.brand-badge {
  background: linear-gradient(90deg, rgba(0, 242, 254, 0.1) 0%, rgba(79, 172, 254, 0.1) 100%);
  border: 1px solid rgba(0, 242, 254, 0.2);
  color: var(--color-primary);
  font-family: var(--font-logo);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
  text-shadow: 0 0 8px rgba(0, 242, 254, 0.4);
}

/* Game Title */
.game-logo {
  font-family: var(--font-logo);
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--color-text-light);
  line-height: 1.1;
  text-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  margin-bottom: 6px;
}

.accent-text {
  background: var(--color-primary-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  position: relative;
  text-shadow: none;
}

.accent-text::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--color-primary);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--color-primary);
  opacity: 0.6;
}

.game-tagline {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 30px;
  font-weight: 500;
}

/* Animated Graphics Preview Area */
.hero-graphics-preview {
  position: relative;
  width: 100%;
  height: 90px;
  margin-bottom: 30px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.floating-ball-preview {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #00f2fe 30%, #4facfe 75%, #051a3a 100%);
  box-shadow: 0 0 18px var(--color-primary), 0 5px 10px rgba(0,0,0,0.5);
  top: 25px;
  left: 30%;
  animation: float-ball 3.5s infinite ease-in-out;
}

.floating-bucket-preview {
  position: absolute;
  width: 44px;
  height: 38px;
  background: linear-gradient(185deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.02) 80%);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top: none;
  border-radius: 0 0 10px 10px;
  top: 35px;
  right: 30%;
  box-shadow: inset 0 2px 10px rgba(0,242,254,0.1), 0 8px 16px rgba(0,0,0,0.4);
  animation: float-bucket 3.5s infinite ease-in-out;
}

@keyframes float-ball {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(12px) scale(0.95); }
}

@keyframes float-bucket {
  0%, 100% { transform: translateY(6px) rotate(-3deg); }
  50% { transform: translateY(-6px) rotate(3deg); }
}

/* Menu Button Group */
.menu-buttons-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Primary Button Styling */
.btn-primary-large {
  position: relative;
  background: var(--color-primary-grad);
  border: none;
  color: var(--color-text-dark);
  font-family: var(--font-logo);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 18px 30px;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 242, 254, 0.3), 0 0 0 1px rgba(0, 242, 254, 0.2);
  transition: var(--transition-smooth);
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn-primary-large:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 18px 40px rgba(0, 242, 254, 0.45);
}

.btn-primary-large:active {
  transform: translateY(1px) scale(0.99);
}

.btn-glow {
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-30deg);
  animation: shine 4s infinite linear;
}

@keyframes shine {
  0% { left: -100%; }
  100% { left: 150%; }
}

/* Secondary Button Row */
.secondary-btn-row {
  display: flex;
  width: 100%;
  gap: 10px;
}

.btn-secondary {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  color: var(--color-text-light);
  padding: 14px 10px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(1px);
}

.menu-footer-bar {
  margin-top: 30px;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 18px;
  display: flex;
  justify-content: center;
}

.menu-coins-card {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--color-text-muted);
}

.menu-coins-card strong {
  color: var(--color-accent);
  font-weight: 800;
  font-size: 16px;
}

/* Modals System */
.ui-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 5, 8, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-card {
  width: 90%;
  max-width: 460px;
  max-height: 80%;
  background: #111422;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8);
  border-radius: 24px;
  padding: 24px;
  z-index: 201;
  display: flex;
  flex-direction: column;
  position: relative;
  animation: modal-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
}

@keyframes modal-pop {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

.modal-header h2 {
  font-family: var(--font-logo);
  font-size: 20px;
  font-weight: 800;
  color: var(--color-text-light);
  letter-spacing: 0.5px;
}

.btn-close {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition-fast);
}

.btn-close:hover {
  background: var(--color-secondary-grad);
  border-color: transparent;
  color: white;
  transform: rotate(90deg);
}

/* ==========================================================================
   LEVEL SELECT DESIGN
   ========================================================================== */
.level-select-card {
  max-width: 500px;
}

.levels-grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  overflow-y: auto;
  padding: 5px;
  max-height: 340px;
}

/* Scrollbar customization */
.levels-grid-container::-webkit-scrollbar,
.shop-grid::-webkit-scrollbar {
  width: 6px;
}

.levels-grid-container::-webkit-scrollbar-track,
.shop-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.levels-grid-container::-webkit-scrollbar-thumb,
.shop-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.level-card {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
  padding: 8px;
}

.level-card:hover:not(.locked) {
  background: rgba(0, 242, 254, 0.05);
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 242, 254, 0.15);
}

.level-card:active:not(.locked) {
  transform: translateY(1px);
}

.level-num {
  font-family: var(--font-logo);
  font-size: 20px;
  font-weight: 800;
  color: var(--color-text-light);
}

.level-stars {
  display: flex;
  gap: 2px;
  margin-top: 6px;
}

.level-star-tiny {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.1);
}

.level-star-tiny.active {
  color: var(--color-accent);
  text-shadow: 0 0 5px var(--color-accent);
}

/* Locked level card style */
.level-card.locked {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.02);
  cursor: default;
  opacity: 0.4;
}

.level-card.locked .level-num {
  display: none;
}

.level-card.locked::after {
  content: '🔒';
  font-size: 18px;
}

/* ==========================================================================
   SHOP MODAL DESIGN
   ========================================================================== */
.shop-card {
  max-width: 500px;
}

.shop-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
}

.shop-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: 15px;
  padding: 10px;
  cursor: pointer;
  border-radius: 12px;
  transition: var(--transition-fast);
}

.shop-tab-btn.active {
  color: var(--color-primary);
  background: rgba(0, 242, 254, 0.06);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  overflow-y: auto;
  max-height: 320px;
  padding-right: 4px;
}

.shop-item-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: var(--transition-fast);
  cursor: pointer;
}

.shop-item-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
}

.shop-item-card.equipped {
  border-color: var(--color-primary);
  background: rgba(0, 242, 254, 0.04);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.1);
}

/* Drawing ball previews inside shop */
.shop-item-preview {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* Render bucket shape inside shop */
.shop-item-preview.bucket-preview-shape {
  width: 50px;
  height: 40px;
  border-radius: 0 0 8px 8px;
  border: 3px solid;
  border-top: none;
  background: transparent;
}

.shop-item-name {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--color-text-light);
}

.shop-item-price-pill {
  background: rgba(255, 184, 0, 0.1);
  border: 1px solid rgba(255, 184, 0, 0.2);
  color: var(--color-accent);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
}

.shop-item-status {
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   SETTINGS MODAL DESIGN
   ========================================================================== */
.settings-options {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.setting-info {
  display: flex;
  flex-direction: column;
  max-width: 70%;
}

.setting-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--color-text-light);
}

.setting-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Switch Toggle Styling */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

input:checked + .slider {
  background: var(--color-primary-grad);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

.btn-danger-small {
  background: rgba(243, 85, 136, 0.1);
  border: 1px solid rgba(243, 85, 136, 0.3);
  color: var(--color-secondary);
  padding: 8px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-danger-small:hover {
  background: var(--color-secondary-grad);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 12px rgba(243, 85, 136, 0.25);
}

/* ==========================================================================
   PAUSE DESIGN
   ========================================================================== */
.pause-card h2 {
  font-family: var(--font-logo);
  font-size: 24px;
  text-align: center;
  margin-bottom: 24px;
  color: var(--color-primary);
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.pause-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-secondary-full {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--color-text-light);
  padding: 14px 20px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  text-align: center;
  transition: var(--transition-fast);
}

.btn-secondary-full:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* ==========================================================================
   VICTORY WIN MODAL DESIGN
   ========================================================================== */
.win-card {
  max-width: 400px;
  text-align: center;
  align-items: center;
  padding: 30px 24px;
}

.win-banner {
  margin-bottom: 15px;
}

.win-crown {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 10px;
  animation: crown-bounce 1s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
  filter: drop-shadow(0 5px 10px rgba(255, 184, 0, 0.3));
}

@keyframes crown-bounce {
  from { transform: translateY(0) scale(1) rotate(-5deg); }
  to { transform: translateY(-8px) scale(1.05) rotate(5deg); }
}

.win-title {
  font-family: var(--font-logo);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Interactive Exploding Stars */
.win-stars-row {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 15px 0 25px 0;
  height: 60px;
}

.win-star {
  font-size: 48px;
  color: rgba(255, 255, 255, 0.1);
  text-shadow: none;
  transform: scale(0.5);
  opacity: 0;
}

.win-star.active {
  color: var(--color-accent);
  text-shadow: 0 0 25px rgba(255, 184, 0, 0.8), 0 0 10px rgba(255, 184, 0, 0.4);
}

.star-anim-1.active {
  animation: star-burst 0.5s 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.5) forwards;
}
.star-anim-2.active {
  animation: star-burst 0.5s 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.5) forwards;
}
.star-anim-3.active {
  animation: star-burst 0.5s 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.5) forwards;
}

@keyframes star-burst {
  0% { transform: scale(0.3); opacity: 0; }
  70% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Rewards Box */
.win-rewards-box {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 25px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reward-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.reward-label {
  color: var(--color-text-muted);
}

.reward-value {
  font-weight: 800;
  color: white;
}

#win-coins-text {
  color: var(--color-accent);
}

/* Win actions bottom grid */
.win-actions-grid {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-reward-ad {
  background: linear-gradient(135deg, #17b978 0%, #086972 100%);
  border: none;
  color: white;
  padding: 14px 20px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(23, 185, 120, 0.25);
  transition: var(--transition-fast);
}

.btn-reward-ad:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(23, 185, 120, 0.4);
}

.btn-reward-ad:active {
  transform: translateY(1px);
}

.win-nav-row {
  display: flex;
  gap: 10px;
  width: 100%;
}

.flex-1 {
  flex: 1;
}

/* Animations and Responsive Adjustments */
@media (max-width: 480px) {
  /* HUD adjustments for mobile screens */
  .hud-layer {
    padding: 12px;
  }
  
  .hud-header {
    gap: 8px;
  }

  .icon-btn {
    width: 42px;
    height: 42px;
  }

  .level-info-card {
    padding: 6px 14px;
  }
  
  .level-title {
    font-size: 12px;
  }

  .star-dot {
    font-size: 11px;
  }

  .hud-coins-pill {
    padding: 6px 12px;
    font-size: 13px;
    gap: 4px;
  }
  
  .ink-meter-wrapper {
    top: 72px;
    left: 12px;
    right: 12px;
    padding: 6px 10px;
  }
  
  .ink-meter-header {
    font-size: 9px;
    margin-bottom: 2px;
  }
  
  .ink-percent {
    font-size: 10px;
  }
  
  .ink-progress-track {
    height: 6px;
  }

  /* Compact round buttons for mobile to prevent overflow */
  .hud-actions-bar {
    gap: 8px;
    justify-content: space-evenly;
  }

  .action-pill-btn {
    padding: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .action-pill-btn .btn-text {
    display: none; /* Hide text, only show icons on narrow screens */
  }

  /* Modals sizing */
  .modal-card {
    padding: 18px;
    border-radius: 20px;
  }
  
  .modal-header {
    margin-bottom: 15px;
    padding-bottom: 8px;
  }
  
  .modal-header h2 {
    font-size: 18px;
  }

  .levels-grid-container {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-height: 280px;
  }

  .level-card {
    border-radius: 12px;
    padding: 4px;
  }
  
  .level-num {
    font-size: 16px;
  }

  .shop-grid {
    gap: 8px;
    max-height: 260px;
  }

  .shop-item-card {
    padding: 12px 8px;
    border-radius: 14px;
  }

  .shop-item-preview {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
  }
  
  .shop-item-preview.bucket-preview-shape {
    width: 40px;
    height: 32px;
  }

  .shop-item-name {
    font-size: 12px;
  }

  /* Main Menu Cards styling */
  .menu-content-card {
    padding: 30px 20px;
  }
  
  .game-logo {
    font-size: 34px;
  }
  
  .game-tagline {
    font-size: 13px;
    margin-bottom: 20px;
  }
  
  .hero-graphics-preview {
    height: 70px;
    margin-bottom: 20px;
  }
  
  .floating-ball-preview {
    width: 20px;
    height: 20px;
    top: 20px;
  }
  
  .floating-bucket-preview {
    width: 38px;
    height: 32px;
    top: 24px;
  }

  .btn-primary-large {
    padding: 15px 24px;
    font-size: 15px;
    border-radius: 16px;
  }

  .btn-secondary {
    padding: 12px 8px;
    font-size: 13px;
    border-radius: 14px;
  }
}

/* Landscape/Short Screen mobile adjustments */
@media (max-height: 640px) {
  .menu-content-card {
    padding: 20px 20px;
    max-width: 420px;
  }
  
  .brand-badge {
    margin-bottom: 10px;
    padding: 4px 12px;
  }

  .game-logo {
    font-size: 28px;
  }
  
  .game-tagline {
    margin-bottom: 15px;
  }
  
  .hero-graphics-preview {
    display: none; /* Hide preview area on short screens to save space */
  }
  
  .menu-buttons-group {
    gap: 10px;
  }
  
  .btn-primary-large {
    padding: 12px 20px;
    font-size: 14px;
  }
  
  .btn-secondary {
    padding: 10px;
    font-size: 12px;
  }
  
  .menu-footer-bar {
    margin-top: 15px;
    padding-top: 10px;
  }
  
  .modal-card {
    max-height: 95%;
    padding: 16px;
  }
  
  .levels-grid-container {
    max-height: 180px;
  }
  
  .shop-grid {
    max-height: 160px;
  }
}
