/*
 * MakeMe.Rich - Fortune Green Theme
 *
 * Color Palette:
 * - Primary: #198754
 * - Dark: #0d503a
 * - Light: #d1e7dd
 * - Accent: #ffce3d (gold, dark surfaces only)
 * - Text: #212529
 */

:root {
  --fortune-primary: #198754;
  --fortune-dark: #0d503a;
  --fortune-light: #d1e7dd;
  --fortune-pale: #f4f9f6;
  --fortune-accent: #ffce3d;
  --fortune-text: #212529;
  --fortune-muted: #8a958f;
  --fortune-line: #e3e9e5;
  --fortune-red: #d64545;
}

/* Typography */
body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--fortune-text);
}

h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 700;
}

/* Navbar - solid deep green */
.navbar-fortune {
  background-color: var(--fortune-dark) !important;
}

.navbar-fortune .navbar-brand {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.navbar-fortune .brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--fortune-accent);
  color: var(--fortune-dark);
  font-weight: 800;
  font-size: 0.95rem;
}

.navbar-fortune .nav-link.active {
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--fortune-accent);
}

/* Hero - the one place the brand green fills the screen */
.hero-fortune {
  background-color: var(--fortune-dark);
  background-image: radial-gradient(600px 300px at 20% 0%, rgba(255, 206, 61, 0.12), transparent 70%);
  color: #fff;
  padding: 2.75rem 0 3.25rem;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.6rem;
}

.hero-eyebrow strong {
  color: #fff;
}

.hero-amount {
  font-family: 'Montserrat', sans-serif;
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--fortune-accent);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.hero-amount small {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0;
  margin-top: 0.4rem;
}

.hero-meta {
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

/* Upload card inside the hero */
.upload-card {
  background: #fff;
  color: var(--fortune-text);
  border-radius: 14px;
  padding: 1.25rem;
  width: 320px;
  flex-shrink: 0;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.upload-title {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.upload-dropzone {
  display: block;
  border: 2px dashed #b9cfc4;
  border-radius: 10px;
  padding: 1.25rem 1rem;
  text-align: center;
  color: #5d6b63;
  font-size: 0.88rem;
  background: var(--fortune-pale);
  margin-bottom: 0.75rem;
  cursor: pointer;
}

.upload-dropzone:hover,
.upload-dropzone:focus-within {
  border-color: var(--fortune-primary);
}

.upload-dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.upload-dropzone svg {
  color: var(--fortune-primary);
}

.upload-prompt {
  display: block;
  overflow-wrap: anywhere;
}

.upload-prompt strong {
  color: var(--fortune-primary);
}

.btn-upload {
  display: block;
  width: 100%;
  background: var(--fortune-primary);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 0.7rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-upload:hover,
.btn-upload:focus {
  background: #157347;
  color: #fff;
}

.upload-alt {
  text-align: center;
  color: var(--fortune-muted);
  font-size: 0.78rem;
  margin: 0.6rem 0 0;
}

.upload-signin-copy {
  color: #5d6b63;
  font-size: 0.88rem;
}

/* Auth pages (sign in / verify) */
.auth-page {
  background: var(--fortune-pale);
  min-height: 70vh;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--fortune-line);
  border-radius: 14px;
  padding: 1.75rem;
  box-shadow: 0 10px 30px rgba(13, 80, 58, 0.08);
}

.auth-brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--fortune-dark);
  color: var(--fortune-accent);
  font-weight: 800;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.9rem;
}

.auth-title {
  text-align: center;
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}

.auth-sub {
  text-align: center;
  color: #5d6b63;
  font-size: 0.88rem;
  margin-bottom: 1.4rem;
}

.auth-fineprint {
  font-size: 0.75rem;
  color: var(--fortune-muted);
  line-height: 1.55;
}

.auth-fineprint a {
  color: var(--fortune-primary);
}

.otp-input {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.6em;
  font-variant-numeric: tabular-nums;
}

/* Profile page */
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--fortune-dark);
  color: var(--fortune-accent);
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-name {
  font-size: 1.5rem;
}

.profile-chip {
  border: 1px solid #d5ddd8;
  border-radius: 999px;
  padding: 0.15rem 0.75rem;
  font-size: 0.8rem;
  color: #5d6b63;
  background: #fafcfb;
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--fortune-muted);
  margin-bottom: 0.6rem;
}

.quiet-card {
  background: #fff;
  border: 1px solid var(--fortune-line);
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
}

.stat-tile {
  background: #fff;
  border: 1px solid var(--fortune-line);
  border-radius: 12px;
  padding: 1.1rem 1.4rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-tile:hover {
  border-color: var(--fortune-primary);
  box-shadow: 0 4px 16px rgba(13, 80, 58, 0.08);
}

.stat-tile-number {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.15;
  color: var(--fortune-dark);
  font-variant-numeric: tabular-nums;
}

.stat-tile-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--fortune-muted);
  margin-top: 0.2rem;
}

.stat-tile-link {
  font-size: 0.8rem;
  color: var(--fortune-primary);
  font-weight: 600;
  margin-top: 0.5rem;
}

.notif-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
}

.notif-row + .notif-row {
  border-top: 1px solid #eef2ef;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 0.45rem;
  flex-shrink: 0;
}

.status-dot.on {
  background: var(--fortune-primary);
}

.status-dot.off {
  background: #d5ddd8;
}

