/* =========================================================
   Basket Bounty — landing page stylesheet
   Palette:
   --bg-start (#160a30) -> --bg-end (#4b1489) animated gradient
   --gold (#d4af37) accent, --white (#ffffff) text
   ========================================================= */

:root {
  --bg-start: #150a2e;
  --bg-mid: #2c0f5e;
  --bg-end: #4d1591;
  --gold: #d4af37;
  --gold-light: #f1d98b;
  --gold-dark: #a9821f;
  --white: #ffffff;
  --white-soft: rgba(255, 255, 255, 0.82);
  --header-bg: rgba(10, 5, 24, 0.75);
  --border-gold: rgba(212, 175, 55, 0.4);
  --max-width: 1180px;
  --radius: 10px;
  --font-heading: Georgia, "Times New Roman", serif;
  --font-body: "Segoe UI", Arial, Helvetica, sans-serif;
}

/* ---------- Reset ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--white);
  background: linear-gradient(120deg, var(--bg-start), var(--bg-mid), var(--bg-end), var(--bg-mid), var(--bg-start));
  background-size: 300% 300%;
  animation: gradientFlow 22s ease infinite;
  display: flex;
  flex-direction: column;
}

@keyframes gradientFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
  html { scroll-behavior: auto; }
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--gold-light);
}

:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-gold);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img {
  height: 40px;
  width: auto;
}

/* Main nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  color: var(--white-soft);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.25s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--gold);
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  width: 100%;
}

/* Header actions (lang switcher + buttons) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.btn {
  display: inline-block;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: all 0.2s ease;
  border: 1.5px solid var(--gold);
}

.btn-login {
  background: transparent;
  color: var(--gold);
}

.btn-login:hover,
.btn-login:focus-visible {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-light);
}

.btn-register {
  background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
  color: #1a0e33;
}

.btn-register:hover,
.btn-register:focus-visible {
  filter: brightness(1.08);
  color: #1a0e33;
}

/* Language switcher */
.lang-switcher {
  position: relative;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid var(--border-gold);
  color: var(--white);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.lang-current:hover,
.lang-current:focus-visible {
  border-color: var(--gold);
}

.lang-current .flag {
  font-size: 18px;
  line-height: 1;
}

.lang-current .arrow {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: -3px;
}

.lang-switcher.open .lang-current .arrow {
  transform: rotate(-135deg);
  margin-top: 3px;
}

.lang-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  list-style: none;
  margin: 0;
  padding: 8px;
  min-width: 210px;
  max-height: 320px;
  overflow-y: auto;
  background: #180b34;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.lang-switcher.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-dropdown li + li {
  margin-top: 2px;
}

.lang-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--white-soft);
  font-size: 14px;
}

.lang-dropdown a .flag {
  font-size: 18px;
}

.lang-dropdown a:hover,
.lang-dropdown a:focus-visible {
  background: rgba(212, 175, 55, 0.14);
  color: var(--gold-light);
}

.lang-dropdown a.active {
  color: var(--gold);
  font-weight: 700;
  background: rgba(212, 175, 55, 0.08);
}

/* Burger (mobile) */
.burger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1.5px solid var(--border-gold);
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold);
  font-size: 20px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   MAIN CONTENT
   ========================================================= */

.site-main {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

/* Headings */
.site-main h1,
.site-main h2,
.site-main h3,
.site-main h4 {
  font-family: var(--font-heading);
  color: var(--gold);
  line-height: 1.25;
  margin: 1.4em 0 0.6em;
}

.site-main h1 {
  font-size: clamp(28px, 5vw, 44px);
  margin-top: 0;
  text-align: center;
  text-shadow: 0 2px 18px rgba(212, 175, 55, 0.35);
}

.site-main h2 {
  font-size: clamp(22px, 3.6vw, 30px);
  border-bottom: 1px solid var(--border-gold);
  padding-bottom: 10px;
}

.site-main h3 {
  font-size: clamp(18px, 2.8vw, 22px);
  color: var(--gold-light);
}

.site-main h4 {
  font-size: 17px;
  color: var(--gold-light);
}

/* Paragraphs & text */
.site-main p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--white-soft);
  margin: 0 0 1.2em;
}

.site-main ul,
.site-main ol {
  color: var(--white-soft);
  line-height: 1.75;
  margin: 0 0 1.2em;
  padding-left: 1.4em;
}

.site-main li::marker {
  color: var(--gold);
}

.site-main strong {
  color: var(--gold-light);
}

.site-main blockquote {
  margin: 1.6em 0;
  padding: 18px 22px;
  border-left: 3px solid var(--gold);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--white-soft);
}

.site-main hr {
  border: none;
  border-top: 1px solid var(--border-gold);
  margin: 2.4em 0;
}

/* Images inserted between paragraphs */
.content-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 1.8em auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.content-image + .image-caption {
  display: block;
  text-align: center;
  margin-top: -1.2em;
  margin-bottom: 1.8em;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

/* Tables — wrap in .table-wrapper so overflow scrolls on mobile
   instead of stretching the page */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 1.8em 0;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}

.site-main table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 15px;
}

.site-main thead th {
  background: rgba(212, 175, 55, 0.16);
  color: var(--gold-light);
  font-family: var(--font-heading);
  font-weight: 700;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border-gold);
  white-space: nowrap;
}

.site-main tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white-soft);
}

.site-main tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.site-main tbody tr:last-child td {
  border-bottom: none;
}

/* Centered CTA button template */
.cta-wrapper {
  text-align: center;
  margin: 2.6em 0;
}

.btn-cta {
  display: inline-block;
  padding: 16px 46px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #1a0e33;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 55%, var(--gold-dark) 100%);
  border: 1px solid var(--gold-light);
  box-shadow: 0 8px 26px rgba(212, 175, 55, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-cta:hover,
.btn-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(212, 175, 55, 0.5);
  filter: brightness(1.05);
  color: #1a0e33;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  border-top: 1px solid var(--border-gold);
  background: rgba(8, 4, 20, 0.55);
  padding: 26px 20px;
}

.site-footer p {
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

/* =========================================================
   RESPONSIVE / MOBILE
   ========================================================= */

@media (max-width: 900px) {
  .main-nav {
    gap: 18px;
  }
}

@media (max-width: 768px) {
  .burger {
    display: flex;
    order: 3;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .main-nav {
    order: 4;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .main-nav.open {
    max-height: 240px;
    padding-top: 10px;
    border-top: 1px solid var(--border-gold);
    margin-top: 10px;
  }

  .main-nav a {
    width: 100%;
    padding: 10px 0;
  }

  .header-actions {
    gap: 8px;
  }

  .btn-login,
  .btn-register {
    padding: 8px 14px;
    font-size: 13px;
  }

  .lang-current span:not(.flag):not(.arrow) {
    display: none;
  }

  .site-main {
    padding: 32px 16px 48px;
  }

  .btn-cta {
    width: 100%;
    padding: 15px 20px;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 10px 14px;
  }

  .logo img {
    height: 32px;
  }

  .site-main h1 {
    font-size: 26px;
  }

  .site-main p,
  .site-main table {
    font-size: 14.5px;
  }
}
