/* ============================================================
   CrystalRaid.info — Main Stylesheet
   ============================================================ */

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

:root {
  --primary:   #7c3aed;
  --primary-d: #5b21b6;
  --accent:    #f59e0b;
  --accent-d:  #d97706;
  --dark:      #0f0a1e;
  --dark2:     #1a1035;
  --dark3:     #251848;
  --light:     #f3f0ff;
  --text:      #e2d9f3;
  --text-muted:#a89cc8;
  --white:     #ffffff;
  --radius:    12px;
  --shadow:    0 8px 32px rgba(124,58,237,.25);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--dark);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a  { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-d); }

/* ---- Cookie Banner ---- */
#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--dark3);
  border-top: 2px solid var(--primary);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  z-index: 9000;
  font-size: .9rem;
}
#cookie-banner p { flex: 1; min-width: 200px; }
#cookie-banner .btn-cookie {
  background: var(--primary); color: #fff; border: none;
  padding: 8px 22px; border-radius: 8px; cursor: pointer; font-size: .9rem; font-weight: 600;
  transition: background .2s;
}
#cookie-banner .btn-cookie:hover { background: var(--primary-d); }

/* ---- Age Popup ---- */
#age-popup {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 10000;
  align-items: center; justify-content: center;
}
#age-popup.active { display: flex; }
.age-popup-box {
  background: var(--dark2);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 40px 36px;
  max-width: 480px; width: 90%;
  text-align: center;
  box-shadow: var(--shadow);
}
.age-popup-box h2 { font-size: 2rem; color: var(--accent); margin-bottom: 12px; }
.age-popup-box p  { color: var(--text-muted); margin-bottom: 28px; }
.age-popup-box .age-warning {
  font-size: .8rem; color: var(--text-muted); margin-top: 16px;
}
.age-btn-group { display: flex; gap: 14px; justify-content: center; }
.btn-yes, .btn-no {
  padding: 12px 32px; border: none; border-radius: 8px;
  font-size: 1rem; font-weight: 700; cursor: pointer; transition: transform .15s, background .2s;
}
.btn-yes { background: var(--primary); color: #fff; }
.btn-yes:hover { background: var(--primary-d); transform: scale(1.04); }
.btn-no  { background: #374151; color: #fff; }
.btn-no:hover  { background: #1f2937; transform: scale(1.04); }

/* ---- Navigation ---- */
header {
  position: sticky; top: 0; z-index: 500;
  background: rgba(15,10,30,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(124,58,237,.3);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-size: 1.5rem; font-weight: 800; color: var(--white);
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  color: var(--text); font-weight: 500; font-size: .95rem;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }

/* Hamburger */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--white); margin: 5px 0; border-radius: 2px;
  transition: all .3s;
}

/* ---- Hero ---- */
.hero {
  position: relative; overflow: hidden;
  min-height: 520px;
  display: flex; align-items: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('../img/hero.jpg');
  background-size: cover; background-position: center;
  filter: brightness(.45);
}
.hero-content {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto; padding: 80px 24px;
}
.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900; color: var(--white);
  line-height: 1.15; margin-bottom: 18px;
}
.hero-content h1 span { color: var(--accent); }
.hero-content p {
  font-size: 1.15rem; color: var(--text);
  max-width: 560px; margin-bottom: 32px;
}
.btn-primary {
  display: inline-block;
  background: var(--primary); color: #fff;
  padding: 14px 36px; border-radius: 10px;
  font-weight: 700; font-size: 1rem;
  border: none; cursor: pointer;
  transition: background .2s, transform .15s;
  text-decoration: none;
}
.btn-primary:hover { background: var(--primary-d); transform: translateY(-2px); color: #fff; }
.btn-accent {
  display: inline-block;
  background: var(--accent); color: var(--dark);
  padding: 14px 36px; border-radius: 10px;
  font-weight: 700; font-size: 1rem;
  border: none; cursor: pointer;
  transition: background .2s, transform .15s;
  text-decoration: none;
}
.btn-accent:hover { background: var(--accent-d); transform: translateY(-2px); color: var(--dark); }

/* ---- Section Wrappers ---- */
.section { padding: 72px 24px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800; color: var(--white);
  margin-bottom: 12px;
}
.section-title span { color: var(--accent); }
.section-sub {
  color: var(--text-muted); font-size: 1rem;
  max-width: 600px; margin-bottom: 40px;
}
.section-dark  { background: var(--dark2); }
.section-darker{ background: var(--dark3); }

/* ---- Games Grid ---- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.game-card {
  background: var(--dark3);
  border: 1px solid rgba(124,58,237,.3);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.game-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.game-card img { width: 100%; height: 220px; object-fit: cover; }
.game-card-body { padding: 20px; }
.game-card-body h3 { font-size: 1.2rem; color: var(--white); margin-bottom: 8px; }
.game-card-body p  { color: var(--text-muted); font-size: .9rem; margin-bottom: 16px; }

/* ---- Features ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.feature-item {
  background: var(--dark3);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  border: 1px solid rgba(124,58,237,.2);
}
.feature-icon { font-size: 2.4rem; margin-bottom: 14px; }
.feature-item h3 { color: var(--white); margin-bottom: 8px; font-size: 1.1rem; }
.feature-item p  { color: var(--text-muted); font-size: .9rem; }

/* ---- About ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: center;
}
.about-img { border-radius: var(--radius); overflow: hidden; }
.about-img img { width: 100%; height: 380px; object-fit: cover; }
.about-text h2 { font-size: 2rem; color: var(--white); margin-bottom: 16px; }
.about-text h2 span { color: var(--accent); }
.about-text p { color: var(--text-muted); margin-bottom: 14px; }

/* ---- Venues ---- */
.venues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.venue-card {
  background: var(--dark2);
  border: 1px solid rgba(124,58,237,.25);
  border-radius: var(--radius);
  padding: 24px;
}
.venue-card h3 { color: var(--accent); font-size: 1.1rem; margin-bottom: 8px; }
.venue-card p  { color: var(--text-muted); font-size: .9rem; margin-bottom: 4px; }
.venue-card .venue-address { font-size: .85rem; color: var(--text-muted); }

/* ---- Newsletter / CTA ---- */
.newsletter-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--dark3) 100%);
  border-radius: var(--radius);
  padding: 48px 36px;
  text-align: center;
}
.newsletter-box h2 { font-size: 1.8rem; color: var(--white); margin-bottom: 10px; }
.newsletter-box p  { color: rgba(255,255,255,.8); margin-bottom: 28px; }
.newsletter-form {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.newsletter-form input[type="email"] {
  padding: 12px 20px; border-radius: 8px; border: none;
  font-size: 1rem; width: 300px; max-width: 100%;
  background: rgba(255,255,255,.15); color: #fff;
  outline: none;
}
.newsletter-form input[type="email"]::placeholder { color: rgba(255,255,255,.6); }
.newsletter-form input[type="email"]:focus { background: rgba(255,255,255,.22); }
.newsletter-form button {
  padding: 12px 28px; border-radius: 8px; border: none;
  background: var(--accent); color: var(--dark);
  font-weight: 700; font-size: 1rem; cursor: pointer;
  transition: background .2s, transform .15s;
}
.newsletter-form button:hover { background: var(--accent-d); transform: translateY(-2px); }

/* ---- Contact Form ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.contact-info h2 { font-size: 1.8rem; color: var(--white); margin-bottom: 16px; }
.contact-info p  { color: var(--text-muted); margin-bottom: 12px; }
.contact-info .info-item { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.contact-info .info-icon { font-size: 1.3rem; margin-top: 2px; }
.contact-form-box {
  background: var(--dark3);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid rgba(124,58,237,.25);
}
.form-group { margin-bottom: 18px; }
.form-group label { display: block; color: var(--text); font-size: .9rem; margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 11px 14px;
  background: var(--dark2); border: 1px solid rgba(124,58,237,.3);
  border-radius: 8px; color: var(--text); font-size: .95rem;
  outline: none; transition: border-color .2s;
  font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--primary);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-success {
  display: none;
  background: rgba(16,185,129,.15);
  border: 1px solid #10b981;
  border-radius: 8px;
  padding: 14px 18px;
  color: #6ee7b7;
  margin-top: 14px;
  font-size: .95rem;
}

/* ---- Slot Machine ---- */
.slot-machine {
  background: var(--dark3);
  border: 2px solid var(--primary);
  border-radius: 20px;
  padding: 32px;
  max-width: 560px; margin: 0 auto;
  text-align: center;
  box-shadow: 0 0 40px rgba(124,58,237,.4);
}
.slot-machine h2 { color: var(--accent); font-size: 1.6rem; margin-bottom: 24px; }
.slot-reels {
  display: flex; gap: 12px; justify-content: center;
  margin-bottom: 24px;
}
.reel {
  width: 100px; height: 100px;
  background: var(--dark2);
  border: 2px solid rgba(124,58,237,.5);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  overflow: hidden;
  position: relative;
}
.reel.spinning { animation: reelSpin .15s linear infinite; }
@keyframes reelSpin {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}
.slot-result {
  min-height: 28px; font-size: 1.1rem; font-weight: 700;
  color: var(--accent); margin-bottom: 18px;
}
.slot-credits { color: var(--text-muted); font-size: .95rem; margin-bottom: 20px; }
.slot-credits strong { color: var(--white); }

/* ---- Wheel of Fortune ---- */
.wheel-section {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.wheel-container {
  position: relative; width: 340px; height: 340px;
}
#wheel-canvas { border-radius: 50%; }
.wheel-pointer {
  position: absolute; top: -18px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 32px solid var(--accent);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.6));
}
.wheel-result {
  font-size: 1.2rem; font-weight: 700; color: var(--accent);
  min-height: 30px; text-align: center;
}

