﻿/* ==========================================================================
   clique-duplo.css — Mestre do Clique Duplo / Whac-A-Bot Arcade (F5)
   Design System Oficial F5 em formato Widescreen Horizontal (5x2 - 10 Buracos)
   ========================================================================== */

:root {
  --cd-bg: #07111e;
  --cd-surface: #0b1a2d;
  --cd-surface-hover: #10243e;
  --cd-cyan: #38bdf8;
  --cd-cyan-glow: rgba(56, 189, 248, 0.4);
  --cd-yellow: #facc15;
  --cd-yellow-glow: rgba(250, 204, 21, 0.4);
  --cd-green: #4ade80;
  --cd-green-glow: rgba(74, 222, 128, 0.4);
  --cd-purple: #c084fc;
  --cd-red: #f87171;
  --cd-text: #f8fafc;
  --cd-text-muted: #94a3b8;
  --cd-font: 'Barlow', -apple-system, sans-serif;
  --cd-font-cond: 'Barlow Condensed', sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--cd-bg);
  font-family: var(--cd-font);
  color: var(--cd-text);
  user-select: none;
  -webkit-user-select: none;
}

.cd-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  position: relative;
  background: radial-gradient(circle at 50% 20%, #0f2746 0%, #050d18 100%);
}

/* ── Topbar ── */
.cd-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.2rem;
  background: rgba(7, 17, 30, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.18);
  z-index: 20;
}

.cd-back-btn {
  color: var(--cd-cyan);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  transition: all 0.2s ease;
}
.cd-back-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #fff;
  transform: translateX(-2px);
}

.cd-top-title {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cd-top-title span:first-child {
  font-family: var(--cd-font-cond);
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
}
.cd-top-badge {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--cd-yellow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cd-top-controls {
  display: flex;
  gap: 0.5rem;
}
.cd-btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--cd-text-muted);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cd-btn-icon:hover {
  background: rgba(56, 189, 248, 0.15);
  color: var(--cd-cyan);
  border-color: rgba(56, 189, 248, 0.4);
}
.cd-btn-icon svg { width: 16px; height: 16px; }

/* ── Palco Principal ── */
.cd-main-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.4rem 1.2rem 0.6rem;
  overflow: hidden;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

/* ── HUD ── */
.cd-hud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cd-stat-box {
  background: rgba(11, 26, 45, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 0.25rem 0.7rem;
  display: flex;
  flex-direction: column;
  min-width: 75px;
}
.cd-stat-label {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cd-text-muted);
  letter-spacing: 0.05em;
}
.cd-stat-val {
  font-family: var(--cd-font-cond);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}
.cd-stat-val.gold { color: var(--cd-yellow); text-shadow: 0 0 10px var(--cd-yellow-glow); }
.cd-stat-val.cyan { color: var(--cd-cyan); }

.cd-lives-box {
  display: flex;
  gap: 3px;
  margin-top: 1px;
}
.cd-heart {
  font-size: 0.9rem;
  transition: transform 0.2s, filter 0.2s;
}
.cd-heart.lost {
  filter: grayscale(1) opacity(0.3);
  transform: scale(0.85);
}

.cd-biome-badge {
  font-family: var(--cd-font-cond);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #fff;
  letter-spacing: 0.04em;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

.cd-hud-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.1rem 0;
}
.cd-combo-badge {
  font-family: var(--cd-font-cond);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--cd-yellow);
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.3);
  padding: 0.15rem 0.65rem;
  border-radius: 7px;
  text-transform: uppercase;
}
.cd-stat-inline {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── Tabuleiro Arcade Widescreen (Grade 5x2 = 10 Buracos) ── */
.cd-board-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0;
}

.cd-board-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 880px;
  background: linear-gradient(145deg, #0d223d 0%, #061120 100%);
  border: 3px solid rgba(56, 189, 248, 0.3);
  border-radius: 20px;
  padding: 0.9rem 1.1rem;
  box-shadow: 0 15px 40px rgba(0,0,0,0.6), inset 0 0 30px rgba(56, 189, 248, 0.15);
}

