/* =========================================================
   Alpine Valley Play — Arctic Flash theme
   Pure CSS. No frameworks. Free social casino.
   ========================================================= */

:root {
  --bg: #0d1b2a;
  --primary: #00C2FF;
  --accent: #FF4757;
  --cta: #7BED9F;
  --cta-text: #111;
  --text: #b8d4e8;
  --card: #0f2235;
  --border: rgba(0, 194, 255, .2);

  --heading-font: 'Exo 2', system-ui, sans-serif;
  --body-font: 'Source Sans Pro', system-ui, sans-serif;
  --maxw: 1180px;
  --radius: 10px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  line-height: 1.6;
  font-size: 16px;
  padding-bottom: 60px;
  overflow-x: hidden;
}
@media (min-width: 1024px) { body { padding-bottom: 0; } }

h1, h2, h3, h4 { font-family: var(--heading-font); color: #fff; line-height: 1.2; letter-spacing: .5px; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem; font-family: var(--heading-font); font-weight: 700;
  font-size: .8rem; letter-spacing: .6px; text-transform: uppercase;
  padding: .65rem 1.3rem; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; transition: all .2s ease; white-space: nowrap;
}
.btn--cta { background: var(--cta); color: var(--cta-text); }
.btn--cta:hover { box-shadow: 0 0 18px rgba(123, 237, 159, .5); transform: translateY(-2px); }
.btn--outline { background: transparent; color: var(--primary); border-color: var(--border); }
.btn--outline:hover { border-color: var(--primary); box-shadow: 0 0 14px rgba(0, 194, 255, .35); }
.btn--lg { padding: .9rem 1.8rem; font-size: .9rem; }
.link-btn { background: none; border: none; color: var(--primary); cursor: pointer; font: inherit; text-decoration: underline; }

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; height: 64px; z-index: 100;
  background: var(--bg); border-bottom: 1px solid var(--border);
  transition: box-shadow .2s;
}
.header.scrolled { box-shadow: 0 4px 20px rgba(0, 0, 0, .45); }
.header__inner { display: flex; align-items: center; gap: 1rem; padding: 0 1.5rem; height: 100%; }
.logo { display: flex; align-items: center; gap: .55rem; font-family: var(--heading-font); font-weight: 800; color: #fff; font-size: 1.1rem; letter-spacing: .5px; }
.logo svg { width: 30px; height: 30px; flex-shrink: 0; }
.logo span b { color: var(--primary); }
.header__nav { display: flex; gap: .25rem; margin-left: auto; }
.nav-link { color: var(--text); font-weight: 600; font-size: .9rem; padding: .5rem .8rem; border-radius: 6px; transition: all .2s; }
.nav-link:hover, .nav-link.active { color: var(--primary); background: rgba(0, 194, 255, .08); }
.header__actions { display: flex; gap: .5rem; align-items: center; }
#auth-username { font-weight: 700; color: var(--primary); font-size: .9rem; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; border: none; background: none; padding: 6px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .header__nav { display: none; }
  .header__actions { display: none; }
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; top: 64px; left: 0; width: 220px; height: calc(100vh - 64px);
  background: var(--card); border-right: 1px solid var(--border);
  overflow-y: auto; z-index: 90; display: flex; flex-direction: column;
}
.sidebar__top { padding: 1rem 1.25rem .35rem; }
.sidebar__label { font-size: .68rem; letter-spacing: 2px; color: var(--text); opacity: .5; font-weight: 700; }
.sidebar__nav { display: flex; flex-direction: column; padding: .35rem 0; }
.sidebar__link {
  display: flex; align-items: center; gap: .75rem; padding: .65rem 1.25rem;
  color: var(--text); font-weight: 600; font-size: .88rem;
  border-left: 3px solid transparent; transition: all .2s; text-decoration: none;
}
.sidebar__link svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.sidebar__link:hover, .sidebar__link.active { color: var(--primary); border-left-color: var(--primary); background: rgba(255, 255, 255, .04); }
.sidebar__footer { margin-top: auto; padding: 1rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: .4rem; }
.sidebar__footer a { font-size: .75rem; color: var(--text); opacity: .6; text-decoration: none; }
.sidebar__footer a:hover { opacity: 1; color: var(--primary); }
.sidebar__overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 190; display: none; }

@media (min-width: 1024px) {
  .main { margin-left: 220px; }
  .footer { margin-left: 220px; }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: transform .3s; top: 0; height: 100vh; z-index: 200; }
  .sidebar.open { transform: translateX(0); }
  .sidebar__overlay.show { display: block; }
  .main { margin-left: 0; }
  .footer { margin-left: 0; }
}

