/* ============================================
   The Deal Graveyard — BrokerBot
   Dark Theme / Viral Edition
   ============================================ */

:root {
  --dark-bg: #0a0e17;
  --card-bg: #1a1f2e;
  --card-bg-glass: rgba(22, 28, 45, 0.85);
  --accent-coral: #fc0a7e;
  --accent-teal: #4ecdc4;
  --accent-gold: #feca57;
  --accent-purple: #98248d;
  --text-primary: #ffffff;
  --text-secondary: #8899a6;
  --text-muted: #5a6577;
  --border-subtle: rgba(255, 255, 255, 0.08);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========================
   BACKGROUND EFFECTS
   ======================== */

.grid-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

#particle-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}

#confetti-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1000;
}

.floating-icon {
  position: fixed;
  font-size: 1.8rem;
  opacity: 0.04;
  animation: floatIcon 15s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.04; }
  25% { transform: translateY(-15px) rotate(5deg); opacity: 0.07; }
  50% { transform: translateY(-25px) rotate(-3deg); opacity: 0.06; }
  75% { transform: translateY(-10px) rotate(8deg); opacity: 0.05; }
}

.gradient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
  animation: orbFloat 20s ease-in-out infinite;
}

.gradient-orb-1 {
  width: 400px; height: 400px;
  background: var(--accent-coral);
  top: -10%; right: -10%;
}

.gradient-orb-2 {
  width: 350px; height: 350px;
  background: var(--accent-teal);
  bottom: -5%; left: -8%;
  animation-delay: -7s;
}

.gradient-orb-3 {
  width: 250px; height: 250px;
  background: var(--accent-purple);
  top: 40%; left: 50%;
  animation-delay: -14s;
  opacity: 0.08;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.1); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ========================
   LAYOUT
   ======================== */

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 10;
}

/* ========================
   HEADER
   ======================== */

.header {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeUp 0.8s ease-out;
}

.logo-area {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  text-decoration: none;
}

.logo-icon {
  border-radius: 10px;
  display: block;
}

.logo-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.header h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-coral), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
}

.header .tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.header .subtitle {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 3px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================
   CALCULATOR CARD
   ======================== */

.calculator-card {
  background: var(--card-bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: 2.5rem;
  box-shadow: 0 25px 50px rgba(0,0,0,0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.input-section {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.input-group label .emoji {
  font-size: 1.2rem;
}

.input-group input,
.input-group select {
  padding: 1rem 1.2rem;
  font-size: 1.05rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(0,0,0,0.3);
  color: var(--text-primary);
  transition: all 0.3s ease;
  font-family: var(--font);
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px rgba(78,205,196,0.2), 0 0 20px rgba(78,205,196,0.1);
}

.input-group input::placeholder {
  color: var(--text-muted);
}

.input-group select option {
  background: var(--card-bg);
  color: var(--text-primary);
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* ========================
   CALCULATE BUTTON
   ======================== */

.calculate-btn {
  width: 100%;
  padding: 1.2rem 2rem;
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #fc0a7e, #98248d);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  font-family: var(--font);
}

.calculate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(252,10,126,0.35);
}

.calculate-btn:active {
  transform: translateY(0);
}

/* Shimmer */
.calculate-btn::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
  transform: rotate(30deg);
  animation: btnShimmer 3s ease-in-out infinite;
}

@keyframes btnShimmer {
  0% { transform: translateX(-100%) rotate(30deg); }
  100% { transform: translateX(100%) rotate(30deg); }
}

/* Screen shake */
@keyframes screenShake {
  0%, 100% { transform: translateX(0); }
  10% { transform: translateX(-4px) rotate(-0.5deg); }
  20% { transform: translateX(4px) rotate(0.5deg); }
  30% { transform: translateX(-3px); }
  40% { transform: translateX(3px); }
  50% { transform: translateX(-2px); }
  60% { transform: translateX(2px); }
  70% { transform: translateX(-1px); }
  80% { transform: translateX(1px); }
}

.calculator-card.shake {
  animation: screenShake 0.5s ease-out;
}

/* ========================
   LOADING STATE
   ======================== */

.loading {
  display: none;
  text-align: center;
  padding: 3rem 1rem;
}

.loading.visible {
  display: block;
}

.loading-icon {
  font-size: 3.5rem;
  animation: loadingBounce 1s ease-in-out infinite;
}

@keyframes loadingBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-15px) scale(1.1); }
}

.loading p {
  margin-top: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.loading-bar {
  width: 200px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  margin: 1.5rem auto 0;
  overflow: hidden;
}

.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-coral), var(--accent-gold));
  border-radius: 2px;
  animation: loadingProgress 1.5s ease-in-out forwards;
}

@keyframes loadingProgress {
  0% { width: 0%; }
  50% { width: 60%; }
  100% { width: 100%; }
}

/* ========================
   RESULTS SECTION
   ======================== */

.results-section {
  display: none;
  margin-top: 3rem;
  animation: fadeUp 0.8s ease-out;
}

.results-section.visible {
  display: block;
}

/* ========================
   DEAL DASH MINI-GAME
   ======================== */