.cd-hole-wrapper {
  position: relative;
  aspect-ratio: 1.25 / 1;
  max-height: 120px;
  background: radial-gradient(circle at 50% 65%, #02060c 0%, #0a1626 80%);
  border: 3px solid #143152;
  border-radius: 50% / 40%;
  overflow: hidden;
  box-shadow: inset 0 8px 18px rgba(0,0,0,0.9), 0 4px 10px rgba(0,0,0,0.3);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.cd-hole-wrapper:hover {
  border-color: rgba(56, 189, 248, 0.5);
  transform: scale(1.02);
}

.cd-hole-rim {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 25%;
  background: linear-gradient(to top, #06101d, transparent);
  border-radius: 50%;
  z-index: 5;
  pointer-events: none;
}

/* ── Robô que sobe do buraco ── */
.cd-bot-slot {
  width: 75%;
  height: 90%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(115%);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
  pointer-events: none;
}

.cd-hole-wrapper.active .cd-bot-slot {
  transform: translateY(8%);
  pointer-events: auto;
}

.cd-bot-avatar {
  font-size: 2.6rem;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
  transition: transform 0.1s ease;
  user-select: none;
}

.cd-bot-click-indicator {
  position: absolute;
  top: -10px;
  background: var(--cd-yellow);
  color: #07111e;
  font-family: var(--cd-font-cond);
  font-size: 0.68rem;
  font-weight: 900;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  box-shadow: 0 0 10px var(--cd-yellow-glow);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0;
  transform: scale(0.7);
  transition: all 0.15s ease;
}

/* Feedback do 1º Clique */
.cd-hole-wrapper.half-hit .cd-bot-slot {
  animation: botShock 0.15s ease;
}
.cd-hole-wrapper.half-hit .cd-bot-click-indicator {
  opacity: 1;
  transform: scale(1);
  background: var(--cd-cyan);
  color: #050d18;
}
@keyframes botShock {
  0% { transform: translateY(8%) rotate(0deg); }
  50% { transform: translateY(4%) rotate(-8deg) scale(1.1); }
  100% { transform: translateY(8%) rotate(0deg); }
}

/* Feedback do 2º Clique (DUPLO CLIQUE ACERTADO!) */
.cd-hole-wrapper.double-hit .cd-bot-slot {
  animation: botExplode 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes botExplode {
  0% { transform: translateY(8%) scale(1); filter: brightness(1.8); }
  50% { transform: translateY(-10%) scale(1.25) rotate(15deg); filter: brightness(2.5); }
  100% { transform: translateY(120%) scale(0.5); opacity: 0; }
}

/* Robô Dourado Bônus */
.cd-hole-wrapper.gold-bot .cd-bot-avatar {
  filter: drop-shadow(0 0 15px rgba(250, 204, 21, 0.8));
}

/* ── Indicador Inferior ── */
.cd-bottom-hint {
  text-align: center;
  font-size: 0.78rem;
  color: var(--cd-text-muted);
  background: rgba(11, 26, 45, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 9px;
  padding: 0.35rem 0.8rem;
}
.cd-bottom-hint strong { color: var(--cd-yellow); }

/* ── Modais e Overlays ── */
.cd-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 19, 0.88);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
}
.cd-overlay.hidden { display: none !important; }

.cd-card {
  background: linear-gradient(145deg, #0e223d 0%, #081628 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  padding: 1.4rem;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 35px var(--cd-cyan-glow);
}

.cd-card-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e3a5f, #0d2038);
  border: 1px solid rgba(56, 189, 248, 0.4);
  display: grid;
  place-items: center;
  margin: 0 auto 0.6rem;
  box-shadow: 0 0 20px var(--cd-cyan-glow);
  font-size: 1.6rem;
}

.cd-eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cd-cyan);
  margin-bottom: 0.2rem;
  display: inline-block;
}

.cd-title {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.4rem;
  color: #fff;
}
.cd-title span { color: var(--cd-yellow); }

.cd-desc {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--cd-text-muted);
  margin-bottom: 1.1rem;
}

.cd-instructions {
  background: rgba(7, 17, 31, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.9rem;
  margin-bottom: 1.2rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.cd-instruction-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: #d1e8ff;
}
.cd-inst-icon {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--cd-cyan);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
}

.cd-btn-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  background: linear-gradient(135deg, #fde047 0%, #facc15 50%, #eab308 100%);
  color: #08111e;
  border: 1px solid rgba(254, 240, 138, 0.6);
  border-radius: 12px;
  font-family: var(--cd-font);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(250, 204, 21, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.cd-btn-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(250, 204, 21, 0.5);
}

.cd-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}
.cd-btn-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 42px;
  background: #22c55e;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cd-btn-share:hover { background: #16a34a; }
.cd-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 40px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--cd-text);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cd-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--cd-cyan);
}

.cd-gameover-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin: 1rem 0;
}
.cd-go-stat {
  background: rgba(7, 17, 31, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.6rem;
  text-align: center;
}
.cd-go-label {
  font-size: 0.62rem;
  color: var(--cd-text-muted);
  font-weight: 700;
  text-transform: uppercase;
}
.cd-go-val {
  font-family: var(--cd-font-cond);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}
.cd-go-val.highlight { color: var(--cd-yellow); }

.cd-record-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  background: rgba(250, 204, 21, 0.15);
  border: 1px solid var(--cd-yellow);
  color: var(--cd-yellow);
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}

/* ── Toast (Fixado no Topo Direito para não colidir com o HUD) ── */
.cd-toast {
  position: absolute;
  top: 65px;
  right: 25px;
  background: rgba(14, 34, 61, 0.95);
  border: 1px solid var(--cd-yellow);
  color: #fff;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px var(--cd-yellow-glow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-15px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 60;
}
.cd-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsivo Mobile ── */
@media (max-width: 768px) {
  .cd-board-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 0.7rem;
  }
}
@media (max-width: 480px) {
  .cd-board-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