/* ---------- Mobile bottom nav ---------- */
.mobile-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; height: 60px; background: var(--card); border-top: 1px solid var(--border); z-index: 150; }
.mobile-nav__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; flex: 1; background: none; border: none; color: var(--text);
  font-size: .68rem; font-weight: 600; cursor: pointer; text-decoration: none; padding: 0;
}
.mobile-nav__item svg { width: 20px; height: 20px; }
.mobile-nav__item:hover { color: var(--primary); }
@media (max-width: 1024px) { .mobile-nav { display: flex; align-items: center; justify-content: space-around; } }

/* ---------- Layout ---------- */
.main { padding-top: 64px; min-height: 100vh; }
.section { padding: 3rem 1.5rem; max-width: var(--maxw); margin: 0 auto; }
.section--narrow { max-width: 820px; }
.section__head { margin-bottom: 1.5rem; }
.section__head h2 { font-size: 1.7rem; }
.section__head p { opacity: .8; margin-top: .35rem; }
.eyebrow { color: var(--primary); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: .72rem; }

/* diagonal section divider (tech style) */
.divider {
  height: 2px; background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: .4; margin: 0; border: none; transform: skewY(-.4deg);
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 4.5rem 1.5rem 4rem; border-bottom: 1px solid var(--border); }
.hero__inner { max-width: var(--maxw); margin: 0 auto; position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.3rem); max-width: 720px; }
.hero h1 .grad { background: linear-gradient(90deg, var(--primary), var(--cta)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p.lead { font-size: 1.1rem; max-width: 560px; margin: 1.1rem 0 1.8rem; opacity: .9; }
.hero__cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero__note { margin-top: 1.6rem; font-size: .78rem; opacity: .65; letter-spacing: .3px; }
.hero__deco { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero__deco svg { position: absolute; opacity: .5; }
.deco-1 { top: -40px; right: 4%; width: 320px; animation: float 9s ease-in-out infinite; }
.deco-2 { bottom: -60px; right: 22%; width: 200px; animation: float 7s ease-in-out infinite reverse; }
.deco-ring { position: absolute; top: 20%; right: 10%; width: 180px; height: 180px; border: 2px solid var(--primary); border-radius: 50%; opacity: .15; animation: pulse 4s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-22px); } }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: .15; } 50% { transform: scale(1.12); opacity: .3; } }

/* ---------- Carousel ---------- */
.carousel-wrap { position: relative; }
.carousel-viewport { overflow: hidden; padding: .5rem .25rem; }
.carousel { display: flex; gap: 1rem; transition: transform .35s ease; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px;
  border-radius: 50%; background: var(--primary); color: #04121d; font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center; cursor: pointer; border: none; z-index: 10;
  box-shadow: 0 0 14px rgba(0, 194, 255, .45);
}
.carousel-btn:hover { background: #fff; }
.carousel-btn--prev { left: -8px; }
.carousel-btn--next { right: -8px; }
.carousel .game-card { flex: 0 0 180px; }

/* ---------- Game card ---------- */
.game-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s; }
.game-card:hover, .game-card:focus-visible { transform: translateY(-4px); border-color: var(--primary); box-shadow: 0 8px 26px rgba(0, 194, 255, .25); outline: none; }
.game-card__thumb { position: relative; aspect-ratio: 3 / 4; background: #0a1825; overflow: hidden; }
.game-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.game-card__overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; background: rgba(7, 20, 34, .78); opacity: 0; transition: opacity .2s; }
.game-card:hover .game-card__overlay, .game-card:focus-visible .game-card__overlay { opacity: 1; }
.game-card__play { background: var(--cta); color: var(--cta-text); border: none; font-family: var(--heading-font); font-weight: 800; font-size: .8rem; padding: .55rem 1.1rem; border-radius: 6px; cursor: pointer; letter-spacing: .5px; }
.game-card__demo-tag { font-size: .62rem; letter-spacing: 2px; color: var(--primary); font-weight: 700; }
.game-card__tags { position: absolute; top: .5rem; left: .5rem; display: flex; gap: .3rem; flex-wrap: wrap; max-width: 90%; }
.game-tag { background: rgba(0, 194, 255, .15); color: var(--primary); font-size: .58rem; font-weight: 700; padding: .15rem .45rem; border-radius: 4px; letter-spacing: .5px; backdrop-filter: blur(2px); }
.game-card__info { padding: .6rem .7rem .75rem; }
.game-card__title { font-weight: 700; color: #fff; font-size: .82rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-card__provider { font-size: .7rem; opacity: .6; margin-top: .15rem; }

/* ---------- Games grid (lobby) ---------- */
.lobby-bar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; }
.cat-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.cat-tab { background: var(--card); border: 1px solid var(--border); color: var(--text); font-family: var(--heading-font); font-weight: 600; font-size: .78rem; padding: .5rem .95rem; border-radius: 50px; cursor: pointer; transition: all .2s; }
.cat-tab:hover { border-color: var(--primary); color: var(--primary); }
.cat-tab.active { background: var(--primary); color: #04121d; border-color: var(--primary); }
.search-box { position: relative; }
.search-box input { background: var(--card); border: 1px solid var(--border); color: var(--text); padding: .6rem 1rem; border-radius: 50px; font-size: .85rem; min-width: 230px; font-family: var(--body-font); }
.search-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 12px rgba(0, 194, 255, .25); }
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
.games-empty { display: none; text-align: center; padding: 3rem 1rem; opacity: .7; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; position: relative; overflow: hidden; }
.step__num { font-family: var(--heading-font); font-size: 2.6rem; font-weight: 800; color: var(--primary); opacity: .25; line-height: 1; }
.step h3 { margin: .5rem 0 .5rem; font-size: 1.15rem; }
.step p { opacity: .85; font-size: .92rem; }
.notice-box { margin-top: 1.6rem; border: 1px solid var(--border); border-left: 3px solid var(--primary); background: rgba(0, 194, 255, .05); padding: 1.1rem 1.3rem; border-radius: var(--radius); font-size: .9rem; }
.notice-box strong { color: var(--primary); }

