@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

/* ============================
   DESIGN TOKENS
============================ */
:root {
  --brand-primary: #1a73e8;
  --brand-primary-hover: #1557b0;
  --brand-secondary: #e8f0fe;

  --bg-page: #f0f4f8;
  --bg-gradient: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 100%);
  --bg-card: #ffffff;
  --bg-header: #ffffff;

  --text-main: #102a43;
  --text-muted: #627d98;
  --text-inverse: #ffffff;

  --state-success: #198754;
  --state-danger: #d93025;
  --state-warning: #f9ab00;

  --border-color: #d9e2ec;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 4px 6px rgba(16, 42, 67, 0.05);
  --shadow-md: 0 10px 20px rgba(16, 42, 67, 0.08);
  --shadow-lg: 0 20px 40px rgba(16, 42, 67, 0.12);

  --max-width: 960px;
  --spacing-xl: 48px;
}

/* ============================
   RESET & BASE
============================ */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, sans-serif;
  background: var(--bg-page);
  background-image: var(--bg-gradient);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-xl) 24px;
}

.center { text-align: center; }

/* ============================
   TIPOGRAFIA
============================ */
h1 {
  font-size: 36px;
  font-weight: 800;
  color: #102a43;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 28px;
  font-weight: 700;
  color: #102a43;
  margin-bottom: 12px;
}




.subtitle {
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}




/* ============================
   BOTÕES & AÇÕES
============================ */
.actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  justify-content: center;
  flex-wrap: wrap;
}

button,
.link-btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 32px;
  cursor: pointer;
  border-radius: 30px;
  border: 2px solid transparent;
  transition: all 0.25s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.2px;
}

.primary {
  background: var(--brand-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.2);
}

.primary:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(26, 115, 232, 0.3);
}

.ghost {
  background: white;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.ghost:hover {
  background: var(--brand-secondary);
}

.link-btn {
  background: #e0e6ed;
  color: #102a43;
  font-size: 14px;
  padding: 10px 24px;
}

.link-btn:hover {
  background: #cedbe9;
}

/* ============================
   GRID DE MODOS (HOME)
============================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin: 56px 0;
}

.card-btn {
  background: var(--bg-card);
  padding: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card-btn::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--brand-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.card-btn:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-primary);
}

.card-btn:hover::after {
  transform: scaleX(1);
}

.card-btn span {
  font-weight: 400;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================
   SELETOR DE QUANTIDADE (HOME)
============================ */
.qty-section {
  margin-top: 8px;
}

.qty-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}

.qty-grid {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.qty-btn {
  background: white;
  color: var(--text-main);
  border: 2px solid var(--border-color);
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.25s ease;
  min-width: 80px;
}

.qty-btn:hover:not(.active) {
  border-color: var(--brand-primary);
  background: var(--brand-secondary);
  color: var(--brand-primary);
}

.qty-btn.active {
  background: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.25);
  transform: translateY(-2px);
}

.qty-hint {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
}

/* ============================
   QUESTÕES
============================ */
.option-btn {
  display: block;
  width: 100%;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid var(--border-color);
  text-align: left;
  cursor: pointer;
  font-size: 16px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.option-btn:hover {
  border-color: var(--brand-primary);
  background: #f8faff;
}

/* ============================
   TIMER
============================ */
.timer {
  background: #102a43;
  color: #fff;
  display: inline-flex;
  padding: 8px 20px;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 24px;
  border-radius: 40px;
  box-shadow: 0 4px 12px rgba(16, 42, 67, 0.2);
  letter-spacing: 1px;
}

/* ============================
   MODAL (RESULTADO)
============================ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(16, 42, 67, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  backdrop-filter: blur(4px);
}

.modal.hidden {
  display: none;
}

.modal-card {
  background: white;
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.modal-header {
  padding: 20px 32px;
  background: #f8faff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  color: #102a43;
}

.modal-body {
  padding: 40px 32px;
  text-align: center;
}

.modal-actions {
  padding: 20px 32px;
  background: #f8faff;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--border-color);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--brand-primary);
}

/* ============================
   FOOTER
============================ */
footer {
  margin-top: 80px;
  padding: 32px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.5);
}

/* ============================
   UTILIDADES
============================ */
.hidden { display: none; }

.card {
  background: white;
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

/* ============================
   RESPONSIVO
============================ */
@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .card-btn {
    padding: 32px;
  }

  h1 {
    font-size: 28px;
  }

  .subtitle {
    font-size: 16px;
  }

  .qty-grid {
    gap: 10px;
  }

  .qty-btn {
    padding: 10px 20px;
    font-size: 14px;
    min-width: 60px;
  }

  .modal-card {
    max-width: 100%;
  }

  .modal-header,
  .modal-body,
  .modal-actions {
    padding-left: 20px;
    padding-right: 20px;
  }

  .modal-actions {
    flex-wrap: wrap;
    justify-content: center;
  }
}