/* Coin Flip - Page-specific styles */

.coin-panel {
  max-width: 1080px;
  margin: 0 auto;
}

.calc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.card-header h3 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.card-header p {
  margin: 0;
  color: var(--muted);
}

.chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-weight: 700;
  color: var(--muted);
}


.coin-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 32px 0;
  position: relative;
}

.coin-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  perspective: 1000px;
  position: relative;
  width: 100%;
}

.coin-stage::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.15), rgba(71, 85, 105, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

html[data-theme="dark"] .coin-stage::before {
  background: radial-gradient(circle, rgba(255, 215, 0, 0.12), rgba(30, 41, 59, 0) 70%);
}

.coin-stage--hero {
  min-height: 300px;
}

.coin-canvas {
  width: 520px;
  height: 520px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.coin-canvas canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.25));
}



.result-label {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

.result-value {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  min-height: 58px;
  background: linear-gradient(135deg, var(--text) 30%, var(--muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.center-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 12px 0 24px;
}

#flip-btn {
  padding: 14px 40px;
  font-size: 1.15rem;
  font-weight: 700;
  border-radius: 99px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 6px -1px rgba(217, 119, 6, 0.4);
  color: white;
  border: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

#flip-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 15px -3px rgba(217, 119, 6, 0.5);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

#flip-btn:active {
  transform: translateY(0) scale(0.98);
}

#reset-btn {
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  transition: all 0.2s;
}

#reset-btn:hover {
  background: var(--surface-2);
  border-color: var(--muted);
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 12px;
}

.summary-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.summary-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.summary-value {
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

#heads-value { color: #f59e0b; }
#tails-value { color: #3b82f6; }

.status-row {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.status-text {
  font-size: 0.95rem;
  color: var(--muted);
}

.status-text.is-error {
  color: #ff6b6b;
}

@media (max-width: 900px) {
  .result-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* 모바일 캔버스 좌우 여백 줄이기 */
  .coin-canvas {
    width: 90vw;
    height: 90vw;
    max-width: 400px;
    max-height: 400px;
  }

  .coin-stage--hero {
    min-height: 260px;
  }
}