/* ---------- Reviews ---------- */
.reviews { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.review { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; }
.review__stars { color: var(--cta); letter-spacing: 2px; font-size: .95rem; }
.review__text { font-size: .9rem; margin: .6rem 0 .9rem; opacity: .9; }
.review__who { font-weight: 700; color: #fff; font-size: .88rem; }
.review__city { font-size: .75rem; opacity: .6; }

/* ---------- About banner ---------- */
.banner { background: linear-gradient(120deg, var(--card), rgba(0, 194, 255, .08)); border: 1px solid var(--border); border-radius: 14px; padding: 2.5rem; display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.banner__text { max-width: 560px; }
.banner h2 { font-size: 1.6rem; margin-bottom: .6rem; }

/* ---------- SEO / details ---------- */
.seo details { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.4rem; }
.seo summary { cursor: pointer; font-family: var(--heading-font); font-weight: 700; color: var(--primary); }
.seo .seo-body { margin-top: 1rem; }
.seo .seo-body p { margin-bottom: .9rem; opacity: .88; font-size: .94rem; }
.seo .seo-body h3 { font-size: 1.1rem; margin: 1.2rem 0 .5rem; }

/* ---------- Content / article pages ---------- */
.article { max-width: 820px; }
.article h1 { font-size: 2rem; margin-bottom: .4rem; }
.article .updated { font-size: .8rem; opacity: .6; margin-bottom: 1.6rem; }
.article h2 { font-size: 1.3rem; margin: 1.8rem 0 .6rem; color: #fff; }
.article h3 { font-size: 1.05rem; margin: 1.2rem 0 .4rem; }
.article p, .article li { opacity: .9; margin-bottom: .8rem; }
.article ul, .article ol { padding-left: 1.3rem; margin-bottom: 1rem; }
.article li { margin-bottom: .4rem; }
.article a { color: var(--primary); text-decoration: underline; }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .7rem; background: var(--card); }
.faq-item summary { cursor: pointer; padding: 1rem 1.2rem; font-weight: 700; color: #fff; font-family: var(--heading-font); font-size: .98rem; list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; position: absolute; right: 1.2rem; color: var(--primary); font-size: 1.3rem; }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item .faq-body { padding: 0 1.2rem 1.1rem; opacity: .88; font-size: .92rem; }

/* ---------- Cards row (features) ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.1rem; }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.feature h3 { font-size: 1.08rem; margin-bottom: .45rem; color: var(--primary); }
.feature p { font-size: .9rem; opacity: .88; }

/* ---------- Forms ---------- */
.form { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1.8rem; max-width: 640px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: .35rem; }
.form-group label { font-size: .82rem; font-weight: 600; color: #fff; }
.form input, .form select, .form textarea {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: .75rem 1rem; color: var(--text); font-family: var(--body-font); font-size: .92rem; width: 100%;
}
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 12px rgba(0, 194, 255, .25); }
.form-success { display: none; margin-top: 1rem; padding: 1rem 1.2rem; border-radius: 8px; background: rgba(123, 237, 159, .12); border: 1px solid var(--cta); color: var(--cta); font-weight: 600; font-size: .9rem; }

/* ---------- Auth modal ---------- */
.auth-modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .8); z-index: 9999; display: none; align-items: center; justify-content: center; padding: 1rem; }
.auth-modal { background: var(--card); border: 1px solid var(--border); border-radius: 14px; width: 100%; max-width: 420px; padding: 1.8rem; position: relative; }
.auth-modal h3 { font-size: 1.3rem; margin-bottom: 1.2rem; }
.auth-modal__close { position: absolute; top: 1rem; right: 1.1rem; background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.auth-modal .form-group { margin-bottom: .9rem; }
.auth-modal input { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: .7rem .9rem; color: var(--text); font-family: var(--body-font); width: 100%; font-size: .92rem; }
.auth-modal input:focus { outline: none; border-color: var(--primary); }
.auth-error { color: var(--accent); font-size: .82rem; min-height: 1rem; margin-bottom: .4rem; }
.auth-toggle { margin-top: 1rem; font-size: .85rem; text-align: center; opacity: .85; }
.auth-disclaimer { margin-top: 1rem; font-size: .7rem; opacity: .6; text-align: center; }

/* ---------- Game modal ---------- */
.game-modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .9); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.game-modal { background: var(--card); border-radius: 12px; width: 100%; max-width: 1000px; height: 85vh; display: flex; flex-direction: column; overflow: hidden; }
.game-modal__header { display: flex; align-items: center; gap: .5rem; padding: .65rem 1rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.game-modal__header span { font-weight: 800; color: var(--text); flex: 1; font-size: .9rem; }
.game-modal__badges { display: flex; gap: .35rem; }
.badge { font-size: .6rem; font-weight: 900; padding: .2rem .55rem; border-radius: 50px; white-space: nowrap; }
.badge--free { background: var(--cta); color: var(--cta-text); }
.badge--social { background: var(--accent); color: #fff; }
.game-modal__close { background: none; border: none; color: var(--text); font-size: 1.2rem; cursor: pointer; padding: .2rem .5rem; }
.game-modal__disclaimer { background: rgba(255, 200, 0, .06); padding: .4rem 1rem; font-size: .72rem; color: #ffd; text-align: center; flex-shrink: 0; }
.game-modal__frame { flex: 1; display: flex; min-height: 0; overflow: hidden; }
.game-modal__frame iframe { width: 100%; height: 100%; flex: 1; border: none; display: block; }

/* ---------- Footer ---------- */
.footer { background: var(--card); border-top: 1px solid var(--border); padding: 2.5rem 1.5rem 1.5rem; }
.footer__inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 1.5rem; }
.footer__brand .logo { margin-bottom: .8rem; }
.footer__brand p { font-size: .82rem; opacity: .75; max-width: 280px; }
.footer__col h4 { font-size: .8rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--primary); margin-bottom: .8rem; }
.footer__col a { display: block; color: var(--text); font-size: .85rem; opacity: .8; margin-bottom: .45rem; }
.footer__col a:hover { opacity: 1; color: var(--primary); }
.footer__bottom { max-width: var(--maxw); margin: 1.8rem auto 0; padding-top: 1.3rem; border-top: 1px solid var(--border); }
.footer__disclaimer { font-size: .76rem; opacity: .65; line-height: 1.6; }
.footer__badges { display: flex; gap: .6rem; flex-wrap: wrap; margin: .9rem 0; }
.footer__badge { border: 1px solid var(--border); border-radius: 6px; padding: .3rem .7rem; font-size: .7rem; font-weight: 700; color: var(--text); letter-spacing: .5px; }
.footer__copy { font-size: .76rem; opacity: .55; margin-top: .8rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) { .section { padding: 2.6rem 1.5rem; } }
@media (max-width: 1024px) {
  .reviews { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .hero { padding: 3rem 1.25rem; }
  .banner { padding: 1.8rem; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  body { font-size: 15px; }
  .games-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews { grid-template-columns: 1fr; }
  .carousel .game-card { flex: 0 0 60vw; }
  .footer__inner { grid-template-columns: 1fr; }
  .section { padding: 1.5rem 1rem; }
  .btn, input, select, textarea { min-height: 48px; }
  .search-box input { min-width: 0; width: 100%; }
  .search-box { width: 100%; }
  .lobby-bar { flex-direction: column; align-items: stretch; }
}
@media (max-width: 375px) {
  .header__inner { padding: 0 .75rem; }
  .games-grid { gap: .5rem; }
}