.game-container {
  background: linear-gradient(180deg, #141922 0%, var(--card-bg) 100%);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--accent-coral);
  box-shadow: 0 0 30px rgba(252,10,126,0.15);
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0 0.5rem;
}

.game-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-coral);
}

.game-stats {
  display: flex;
  gap: 1.5rem;
}

.game-stat { text-align: center; }

.game-stat-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.game-stat-value {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent-teal);
}

.game-stat-value.time {
  color: var(--accent-gold);
}

/* Arena */
.game-arena {
  position: relative;
  height: 350px;
  background: linear-gradient(180deg, #141922 0%, #1e2633 100%);
  border-radius: 15px;
  overflow: hidden;
  cursor: crosshair;
}

.game-arena::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: linear-gradient(180deg, transparent, rgba(78,205,196,0.1));
  pointer-events: none;
}

/* Spawn points */
.spawn-point {
  position: absolute;
  width: 70px;
  height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.tombstone-base {
  width: 55px;
  height: 70px;
  background: linear-gradient(180deg, #2d3548 0%, #1a1f2e 100%);
  border-radius: 8px 8px 4px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255,255,255,0.05);
}

.deal-target {
  position: absolute;
  bottom: 55px;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  font-size: 2.2rem;
  cursor: pointer;
  opacity: 0;
  transition: transform 0.3s ease-out, opacity 0.2s;
  z-index: 10;
  filter: drop-shadow(0 0 8px rgba(252,10,126,0.4));
  user-select: none;
}

.deal-target.rising {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  animation: targetBounce 0.4s ease-in-out infinite;
}

.deal-target.clicked {
  animation: targetHit 0.3s ease-out forwards;
}

@keyframes targetBounce {
  0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
  50% { transform: translateX(-50%) translateY(-5px) scale(1.05); }
}

@keyframes targetHit {
  0% { transform: translateX(-50%) scale(1); opacity: 1; }
  50% { transform: translateX(-50%) scale(1.4); }
  100% { transform: translateX(-50%) scale(0); opacity: 0; }
}

/* Point popup */
.point-popup {
  position: absolute;
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--accent-gold);
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  pointer-events: none;
  animation: pointFloat 0.8s ease-out forwards;
  z-index: 100;
}

@keyframes pointFloat {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-50px) scale(1.3); opacity: 0; }
}

/* Combo text */
.combo-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent-coral);
  text-shadow: 0 4px 8px rgba(0,0,0,0.5);
  pointer-events: none;
  animation: comboPopup 0.6s ease-out forwards;
  z-index: 100;
}

@keyframes comboPopup {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* Game overlay */
.game-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 14, 23, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 50;
  border-radius: 15px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow-y: auto;
  padding: 1.5rem;
}

.game-overlay.hidden {
  display: none;
}

.game-overlay h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-teal);
  margin-bottom: 1rem;
  text-align: center;
}

.game-overlay p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  text-align: center;
  max-width: 80%;
}

.start-game-btn {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, #fc0a7e, #98248d);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: pulse 2s ease-in-out infinite;
  font-family: var(--font);
}

.start-game-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(252,10,126,0.4);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* Countdown */
.countdown {
  font-size: 5rem;
  font-weight: 900;
  color: var(--accent-coral);
  animation: countdownPulse 1s ease-in-out;
}

@keyframes countdownPulse {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* Game over */
.game-results { text-align: center; }

.game-results h3 { margin-bottom: 0.25rem; }

.final-score {
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--accent-gold);
  margin: 0.5rem 0;
  text-shadow: 0 0 30px rgba(254,202,87,0.3);
}

.score-breakdown {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 0.75rem;
}

.score-item { text-align: center; }
.score-item .label { font-size: 0.8rem; color: var(--text-secondary); }
.score-item .value { font-size: 1.4rem; font-weight: 700; color: var(--accent-teal); }

.play-again-btn {
  padding: 0.7rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  border: 2px solid var(--accent-teal);
  border-radius: 50px;
  background: transparent;
  color: var(--accent-teal);
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
  font-family: var(--font);
}

.play-again-btn:hover {
  background: var(--accent-teal);
  color: var(--dark-bg);
}

/* Time bar */
.time-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 1rem;
}

.time-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-coral), var(--accent-gold));
  border-radius: 3px;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(252,10,126,0.4);
}

/* ========================
   STATIC GRAVEYARD
   ======================== */

.graveyard {
  display: none;
  background: linear-gradient(180deg, #141922 0%, var(--card-bg) 100%);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2rem;
  overflow: hidden;
  min-height: 200px;
  border: 1px solid var(--border-subtle);
}

.graveyard.visible {
  display: block;
}

.graveyard-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-coral);
  margin-bottom: 1.5rem;
}

.tombstone-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  padding: 1rem;
}

