/* ===========================================================
   TitanReels — Bronze Titan theme
   Pure CSS. No frameworks.
=========================================================== */

:root {
  --bg: #0e0a06;
  --primary: #CD7F32;
  --accent: #E8E8E8;
  --cta: #CD7F32;
  --cta-text: #fff;
  --text: #d4c4a8;
  --card: #1a1208;
  --border: rgba(205, 127, 50, .25);

  --metal: linear-gradient(135deg, #E8B878 0%, #CD7F32 45%, #8a5320 100%);
  --radius: 6px;
  --maxw: 1200px;
  --head: 'Bebas Neue', 'Open Sans', sans-serif;
  --body: 'Open Sans', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  padding-bottom: 60px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--head);
  letter-spacing: .04em;
  line-height: 1.05;
  color: #fff;
  font-weight: 400;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.4rem; }

a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }

.metal-text {
  background: var(--metal);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--head);
  font-size: 1.05rem;
  letter-spacing: .06em;
  padding: .7rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  text-align: center;
  line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); }
.btn--cta {
  background: var(--metal);
  color: var(--cta-text);
  box-shadow: 0 4px 18px rgba(205, 127, 50, .35);
}
.btn--cta:hover { box-shadow: 0 6px 26px rgba(205, 127, 50, .55); }
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--outline:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Header ---------- */
.header { position: fixed; top: 0; left: 0; right: 0; height: 64px; z-index: 100; background: var(--bg); border-bottom: 1px solid var(--border); }
.header__inner { display: flex; align-items: center; gap: 1rem; padding: 0 1.5rem; height: 100%; }
.header__nav { display: flex; gap: .25rem; margin-left: auto; }
.header__actions { display: flex; gap: .5rem; align-items: center; }
.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; }

.logo { display: flex; align-items: center; gap: .55rem; }
.logo svg { width: 34px; height: 34px; }
.logo__name { font-family: var(--head); font-size: 1.5rem; letter-spacing: .06em; color: #fff; }
.logo__name b { color: var(--primary); font-weight: 400; }

.nav-link {
  padding: .45rem .8rem;
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 600;
  font-size: .9rem;
  transition: color .2s, background .2s;
}
.nav-link:hover, .nav-link.active { color: var(--primary); background: rgba(205, 127, 50, .08); }

/* ---------- 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 .5rem; }
.sidebar__label { font-size: .7rem; letter-spacing: .2em; opacity: .5; font-weight: 700; }
.sidebar__nav { display: flex; flex-direction: column; padding: .25rem 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; }
.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; }

/* ---------- 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; font-family: var(--body); }
.mobile-nav__item svg { width: 20px; height: 20px; }
.mobile-nav__item:active { color: var(--primary); }

/* ---------- Layout ---------- */
.main { margin-top: 64px; min-height: calc(100vh - 64px); }
.section { padding: 3.5rem 1.5rem; max-width: var(--maxw); margin: 0 auto; }
.section--narrow { max-width: 820px; }
.section__head { margin-bottom: 1.75rem; }
.section__head h2 { margin-bottom: .35rem; }
.section__head p { opacity: .75; max-width: 640px; }

.eyebrow { font-family: var(--head); letter-spacing: .25em; color: var(--primary); font-size: 1rem; display: block; margin-bottom: .5rem; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 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 { margin-bottom: 1rem; max-width: 14ch; }
.hero p.lead { font-size: 1.15rem; max-width: 52ch; margin-bottom: 1.75rem; opacity: .9; }
.hero__cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.hero__disclaimer { font-size: .78rem; opacity: .6; letter-spacing: .02em; }

.hero__decor { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .5; }
.hero__decor svg { position: absolute; }
.blob-1 { top: -120px; right: -80px; width: 460px; height: 460px; animation: spin 40s linear infinite; }
.blob-2 { bottom: -160px; right: 18%; width: 320px; height: 320px; animation: float 9s ease-in-out infinite; }
.blob-3 { top: 30%; right: 4%; width: 140px; height: 140px; animation: float 7s ease-in-out infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-26px); } }