/* ---- Tokens Game ---- */
.tokens-game {
  background: var(--dark3);
  border: 2px solid var(--accent);
  border-radius: 20px;
  padding: 32px;
  max-width: 560px; margin: 0 auto;
  text-align: center;
}
.tokens-game h2 { color: var(--accent); font-size: 1.6rem; margin-bottom: 8px; }
.tokens-display {
  font-size: 3rem; margin: 18px 0;
}
.tokens-count {
  font-size: 1.4rem; color: var(--white); margin-bottom: 20px;
}
.tokens-count span { color: var(--accent); font-weight: 800; font-size: 1.8rem; }
.tokens-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 10px;
  margin-bottom: 20px;
}
.token-btn {
  background: var(--dark2); border: 2px solid rgba(245,158,11,.3);
  border-radius: 10px; padding: 14px 8px;
  font-size: 1.6rem; cursor: pointer;
  transition: all .2s;
}
.token-btn:hover { border-color: var(--accent); transform: scale(1.08); background: rgba(245,158,11,.1); }
.token-btn.matched { background: rgba(16,185,129,.2); border-color: #10b981; }
.token-btn.wrong   { background: rgba(239,68,68,.2);  border-color: #ef4444; animation: shake .3s; }
@keyframes shake {
  0%,100%{ transform: translateX(0); }
  25%    { transform: translateX(-6px); }
  75%    { transform: translateX(6px); }
}
.tokens-message { font-size: 1rem; color: var(--accent); min-height: 24px; margin-bottom: 14px; }

/* ---- Footer ---- */
footer {
  background: var(--dark2);
  border-top: 1px solid rgba(124,58,237,.2);
  padding: 48px 24px 24px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px; margin-bottom: 36px;
}
.footer-brand p { color: var(--text-muted); font-size: .9rem; margin-top: 10px; max-width: 280px; }
.footer-col h4 { color: var(--white); font-size: 1rem; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: var(--text-muted); font-size: .9rem; }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(124,58,237,.15);
  padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
}
.footer-bottom p { color: var(--text-muted); font-size: .85rem; }
.footer-disclaimer {
  color: var(--text-muted); font-size: .8rem;
  margin-top: 16px; padding: 12px 16px;
  background: rgba(0,0,0,.2); border-radius: 8px;
  border-left: 3px solid var(--primary);
}

/* ---- Policy Pages ---- */
.policy-content {
  max-width: 860px; margin: 0 auto; padding: 60px 24px;
}
.policy-content h1 { font-size: 2rem; color: var(--white); margin-bottom: 8px; }
.policy-content .updated { color: var(--text-muted); font-size: .9rem; margin-bottom: 36px; }
.policy-content h2 { font-size: 1.3rem; color: var(--accent); margin: 28px 0 10px; }
.policy-content p, .policy-content li { color: var(--text-muted); font-size: .95rem; margin-bottom: 10px; }
.policy-content ul, .policy-content ol { padding-left: 22px; }
.policy-content a { color: var(--accent); }

/* ---- Page Hero (inner pages) ---- */
.page-hero {
  background: linear-gradient(135deg, var(--dark3) 0%, var(--dark2) 100%);
  padding: 60px 24px;
  text-align: center;
  border-bottom: 1px solid rgba(124,58,237,.2);
}
.page-hero h1 { font-size: clamp(1.8rem,4vw,2.8rem); color: var(--white); margin-bottom: 10px; }
.page-hero p  { color: var(--text-muted); font-size: 1rem; max-width: 560px; margin: 0 auto; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--dark2); padding: 16px 24px; gap: 16px; border-bottom: 1px solid rgba(124,58,237,.3); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
  .reel { width: 80px; height: 80px; font-size: 2.2rem; }
  .wheel-container { width: 280px; height: 280px; }
  #wheel-canvas { width: 280px; height: 280px; }
}
