/* StonkRider - Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #111114;
  --bg-card: #1a1a1e;
  --bg-darker: #0a0a0c;
  --text: #ffffff;
  --text-muted: #888;
  --accent: #ef9f27;
  --accent-green: #5DCAA5;
  --border: #2a2a2e;
  --border-light: rgba(239,159,39,0.3);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.header {
  background: rgba(17,17,20,0.95);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 60px;
}

.logo {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.logo span { color: var(--accent); }

.lang-switcher { display: flex; gap: 4px; flex-wrap: wrap; }

.lang-link {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
  background: var(--bg-card);
  border: 1px solid transparent;
}

.lang-link:hover { color: #fff; border-color: var(--border); }
.lang-link.active { color: #000; background: var(--accent); border-color: var(--accent); font-weight: 600; }

/* Container */
.container { max-width: 1000px; margin: 0 auto; padding: 0 24px; }

/* Ad Banner */
.ad-banner {
  max-width: 960px;
  margin: 20px auto;
  text-align: center;
  min-height: 90px;
}

/* Hero Game Section */
.hero-game {
  background: var(--bg);
  text-align: center;
  padding: 40px 24px 20px;
  border-bottom: 1px solid var(--border);
}

.hero-game h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.hero-game .hero-desc {
  max-width: 640px;
  margin: 0 auto 24px;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
}

.game-embed { max-width: 960px; margin: 0 auto; }

.game-container {
  position: relative;
  width: 100%;
  height: 85vh;
  max-height: 900px;
  background: #000;
  border-radius: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 0 60px rgba(239,159,39,0.06);
}

.game-container iframe {
  display: block;
  width: 100%;
  height: 1024px;
  border: none;
}

.game-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.game-actions button {
  background: var(--bg-card);
  color: #fff;
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.game-actions button:hover { border-color: var(--accent); color: var(--accent); }

.share-btns {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: center; margin-top: 8px;
}

.share-btns button {
  background: var(--bg-card); color: var(--text-muted);
  border: 1px solid var(--border); padding: 6px 14px;
  border-radius: 8px; font-size: 12px; cursor: pointer;
  transition: all 0.2s; font-family: inherit;
}

.share-btns button:hover { color: #fff; border-color: var(--accent); }

/* Sections */
section { padding: 60px 0; }
section:nth-child(even) { background: var(--bg-darker); }

h2 {
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

h2::after {
  content: '';
  display: block;
  width: 36px; height: 3px;
  background: var(--accent);
  border-radius: 2px; margin-top: 8px;
}

h3 { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 8px; }

p { color: var(--text-muted); margin-bottom: 12px; font-size: 16px; line-height: 1.7; }

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px; margin-top: 8px;
}

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

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

.feature-card h3 { color: var(--accent); }

/* Controls Info */
.controls-info { display: grid; gap: 20px; }

.control-item {
  background: var(--bg); border: 1px solid var(--border);
  padding: 24px; border-radius: 12px;
}

.control-item h3 { color: var(--accent); }

/* Tips List */
.tips-list { list-style: none; padding: 0; }

.tips-list li {
  background: var(--bg); border: 1px solid var(--border);
  padding: 16px 20px; margin-bottom: 10px; border-radius: 10px;
  color: var(--text-muted); position: relative; padding-left: 44px;
}

.tips-list li::before {
  content: '🏍️'; position: absolute; left: 14px; top: 14px; font-size: 16px;
}

/* Stock Pills */
.stock-pills {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px;
}

.stock-pill {
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); padding: 8px 16px; border-radius: 20px;
  font-size: 14px; font-weight: 600; transition: all 0.2s;
}

.stock-pill:hover { border-color: var(--accent); color: var(--accent); }

.stock-pill.hot { border-color: var(--accent-green); color: var(--accent-green); }

/* FAQ */
.faq-list { display: grid; gap: 10px; }

.faq-item {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
}

.faq-item summary {
  padding: 16px 24px; font-weight: 700; cursor: pointer;
  color: #fff; list-style: none; font-size: 15px;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; float: right; font-size: 20px; transition: transform 0.2s; color: var(--text-muted); }
.faq-item[open] summary::after { content: '−'; }

.faq-item p { padding: 0 24px 16px; margin: 0; }

/* CTA */
.cta-bottom {
  text-align: center; background: var(--bg-darker);
  padding: 80px 24px;
  border-top: 1px solid var(--border);
}

.cta-bottom h2 { margin-bottom: 12px; }
.cta-bottom h2::after { margin: 8px auto 0; }
.cta-bottom p { margin-bottom: 28px; font-size: 18px; }

.btn-play {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 44px; background: var(--accent); color: #000;
  font-size: 18px; font-weight: 700; text-decoration: none;
  border-radius: 10px; transition: all 0.3s;
}

.btn-play:hover { background: #f5a623; transform: translateY(-2px); }

/* Footer */
.footer {
  background: #000; border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-content {
  display: flex; justify-content: space-between;
  align-items: flex-start; flex-wrap: wrap; gap: 20px;
}

.footer-left p { font-size: 13px; margin: 0; }
.footer-right { display: flex; gap: 20px; flex-wrap: wrap; }

.footer-right a {
  color: var(--text-muted); text-decoration: none;
  font-size: 14px; transition: color 0.2s;
}

.footer-right a:hover { color: #fff; }

/* Open in new window link */
.direct-link {
  display: block; text-align: center; margin-top: 8px;
  font-size: 12px; color: var(--text-muted);
}

.direct-link a { color: var(--accent); text-decoration: none; }
.direct-link a:hover { text-decoration: underline; }

/* Leaderboard */
.leaderboard { background: var(--bg); }
.leaderboard p { margin-bottom: 20px; }

.lb-table {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
}

.lb-row {
  display: grid; grid-template-columns: 48px 1fr 1fr 120px;
  align-items: center; padding: 14px 20px; gap: 12px;
  border-bottom: 1px solid var(--border);
}
.lb-row:last-child { border-bottom: none; }

.lb-header {
  background: var(--bg-darker); font-size: 12px;
  font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
}

.lb-rank { font-weight: 700; color: var(--accent); font-size: 14px; }
.lb-player { font-weight: 600; color: #fff; font-size: 14px; }
.lb-ticker { color: var(--text-muted); font-size: 13px; }
.lb-score { font-weight: 700; color: var(--accent-green); font-size: 14px; text-align: right; }
.lb-loading { padding: 32px; text-align: center; color: var(--text-muted); font-size: 14px; }

@media (max-width: 768px) {
  .lb-row { grid-template-columns: 36px 1fr 100px; padding: 12px 16px; }
  .lb-ticker { display: none; }
  .lb-score { font-size: 13px; }
}

/* Comments */
.comments { background: var(--bg-darker); }
.comments p { margin-bottom: 20px; }
#giscus_thread { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 24px; min-height: 200px; }

/* Responsive */
@media (max-width: 768px) {
  .hero-game { padding: 24px 12px 16px; }
  .hero-game h1 { font-size: 22px; }
  .hero-game .hero-desc { font-size: 14px; margin-bottom: 16px; }
  .game-container { border-radius: 8px; height: 70vh; max-height: 600px; }
    .game-container iframe { height: 800px; }
  section { padding: 40px 0; }
  .nav { padding: 0 16px; min-height: 52px; }
  .logo { font-size: 18px; }
  .lang-link { padding: 4px 8px; font-size: 11px; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-content { flex-direction: column; text-align: center; }
  .footer-right { justify-content: center; }
  .btn-play { padding: 14px 28px; font-size: 16px; }
}

@media (max-width: 480px) {
  h2 { font-size: 20px; }
}
