/* ========================================
   BettinGPT Website Styles
   Matches Flutter app theme (theme.dart)
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
  --bg-primary: #000000;
  --bg-card: #1F1F1F;
  --bg-card-medium: #2D2D2D;
  --bg-rationale: #1A1A1A;
  --border: #404040;
  --border-bet: #1C4A3B;
  --text-primary: #FFFFFF;
  --text-secondary: #D1D5DB;
  --text-tertiary: #9CA3AF;
  --text-bright: #F9FAFB;
  --text-muted: #6B7280;
  --accent: #10B981;
  --accent-hover: #059669;
  --accent-light: #34D399;
  --link: #3B82F6;
  --error: #EF4444;
  --warning: #F59E0B;
  --max-width: 1200px;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 80px 0;
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-hamburger {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    gap: 20px;
  }

  .nav-links.open {
    display: flex;
  }
}

/* --- Hero --- */
.hero {
  padding: 100px 0 80px;
  background: linear-gradient(180deg, #000000 0%, #0a0f0d 50%, #000000 100%);
  overflow: hidden;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 8px;
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 520px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.875rem;
  transition: border-color 0.2s, background 0.2s;
}

.store-badge:hover {
  border-color: var(--accent);
  background: var(--bg-card-medium);
  color: var(--text-primary);
}

.store-badge svg {
  width: 24px;
  height: 24px;
  fill: var(--text-primary);
}


/* Phone mockups */
.hero-phones {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.phone-mockup {
  width: 200px;
  height: 420px;
  border-radius: 32px;
  border: 3px solid var(--border);
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-primary) 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.phone-mockup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: var(--bg-primary);
  border-radius: 0 0 14px 14px;
  z-index: 2;
}

.phone-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 29px;
}

.phone-mockup.featured {
  width: 220px;
  height: 460px;
  border-color: var(--border-bet);
  box-shadow: 0 25px 60px rgba(16, 185, 129, 0.15);
}

@media (max-width: 1023px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-phones {
    margin-top: 20px;
  }
}

@media (max-width: 639px) {
  .hero {
    padding: 60px 0 40px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-phones {
    gap: 12px;
  }

  .phone-mockup {
    width: 140px;
    height: 300px;
    border-radius: 24px;
  }

  .phone-mockup.featured {
    width: 160px;
    height: 340px;
  }

  .phone-mockup::before {
    width: 60px;
    height: 18px;
    border-radius: 0 0 10px 10px;
  }

  .phone-screenshot {
    border-radius: 21px;
  }
}

/* --- Features --- */
.features {
  background: var(--bg-primary);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  margin-bottom: 12px;
}

.section-header p {
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--border-bet);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.1);
  border-radius: var(--radius-xs);
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.feature-card h3 {
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  line-height: 1.6;
}

@media (max-width: 1023px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* --- How It Works --- */
.how-it-works {
  background: var(--bg-primary);
  padding-top: 0;
}

.steps {
  display: flex;
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.step-number {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border-radius: 50%;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  flex-shrink: 0;
}

.step p {
  font-size: 0.9375rem;
}

@media (max-width: 639px) {
  .steps {
    flex-direction: column;
    gap: 24px;
  }

  .step {
    flex-direction: row;
    text-align: left;
  }
}

/* --- Pricing --- */
.pricing {
  background: var(--bg-primary);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.pricing-card.popular {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.1);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pricing-card h3 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.pricing-card .price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.pricing-card .price-period {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.pricing-card .queries {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.pricing-card .feature-list {
  flex: 1;
  margin-bottom: 24px;
}

.pricing-card .feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 6px 0;
}

.pricing-card .feature-list li::before {
  content: '';
  width: 18px;
  height: 18px;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 50%;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2310B981'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  background-size: 14px;
  background-repeat: no-repeat;
  background-position: center;
}

.pricing-card .cta-btn {
  display: block;
  text-align: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}

.pricing-card .cta-btn.primary {
  background: var(--accent);
  color: var(--text-primary);
}

.pricing-card .cta-btn.primary:hover {
  background: var(--accent-hover);
}

.pricing-card .cta-btn.secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.pricing-card .cta-btn.secondary:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.pricing-note {
  text-align: center;
  margin-top: 24px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
}

/* --- Screenshots --- */
.screenshots {
  background: var(--bg-primary);
  padding-top: 0;
}

.screenshots-row {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

/* --- Support / FAQ --- */
.support {
  background: var(--bg-primary);
}

.support-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  max-width: 960px;
  margin: 0 auto;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.contact-card h3 {
  margin-bottom: 16px;
}

.contact-card p {
  font-size: 0.875rem;
  margin-bottom: 20px;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--border-bet);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.875rem;
  transition: background 0.2s;
}

.contact-email:hover {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-light);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-list details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-list summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--text-tertiary);
  transition: transform 0.2s;
}

.faq-list details[open] summary::after {
  content: '-';
}

.faq-list summary:hover {
  background: var(--bg-card-medium);
}

.faq-list .faq-answer {
  padding: 0 20px 16px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

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

/* --- Responsible Gambling Banner (on landing page) --- */
.responsible-banner {
  background: rgba(239, 68, 68, 0.05);
  border-top: 1px solid rgba(239, 68, 68, 0.2);
  border-bottom: 1px solid rgba(239, 68, 68, 0.2);
  padding: 40px 0;
}

.responsible-banner-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.responsible-banner h3 {
  color: var(--error);
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.responsible-banner p {
  font-size: 0.9375rem;
  margin-bottom: 12px;
}

.responsible-banner .helpline {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.responsible-banner a {
  color: var(--accent);
}

/* --- Footer --- */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.footer-brand {
  max-width: 300px;
}

.footer-brand .nav-logo {
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-links-group h4 {
  color: var(--text-tertiary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.footer-links-group a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 4px 0;
}

.footer-links-group a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 639px) {
  .footer-inner {
    flex-direction: column;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* --- Legal Pages (Privacy, Terms, Responsible Gambling) --- */
.legal-page {
  padding: 40px 0 80px;
}

.legal-page .container {
  max-width: 800px;
}

.legal-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.legal-header h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.legal-header .last-updated {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.legal-content h2 {
  font-size: 1.25rem;
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.legal-content h3 {
  font-size: 1rem;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.legal-content p {
  margin-bottom: 16px;
  font-size: 0.9375rem;
}

.legal-content ul,
.legal-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.legal-content ul {
  list-style: disc;
}

.legal-content ol {
  list-style: decimal;
}

.legal-content li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.6;
}

.legal-content a {
  color: var(--accent);
}

/* Responsible gambling page specific */
.warning-card {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.warning-card .warning-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
}

.warning-card p {
  color: var(--error);
  font-weight: 600;
  font-size: 0.9375rem;
  margin: 0;
}

.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.tip-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.tip-item p {
  margin: 0;
}

.resource-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.2s;
}

.resource-card:hover {
  border-color: var(--accent);
}

.resource-card .resource-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.resource-card .resource-info h4 {
  margin-bottom: 2px;
}

.resource-card .resource-info p {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin: 0;
}

/* --- 404 Page --- */
.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-page h1 {
  font-size: 6rem;
  color: var(--accent);
  margin-bottom: 8px;
}

.error-page p {
  font-size: 1.125rem;
  margin-bottom: 24px;
}

.error-page a {
  display: inline-block;
  padding: 12px 32px;
  background: var(--accent);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: background 0.2s;
}

.error-page a:hover {
  background: var(--accent-hover);
  color: var(--text-primary);
}