/* ---------- Game cards / 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: #fff; font-size: 1.4rem; display: flex; align-items: center; justify-content: center; cursor: pointer; border: none; z-index: 10; transition: background .2s; }
.carousel-btn:hover { background: #e09a52; }
.carousel-btn--prev { left: -8px; }
.carousel-btn--next { right: -8px; }

.game-card {
  flex: 0 0 180px;
  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;
  outline: none;
}
.game-card:hover, .game-card:focus { transform: translateY(-4px); border-color: var(--primary); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.game-card__thumb { position: relative; aspect-ratio: 3/4; background: #120c04; 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(14, 10, 6, .72); opacity: 0; transition: opacity .2s; }
.game-card:hover .game-card__overlay, .game-card:focus .game-card__overlay { opacity: 1; }
.game-card__play { font-family: var(--head); letter-spacing: .06em; background: var(--metal); color: var(--cta-text); border: none; padding: .55rem 1.1rem; border-radius: var(--radius); cursor: pointer; font-size: .95rem; }
.game-card__demo-tag { font-size: .6rem; font-weight: 800; letter-spacing: .15em; color: var(--primary); border: 1px solid var(--primary); padding: .15rem .45rem; border-radius: 50px; }
.game-card__tags { position: absolute; top: .4rem; left: .4rem; display: flex; flex-wrap: wrap; gap: .25rem; }
.game-tag { font-size: .58rem; font-weight: 700; letter-spacing: .04em; background: rgba(14, 10, 6, .8); color: var(--accent); padding: .15rem .45rem; border-radius: 4px; border: 1px solid var(--border); }
.game-card__info { padding: .6rem .7rem .75rem; }
.game-card__title { font-weight: 700; font-size: .85rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-card__provider { font-size: .72rem; opacity: .55; margin-top: .15rem; }

.center { text-align: center; }
.mt-2 { margin-top: 2rem; }

/* ---------- Games grid ---------- */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
.games-grid .game-card { flex: none; }
.games-empty { padding: 3rem 1rem; text-align: center; opacity: .6; }

/* ---------- Category tabs ---------- */
.cat-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.cat-tab { font-family: var(--head); letter-spacing: .05em; font-size: 1rem; padding: .5rem 1.1rem; border-radius: 50px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; transition: all .2s; }
.cat-tab:hover { border-color: var(--primary); color: var(--primary); }
.cat-tab.active { background: var(--metal); color: var(--cta-text); border-color: transparent; }

.notice-bar { position: sticky; top: 64px; z-index: 80; background: var(--card); border-bottom: 1px solid var(--border); padding: .6rem 1.5rem; text-align: center; font-size: .8rem; letter-spacing: .03em; color: var(--accent); }

