/* Extracted from public/index.html <style> */
:root {
  --primary: #FF9500;
  --secondary: #6366f1;
  --correct: #22c55e;
  --incorrect: #ef4444;
}

.bg-primary {
  background-color: var(--primary);
}

.text-primary {
  color: var(--primary);
}

.border-primary {
  border-color: var(--primary);
}

.bg-secondary {
  background-color: var(--secondary);
}

.text-secondary {
  color: var(--secondary);
}

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

.bg-correct {
  background-color: var(--correct);
}

.text-correct {
  color: var(--correct);
}

.border-correct {
  border-color: var(--correct);
}

.bg-incorrect {
  background-color: var(--incorrect);
}

.text-incorrect {
  color: var(--incorrect);
}

.border-incorrect {
  border-color: var(--incorrect);
}

.font-luckiest {
  font-family: 'Luckiest Guy', cursive;
}

.bg-dark {
  background-color: #111827;
}

/* Progress squares */
.progress-square.current {
  background-color: var(--primary);
}

.progress-square.correct {
  background-color: var(--correct);
}

.progress-square.incorrect {
  background-color: var(--incorrect);
}

/* Option styling */
.option-letter {
  font-family: 'Luckiest Guy', cursive;
}

.option.selected {
  border-color: var(--primary);
  background-color: rgba(255, 149, 0, 0.1);
}

/* Add transition for smoother timer bar */
.timer-bar {
  transition: width 0.1s linear;
}

/* Styles for result boxes */
.result-square {
  width: 40px;
  /* Adjust size as needed */
  height: 40px;
  border-radius: 4px;
  /* Optional: rounded corners */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  /* Adjust symbol size */
  font-weight: bold;
  color: white;
  /* Symbol color */
}

.result-square.correct {
  background-color: var(--correct);
}

.result-square.incorrect {
  background-color: var(--incorrect);
}

/* Styles for History Grid */
#historyGrid {
  display: grid;
  /* Use grid for the rows */
  grid-template-columns: 1fr;
  /* Each row takes full width */
  gap: 4px;
  /* Space between rows */
  max-width: 180px;
  /* Limit width */
  margin: 0 auto;
  /* Center the grid */
}

.history-row {
  display: flex;
  /* Use flex within a row */
  align-items: center;
  justify-content: space-between;
  /* Pushes date and squares apart */
  padding: 4px 0;
  /* Add some padding */
}

.history-date {
  font-size: 0.9rem;
  color: #9ca3af;
  /* text-neutral-400 */
  width: 80px;
  /* Fixed width for alignment */
  flex-shrink: 0;
  /* Prevent shrinking */
}

.history-squares {
  display: flex;
  gap: 4px;
  /* Space between squares */
}

.history-square {
  width: 20px;
  /* Smaller squares for history */
  height: 20px;
  border-radius: 2px;
}

/* Use existing correct/incorrect for background */
.history-square.correct {
  background-color: var(--correct);
}

.history-square.incorrect {
  background-color: var(--incorrect);
}

/* Diagonal sticker CTA on welcome card */
.sticker-cta {
  position: absolute;
  top: -14px;
  right: -10px;
  z-index: 10;
  transform: rotate(8deg);
  transform-origin: center;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #eafff1;
  border: 2px solid #16a34a;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35), 0 4px 10px rgba(34, 197, 94, 0.25);
  padding: 10px 16px 10px 14px;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.sticker-cta:hover {
  transform: rotate(5deg) translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45), 0 6px 14px rgba(34, 197, 94, 0.3);
  filter: brightness(1.05);
}

.sticker-cta:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.45), 0 10px 20px rgba(0, 0, 0, 0.35);
}

/* Subtle paper curl using a pseudo element */
.sticker-cta::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 18px;
  width: 60%;
  height: 8px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.35), transparent 60%);
  transform: rotate(-8deg);
  filter: blur(2px);
  pointer-events: none;
}

/* NEW badge */
.badge-new {
  display: inline-block;
  background: linear-gradient(135deg, #f97316, var(--primary));
  color: white;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 2px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.15), 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Smaller on very small screens, avoid overlapping content too much */
@media (max-width: 380px) {
  .sticker-cta {
    top: -12px;
    right: -8px;
    padding: 8px 12px 8px 10px;
    font-size: 0.85rem;
  }
}

/* Quick View icon button in Last 5 Games rows */
.history-view-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: transparent;
  color: #c9fdd7;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.history-view-icon:hover {
  background: rgba(25, 135, 84, 0.2);
  color: #fff;
}

.history-view-icon svg {
  display: block;
}

/* Quick View Modal (full screen) */
.quickview-modal-backdrop {
  position: fixed;
  inset: 0;
  background: #0a0e1a;
  display: flex;
  align-items: stretch;
  justify-content: center;
  z-index: 60;
}

/* When hidden class is applied, force it to be fully hidden */
.hidden.quickview-modal-backdrop {
  display: none !important;
}

.quickview-modal {
  background: #0a0e1a;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.quickview-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

.quickview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #1f2937;
}

.quickview-title {
  font-weight: 800;
  font-size: 1.5rem;
  color: #fff;
  flex: 1;
}

.quickview-meta {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.25rem;
}

.quickview-close {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #9ca3af;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  margin-left: auto;
}

.quickview-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.quickview-close svg {
  display: block;
}

.quickview-list {
  display: grid;
  gap: 16px;
}

.quickview-item {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 16px;
}

.quickview-question {
  color: #e5e7eb;
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.quickview-your {
  font-size: 1rem;
  margin-bottom: 6px;
}

.quickview-your.correct { color: var(--correct); }
.quickview-your.incorrect { color: var(--incorrect); }

.quickview-correct {
  font-size: 1rem;
  color: #fbbf24;
}

.quickview-empty {
  color: #9ca3af;
  text-align: center;
  padding: 40px;
  font-size: 1.1rem;
}