/* ==========================================================================
   FS ICE SCULPT - STYLE SHEET
   Frosty Cyberpunk & Crystal Glass Studio Design
   Zero CSS Overrides for Shared Modal Classes (Directive 8 Compliant)
   ========================================================================== */

:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;

  --bg-dark: #030811;
  --bg-gradient: radial-gradient(circle at 50% 18%, #0b1a33 0%, #050b18 60%, #020409 100%);
  --bg-card: rgba(10, 22, 44, 0.75);
  --bg-card-border: rgba(0, 243, 255, 0.22);

  --text-main: #f0f8ff;
  --text-muted: #8ba5c4;

  --ice-cyan: #00f3ff;
  --ice-frost: #a6e3e9;
  --ice-crystal: #ffffff;
  --ice-gold: #ffd700;

  --shadow-color: rgba(0, 0, 0, 0.65);
  --glow-cyan: rgba(0, 243, 255, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

body {
  font-family: var(--font-body);
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Background Light */
.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.2;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.glow-1 {
  width: 440px;
  height: 440px;
  background: var(--ice-cyan);
  top: -80px;
  left: 20%;
}

.glow-2 {
  width: 380px;
  height: 380px;
  background: #7000ff;
  bottom: 8%;
  right: 15%;
  animation-delay: -7s;
}

.glow-3 {
  width: 300px;
  height: 300px;
  background: #a6e3e9;
  top: 45%;
  left: 10%;
  animation-delay: -11s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 40px) scale(1.12); }
}

/* App Container */
.app-container {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 8px 12px 14px;
  z-index: 1;
  gap: 8px;
}

/* Header & Nav */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.glass-btn {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.2s ease;
  text-decoration: none;
}

.glass-btn:hover {
  background: rgba(0, 243, 255, 0.16);
  border-color: var(--ice-cyan);
  box-shadow: 0 0 12px var(--glow-cyan);
}

.title-group h1 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #ffffff 40%, var(--ice-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.action-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  padding: 6px 8px;
  font-size: 0.95rem;
  min-width: 36px;
  justify-content: center;
}

.donate-btn {
  color: #ffd700;
  border-color: rgba(255, 215, 0, 0.35);
  font-weight: 600;
  font-size: 0.8rem;
}

.donate-btn:hover {
  background: rgba(255, 215, 0, 0.15);
  border-color: #ffd700;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.35);
}

/* Stats HUD Banner */
.stats-banner {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 1fr;
  gap: 6px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 12px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.stat-label {
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.stat-val {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.stat-card.highlight .stat-val {
  color: var(--ice-cyan);
  text-shadow: 0 0 12px var(--glow-cyan);
}

/* Model Chips Bar */
.model-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: none;
}
.model-bar::-webkit-scrollbar {
  display: none;
}

.model-chip {
  background: rgba(14, 28, 52, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 5px 11px;
  border-radius: 16px;
  font-size: 0.76rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.model-chip:hover {
  background: rgba(0, 243, 255, 0.15);
  border-color: var(--ice-cyan);
  color: #fff;
}

.model-chip.active {
  background: rgba(0, 243, 255, 0.2);
  border-color: var(--ice-cyan);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

/* Tool Selector Bar */
.tools-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  padding: 2px 0;
}

.tool-btn {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  color: var(--text-muted);
  padding: 8px 6px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all 0.2s ease;
}

.tool-btn:hover {
  background: rgba(0, 243, 255, 0.12);
  color: #fff;
}

.tool-btn.active {
  background: rgba(0, 243, 255, 0.22);
  border-color: var(--ice-cyan);
  color: #fff;
  box-shadow: 0 0 12px rgba(0, 243, 255, 0.3);
}

.tool-desc {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: normal;
}

/* Progress Meter */
.meter-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

.model-name {
  color: #ffffff;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.meter-text {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ice-cyan);
  font-variant-numeric: tabular-nums;
}

.meter-track {
  width: 100%;
  height: 10px;
  background: rgba(6, 12, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0088cc, var(--ice-cyan));
  border-radius: 8px;
  transition: width 0.05s linear;
  box-shadow: 0 0 8px rgba(0, 243, 255, 0.5);
}

/* Arena & Canvas Container */
.arena-container {
  flex: 1;
  position: relative;
  background: rgba(5, 12, 24, 0.9);
  border: 1px solid var(--bg-card-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7), inset 0 0 24px rgba(0, 243, 255, 0.05);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 330px;
}

#game-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

/* Overlays (Result / Pause) */
.canvas-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 14, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  padding: 16px;
  transition: opacity 0.25s ease;
}

.canvas-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.overlay-card {
  background: rgba(10, 22, 44, 0.96);
  border: 1px solid var(--bg-card-border);
  border-radius: 20px;
  padding: 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: popCard 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popCard {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.result-badge {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--ice-cyan);
  background: rgba(0, 243, 255, 0.15);
  border: 1px solid var(--ice-cyan);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
  padding: 6px 18px;
  border-radius: 16px;
  letter-spacing: 0.5px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--ice-cyan) 0%, #0088cc 100%);
  color: #020610;
  border: none;
  border-radius: 14px;
  padding: 12px 28px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 243, 255, 0.35);
  transition: all 0.2s ease;
  width: 100%;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 243, 255, 0.55);
}

/* Footer Hint */
.sculpt-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 0;
}

.sculpt-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}