.lobby-toolbar { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.search-box { flex: 1; min-width: 220px; }
.search-box input { width: 100%; }

input, select, textarea {
  font-family: var(--body);
  font-size: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .75rem 1rem;
  color: var(--text);
  width: 100%;
  transition: border-color .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: .4rem; opacity: .85; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.step-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem 1.5rem; position: relative; overflow: hidden; }
.step-card__num { font-family: var(--head); font-size: 3.2rem; line-height: 1; background: var(--metal); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; opacity: .9; }
.step-card h3 { margin: .5rem 0 .5rem; }
.step-card p { font-size: .92rem; opacity: .85; }

.notice-box { margin-top: 1.75rem; background: rgba(205, 127, 50, .06); border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: var(--radius); padding: 1.1rem 1.4rem; font-size: .88rem; }
.notice-box strong { color: var(--primary); }

/* ---------- Reviews ---------- */
.reviews { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.review-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; display: flex; flex-direction: column; gap: .6rem; }
.review-stars { color: var(--primary); letter-spacing: .15em; font-size: .95rem; }
.review-text { font-size: .9rem; opacity: .9; flex: 1; }
.review-author { display: flex; align-items: center; gap: .6rem; margin-top: .4rem; }
.review-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--metal); color: #0e0a06; display: flex; align-items: center; justify-content: center; font-family: var(--head); font-size: 1.1rem; }
.review-name { font-weight: 700; font-size: .85rem; color: #fff; }
.review-city { font-size: .74rem; opacity: .55; }

/* ---------- About banner ---------- */
.banner { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem 2rem; text-align: center; position: relative; overflow: hidden; }
.banner h2 { margin-bottom: .75rem; }
.banner p { max-width: 56ch; margin: 0 auto 1.5rem; opacity: .88; }
.ornate-hr { border: none; height: 1px; background: linear-gradient(90deg, transparent, var(--primary), transparent); margin: 1.25rem auto; max-width: 200px; }

/* ---------- SEO details ---------- */
.seo details { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.seo summary { cursor: pointer; font-family: var(--head); letter-spacing: .05em; font-size: 1.2rem; color: var(--primary); }
.seo p { margin-top: 1rem; opacity: .85; font-size: .92rem; }
.seo h3 { margin: 1.25rem 0 .5rem; font-size: 1.15rem; }

/* ---------- Content pages ---------- */
.prose { max-width: 820px; }
.prose h2 { margin: 2rem 0 .75rem; }
.prose h3 { margin: 1.5rem 0 .5rem; color: var(--primary); }
.prose p { margin-bottom: 1rem; opacity: .9; }
.prose ul { margin: 0 0 1rem 1.25rem; }
.prose li { margin-bottom: .5rem; opacity: .9; }
.prose a { text-decoration: underline; }

.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .75rem; background: var(--card); padding: 1.1rem 1.4rem; }
.faq-item summary { cursor: pointer; font-weight: 700; color: #fff; }
.faq-item p { margin-top: .75rem; font-size: .92rem; opacity: .85; }

/* ---------- Contact form ---------- */
.form-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; max-width: 640px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.1rem; }
.form-success { display: none; margin-top: 1rem; padding: 1rem 1.25rem; background: rgba(205, 127, 50, .1); border: 1px solid var(--primary); border-radius: var(--radius); color: var(--accent); }

/* ---------- Modal (auth) ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .82); z-index: 9998; display: none; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.open { display: flex; }
.modal { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); width: 100%; max-width: 420px; padding: 2rem; position: relative; }
.modal h3 { margin-bottom: .35rem; }
.modal p.sub { font-size: .85rem; opacity: .7; margin-bottom: 1.25rem; }
.modal__close { position: absolute; top: .85rem; right: 1rem; background: none; border: none; color: var(--text); font-size: 1.2rem; cursor: pointer; }
.modal .btn { width: 100%; margin-top: .5rem; }
.modal__switch { text-align: center; font-size: .82rem; margin-top: 1rem; opacity: .8; }
.modal__switch button { background: none; border: none; color: var(--primary); cursor: pointer; font-weight: 700; font-family: var(--body); }
.modal__error { color: #ff8a6a; font-size: .8rem; margin-top: .5rem; min-height: 1rem; }

/* ---------- 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: #111; }
.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: 3rem 1.5rem 1.5rem; }
.footer__inner { max-width: var(--maxw); margin: 0 auto; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer__brand .logo { margin-bottom: .75rem; }
.footer__brand p { font-size: .85rem; opacity: .7; max-width: 38ch; }
.footer__col h4 { font-family: var(--head); letter-spacing: .08em; font-size: 1.1rem; margin-bottom: .75rem; color: var(--primary); }
.footer__col a { display: block; font-size: .85rem; color: var(--text); opacity: .75; margin-bottom: .45rem; }
.footer__col a:hover { opacity: 1; color: var(--primary); }
.footer__bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.footer__badges { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.badge-18 { font-family: var(--head); font-size: 1rem; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--primary); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.footer__disclaimer { font-size: .76rem; opacity: .6; line-height: 1.7; }
.footer__legal { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .76rem; }
.footer__legal a { opacity: .6; }
.footer__legal a:hover { opacity: 1; }

/* ===========================================================
   Responsive
=========================================================== */
@media (min-width: 1024px) {
  .main { margin-left: 220px; }
  .footer { margin-left: 220px; }
  body { padding-bottom: 0; }
}

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

@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; }
  .mobile-nav { display: flex; align-items: center; justify-content: space-around; }
  .notice-bar { top: 64px; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; margin-left: auto; }
  .header__nav { display: none; }
  .header__actions { display: none; }
  .steps { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .reviews { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .games-grid { grid-template-columns: repeat(2, 1fr); }
  .carousel .game-card { flex: 0 0 80vw; }
  .section { padding: 1.5rem 1rem; }
  .hero { padding: 2.5rem 1rem; }
  .btn, input, select, textarea { min-height: 48px; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; }
}

@media (max-width: 375px) {
  .header__inner { padding: 0 .75rem; }
  .games-grid { gap: .5rem; }
}
