:root {
  --bg: #0f172a;
  --card: #111827;
  --accent: #22c55e;
  --accent-2: #f97316;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #1f2937;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.08), transparent 25%),
    radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.08), transparent 25%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.app {
  width: min(1200px, 100%);
}

.scoreboard {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px 16px;
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid var(--border);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.logo {
  font-weight: 700;
  letter-spacing: 0.5px;
}

.scores span {
  margin-left: 12px;
  color: var(--muted);
}

.scores strong {
  color: var(--text);
}

.game-area {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  min-height: 520px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.image {
  height: 260px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(249, 115, 22, 0.15));
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.info {
  margin-top: 14px;
  flex: 1;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.card h2 {
  margin: 8px 0 6px;
  font-size: 26px;
}

.searches {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
}

#right-searches.hidden {
  color: var(--muted);
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.btn {
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #0b1120;
  box-shadow: 0 10px 25px rgba(34, 197, 94, 0.35);
}

.btn.primary:hover {
  box-shadow: 0 15px 30px rgba(34, 197, 94, 0.45);
}

.btn.secondary {
  background: #1f2937;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn.secondary:hover {
  border-color: var(--accent);
}

.versus {
  align-self: center;
  padding: 10px 16px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 12px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  width: min(420px, 100%);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.modal-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.share-feedback {
  color: var(--muted);
  min-height: 18px;
}

.flash-correct {
  border-color: rgba(34, 197, 94, 0.8) !important;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.flash-wrong {
  border-color: rgba(239, 68, 68, 0.8) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

.fade-in {
  animation: fade 0.4s ease;
}

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

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

@media (max-width: 600px) {
  body { padding: 12px; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 460px; }
  .image { height: 220px; }
  .card h2 { font-size: 22px; }
}