.notif-state {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.notif-state.on {
  color: var(--fortune-primary);
}

.notif-state.off {
  color: #b0b9b3;
}

.quiet-link {
  color: var(--fortune-primary);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
}

.quiet-link:hover {
  color: var(--fortune-dark);
}

/* Section heading above the drawings table */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.section-head h2 {
  font-size: 1.25rem;
  margin: 0;
}

.section-sub {
  color: var(--fortune-muted);
  font-size: 0.85rem;
}

/* Drawings table - quiet card, readable columns */
.drawings-card {
  background: #fff;
  border: 1px solid var(--fortune-line);
  border-radius: 12px;
  overflow: hidden;
}

.table-drawings thead th {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fortune-muted);
  background: #fafcfb;
  border-bottom: 1px solid var(--fortune-line);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.table-drawings tbody td {
  vertical-align: middle;
  border-color: #eef2ef;
}

.table-drawings tbody tr:hover td {
  background-color: var(--fortune-pale);
}

.pp-chip {
  border: 1px solid #d5ddd8;
  color: #5d6b63;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.jackpot-cell {
  color: var(--fortune-dark);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.winner-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fortune-primary);
  white-space: nowrap;
}

.winner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fortune-primary);
}

.rollover-label {
  color: #b0b9b3;
  font-size: 0.85rem;
}

/* Card headers - solid deep green (used on ticket results, profile, etc.) */
.card-header-fortune {
  background: var(--fortune-dark) !important;
  color: white;
}

.bg-gradient-fortune,
.bg-fortune {
  background: var(--fortune-dark) !important;
}

/* Fortune Green buttons */
.btn-fortune {
  background: var(--fortune-primary);
  border: none;
  color: white;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-fortune:hover {
  background: #157347;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 80, 58, 0.3);
}

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

.btn-outline-fortune {
  color: var(--fortune-primary);
  border-color: var(--fortune-primary);
  background: transparent;
}

.btn-outline-fortune:hover {
  background: var(--fortune-primary);
  border-color: var(--fortune-primary);
  color: white;
}

/* Text colors */
.text-fortune {
  color: var(--fortune-primary) !important;
}

.text-fortune-dark {
  color: var(--fortune-dark) !important;
}

/* Background colors */
.bg-fortune-light {
  background-color: var(--fortune-light) !important;
}

/* Border colors */
.border-fortune {
  border-color: var(--fortune-primary) !important;
}

/* Lottery ball styles - lighter weight */
.lottery-ball {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.88rem;
}

.lottery-ball-white,
.lottery-ball.white-ball {
  background: white;
  color: var(--fortune-text);
  border: 1px solid #d5ddd8;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.lottery-ball-white.matched,
.lottery-ball.white-ball.matched {
  background: var(--fortune-primary);
  color: white;
  border-color: var(--fortune-dark);
}

.lottery-ball-power,
.lottery-ball.powerball {
  background: var(--fortune-red);
  color: white;
  border: 1px solid var(--fortune-red);
}

.lottery-ball-power.matched,
.lottery-ball.powerball.matched {
  background: #b02a37;
  border-color: #b02a37;
}

/* Card styling */
.card {
  border-radius: 12px;
}

.card-fortune {
  border: 2px solid var(--fortune-primary);
}

/* Stats card styling */
.stats-card {
  background: white;
  border-radius: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.stats-card-clickable {
  cursor: pointer;
}

.stats-card-clickable:hover {
  border: 2px solid var(--fortune-primary);
}

.stats-number {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.2;
}

/* Badge styling */
.badge-item {
  transition: transform 0.2s ease;
}

.badge-item:hover {
  transform: scale(1.1);
}

.badge-icon svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Form styling */
.form-control:focus {
  border-color: var(--fortune-primary);
  box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

.input-group-text {
  background-color: var(--fortune-light);
  border-color: #ced4da;
}

/* Winner highlight */
.winner-highlight {
  background: linear-gradient(135deg, var(--fortune-accent) 0%, #ffdb4d 100%);
  color: var(--fortune-text);
  font-weight: bold;
}

/* Jackpot amounts on light surfaces - deep green, never gold-on-white */
.jackpot-amount {
  color: var(--fortune-dark);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Power Play badge (ticket results) */
.power-play-badge {
  background: var(--fortune-accent);
  color: var(--fortune-text);
  font-weight: 700;
  padding: 0.25em 0.6em;
  border-radius: 0.375rem;
}

/* Table hover effect */
.table-fortune tbody tr:hover {
  background-color: var(--fortune-light);
}

/* Link styling */
a.text-fortune:hover {
  color: var(--fortune-dark) !important;
}

/* Footer */
.footer-fortune {
  background-color: var(--fortune-dark);
  color: rgba(255, 255, 255, 0.8);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1.75rem;
  }

  .hero-amount {
    font-size: 2.5rem;
  }

  .upload-card {
    width: 100%;
  }

  .lottery-ball {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }

  .stats-number {
    font-size: 2rem;
  }
}

/* Animation for winning results */
@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(255, 193, 7, 0); }
}

.winning-row {
  animation: pulse-gold 2s infinite;
}

@media (prefers-reduced-motion: reduce) {
  .winning-row {
    animation: none;
  }

  .btn-fortune,
  .stats-card,
  .badge-item {
    transition: none;
  }
}

/* Pagination styling - Fortune Green theme */
.pagy .pagination {
  gap: 0.25rem;
  margin-bottom: 0;
}

.pagy .page-item .page-link {
  border-radius: 8px;
  border: 1px solid #dee2e6;
  color: var(--fortune-primary);
  padding: 0.5rem 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pagy .page-item .page-link:hover {
  background-color: var(--fortune-light);
  border-color: var(--fortune-primary);
  color: var(--fortune-dark);
}

.pagy .page-item.active .page-link {
  background: var(--fortune-dark);
  border-color: var(--fortune-dark);
  color: white;
}

.pagy .page-item.disabled .page-link {
  background-color: #f8f9fa;
  border-color: #dee2e6;
  color: #6c757d;
}

.pagy .page-item.prev .page-link,
.pagy .page-item.next .page-link {
  font-weight: 600;
}
