/*
  Riobet one-page theme
  Colors: dark-green base with green accents
*/

:root {
  --bg: #0c1f17;          /* dark green background */
  --bg-alt: #0f2a20;      /* slightly lighter dark green */
  --surface: #153528;     /* surface card */
  --text: #e6f5ee;        /* near-white on dark */
  --muted: #a9c8bb;       /* muted text */
  --primary: #2ecc71;     /* green accent */
  --primary-600: #27ae60; /* darker accent */
  --outline: #244a3a;     /* borders */
  --shadow: rgba(0,0,0,0.3);
}

/* Performance optimizations */
* { box-sizing: border-box; }
html, body { height: 100%; }

/* Critical CSS for above-the-fold content */
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1000px 600px at 80% -100px, #124a2f55, transparent), var(--bg);
  line-height: 1.6;
  font-display: swap;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Performance hints */
img { 
  max-width: 100%; 
  height: auto; 
  loading: lazy;
  decoding: async;
}

/* Reduce layout shifts */
.game-thumb img {
  aspect-ratio: 16/9;
  object-fit: cover;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(12,31,23,0.7);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--outline);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-logo { height: 32px; width: auto; display: block; }
.brand-name { font-weight: 700; letter-spacing: 0.2px; }

.site-nav { display: flex; align-items: center; gap: 24px; }
.nav-menu { display: flex; list-style: none; gap: 20px; margin: 0; padding: 0; }
.nav-menu a { color: var(--text); text-decoration: none; opacity: 0.9; }
.nav-menu a:hover { color: var(--primary); }

.cta-group { display: flex; gap: 10px; }

.nav-toggle { display: none; flex-direction: column; gap: 3px; background: transparent; border: 0; cursor: pointer; }
.nav-bar { display: block; width: 22px; height: 2px; background: var(--text); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 600; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: linear-gradient(180deg, var(--primary), var(--primary-600)); color: #062012; box-shadow: 0 8px 20px -8px #2ecc7166; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--outline); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: rgba(255,255,255,0.06); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-small { padding: 8px 12px; font-size: 14px; border-radius: 8px; }

/* Hero */
.hero { padding: 64px 0 40px; background: radial-gradient(600px 300px at 0% -40%, #2ecc7130, transparent); }
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; }
.hero h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.15; margin: 0 0 10px; }
.hero p { margin: 0 0 16px; color: var(--muted); }
.hero-cta { display: flex; gap: 10px; }
.hero-img { width: 100%; max-width: 360px; filter: drop-shadow(0 22px 40px var(--shadow)); display: block; }
.hero-art { display: flex; justify-content: center; align-items: center; }

/* Sections */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(22px, 3vw, 32px); margin: 0 0 16px; }
.section-description { 
  color: var(--muted); 
  margin: 0 0 24px; 
  font-size: 18px; 
  text-align: center; 
  max-width: 600px; 
  margin-left: auto; 
  margin-right: auto; 
}
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--outline); border-radius: 14px; padding: 18px; box-shadow: 0 10px 24px -16px var(--shadow); }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0 0 10px; color: var(--muted); }
.card .link { color: var(--primary); text-decoration: none; }
.card .link:hover { text-decoration: underline; }

/* Features grid */
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 24px; }
.feature { background: var(--surface); border: 1px solid var(--outline); border-radius: 14px; padding: 20px; }
.feature h3 { margin: 0 0 10px; font-size: 18px; color: var(--primary); }
.feature p { margin: 0; color: var(--muted); line-height: 1.5; }

/* SEO Content */
.seo-content { margin-top: 24px; }
.seo-content h3 { margin: 24px 0 12px; font-size: 20px; color: var(--primary); }
.seo-content p { margin: 0 0 16px; color: var(--muted); line-height: 1.6; }
.seo-content h3:first-child { margin-top: 0; }

/* Games carousel - auto-scrolling infinite */
.carousel-container { position: relative; margin: 24px 0; }
.carousel-wrapper { overflow: hidden; border-radius: 16px; }
.carousel-track { 
  display: flex; 
  gap: 16px; 
  animation: scroll 30s linear infinite;
  width: calc(200% + 32px); /* Double width for seamless loop */
}
.carousel-track:hover { animation-play-state: paused; }