.tombstone {
  width: 50px;
  height: 60px;
  background: linear-gradient(180deg, #2d3548 0%, #1a1f2e 100%);
  border-radius: 6px 6px 3px 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: var(--text-muted);
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  animation: tombstoneFade 0.5s ease-out backwards;
  border: 1px solid rgba(255,255,255,0.05);
}

.tombstone .rip {
  font-size: 0.5rem;
  font-weight: 600;
  opacity: 0.6;
}

@keyframes tombstoneFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================
   PIPELINE AUTOPSY REPORT
   ======================== */

.death-certificate {
  background: linear-gradient(145deg, #ffffff, #f5f5f5);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  color: #1a1f2e;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  margin-bottom: 2rem;
  overflow: hidden;
}

.death-certificate::before {
  content: '';
  position: absolute;
  top: 12px; left: 12px; right: 12px; bottom: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 14px;
  pointer-events: none;
}

.certificate-stamp {
  position: absolute;
  top: 20px; right: 30px;
  width: 75px; height: 75px;
  border: 3px solid var(--accent-coral);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--accent-coral);
  font-size: 0.65rem;
  text-align: center;
  transform: rotate(12deg);
  opacity: 0.9;
  line-height: 1.3;
}

.certificate-header {
  text-align: center;
  margin-bottom: 2rem;
}

.certificate-header h2 {
  font-size: 1.8rem;
  font-weight: 900;
  color: #1a1f2e;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.cert-subtitle {
  font-size: 0.85rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-box {
  text-align: center;
  padding: 1.5rem;
  background: rgba(0,0,0,0.03);
  border-radius: var(--radius-md);
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: #1a1f2e;
}

.stat-value.money {
  color: #e53935;
  animation: pulseMoney 2s ease-in-out infinite;
}

@keyframes pulseMoney {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.stat-value.ghost { color: #5e35b1; }

.stat-value.grade { font-size: 3rem; }

.grade-F { color: #e53935 !important; }
.grade-D { color: #ff7043 !important; }
.grade-C { color: #ffa726 !important; }
.grade-B { color: #66bb6a !important; }
.grade-A { color: #26a69a !important; }

/* Comparison bar */
.comparison-bar {
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(0,0,0,0.05);
  border-radius: var(--radius-md);
}

.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 0.5rem;
}

.bar-track {
  height: 28px;
  background: #e0e0e0;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #e53935, #ff7043);
  border-radius: 14px;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
}

.industry-marker {
  position: absolute;
  top: 0;
  height: 100%;
  width: 3px;
  background: var(--accent-teal);
  z-index: 10;
}

.industry-marker::after {
  content: 'Industry Avg';
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  color: #888;
  white-space: nowrap;
}

/* Cause of death */
.cause-of-death {
  text-align: center;
  padding: 1.5rem;
  background: rgba(229,57,53,0.08);
  border-radius: var(--radius-md);
}

.cause-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  margin-bottom: 0.5rem;
}

.cause-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: #e53935;
}

/* ========================
   SHARE SECTION
   ======================== */

.share-section {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.share-btn {
  padding: 0.8rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font);
}

.share-btn:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.05);
}

.share-btn svg { flex-shrink: 0; }

.share-btn.twitter:hover {
  border-color: #fff;
  box-shadow: 0 4px 15px rgba(255,255,255,0.1);
}

.share-btn.linkedin:hover {
  border-color: #0077b5;
  color: #4dabda;
  box-shadow: 0 4px 15px rgba(0,119,181,0.2);
}

.share-btn.copy:hover {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  box-shadow: 0 4px 15px rgba(78,205,196,0.2);
}

/* ========================
   CTA SECTION
   ======================== */

.cta-section {
  text-align: center;
  padding: 2.5rem;
  background: linear-gradient(145deg, rgba(78,205,196,0.08), rgba(78,205,196,0.03));
  border: 1px solid rgba(78,205,196,0.25);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-gold), var(--accent-coral));
}

.cta-section h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-teal);
  margin-bottom: 1rem;
}

.cta-section p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

.cta-btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--accent-teal), #3db9b1);
  color: #000;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-family: var(--font);
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(78,205,196,0.3);
}

/* ========================
   FOOTER
   ======================== */

.footer {
  text-align: center;
  margin-top: 3rem;
  padding: 2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-logo {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--accent-teal);
  margin-bottom: 0.5rem;
}

.footer a {
  color: var(--accent-teal);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-links {
  margin-top: 1rem;
}

/* ========================
   RESPONSIVE
   ======================== */

@media (max-width: 600px) {
  .container {
    padding: 1.25rem;
  }

  .calculator-card {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .game-arena {
    height: 280px;
  }

  .game-title {
    font-size: 1.1rem;
  }

  .graveyard {
    max-height: 260px;
    overflow-y: auto;
  }

  .death-certificate {
    padding: 2rem 1.25rem;
  }

  .certificate-stamp {
    width: 60px; height: 60px;
    font-size: 0.55rem;
    top: 15px; right: 15px;
  }

  .certificate-header h2 {
    font-size: 1.3rem;
  }

  .share-section {
    flex-direction: column;
    align-items: stretch;
  }

  .share-btn {
    justify-content: center;
  }

  .gradient-orb {
    display: none;
  }

  .header h1 {
    font-size: 2.2rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 2.5rem;
  }

  .calculator-card {
    padding: 3rem;
  }
}