.game { 
  background: var(--surface); 
  border: 1px solid var(--outline); 
  border-radius: 14px; 
  padding: 12px; 
  display: grid; 
  grid-template-rows: 140px auto auto; 
  gap: 10px; 
  min-width: 280px; 
  flex-shrink: 0; 
}
.game-thumb { 
  position: relative; 
  border-radius: 10px; 
  background: linear-gradient(135deg, #204c39, #143828); 
  border: 1px solid var(--outline); 
  overflow: hidden; 
}
.game-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.game-info h3 { margin: 0 0 4px; font-size: 16px; }
.game-info p { margin: 0; font-size: 14px; color: var(--muted); }

/* Steps */
.steps { margin: 0; padding-left: 18px; }
.steps li { margin-bottom: 12px; }
.steps h3 { margin: 0 0 4px; font-size: 18px; }
.steps p { margin: 0; color: var(--muted); }

/* Accordion */
.accordion { display: grid; gap: 10px; }
.acc-item { background: var(--surface); border: 1px solid var(--outline); border-radius: 12px; overflow: hidden; }
.acc-btn { width: 100%; text-align: left; background: transparent; color: var(--text); border: 0; padding: 14px 16px; font-weight: 600; cursor: pointer; }
.acc-btn:hover { color: var(--primary); }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
.acc-panel > p { overflow: hidden; margin: 0; padding: 0 16px 0; color: var(--muted); }
.acc-item.open .acc-panel { grid-template-rows: 1fr; }
.acc-item.open .acc-panel > p { padding: 0 16px 14px; }

/* Footer */
.site-footer { border-top: 1px solid var(--outline); background: #0b1a14; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.footer-nav { display: flex; gap: 14px; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--primary); }
.legal { color: var(--muted); font-size: 14px; }

/* Responsive */
@media (max-width: 1024px) {
  .container { width: 95%; }
  .hero h1 { font-size: clamp(24px, 5vw, 36px); }
  .section h2 { font-size: clamp(20px, 4vw, 28px); }
}

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 20px; }
  .hero-art { display: block; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .game { min-width: 240px; }
  .carousel-track { animation-duration: 25s; }
}

@media (max-width: 768px) {
  .hero { padding: 40px 0 32px; }
  .section { padding: 40px 0; }
  .hero-cta { flex-direction: column; align-items: center; gap: 12px; }
  .btn { padding: 12px 20px; font-size: 16px; }
  .cards { grid-template-columns: 1fr; gap: 12px; }
  .game { min-width: 220px; padding: 10px; }
  .game-thumb { height: 120px; }
  .carousel-track { animation-duration: 20s; }
  .footer-inner { flex-direction: column; text-align: center; gap: 12px; }
}

@media (max-width: 720px) {
  .site-nav { gap: 10px; }
  .nav-toggle { display: flex; }
  .nav-menu { 
    position: absolute; 
    top: 60px; 
    right: 4%; 
    left: 4%; 
    background: var(--bg-alt); 
    border: 1px solid var(--outline); 
    border-radius: 12px; 
    padding: 10px; 
    flex-direction: column; 
    gap: 8px; 
    display: none; 
  }
  .nav-menu.open { display: flex; }
  .cta-group { display: none; }
  .game { min-width: 200px; }
  .features-grid { grid-template-columns: 1fr; }
  .carousel-track { animation-duration: 18s; }
}

@media (max-width: 480px) {
  .container { width: 98%; }
  .hero h1 { font-size: 22px; }
  .section h2 { font-size: 20px; }
  .game { min-width: 180px; padding: 8px; }
  .game-thumb { height: 100px; }
  .game-info h3 { font-size: 14px; }
  .game-info p { font-size: 12px; }
  .btn-small { padding: 6px 10px; font-size: 12px; }
  .carousel-track { animation-duration: 15s; }
}


