/* =========================================================================
   Mystic Mage Studios — glavni stylesheet
   Boje su izvučene iz zvaničnog loga studija (tamno-navy + periwinkle
   plava + narandžasta). Sve boje idu preko CSS varijabli — menjaš na
   jednom mestu, menja se svuda.
   ========================================================================= */

:root {
  /* Osnovne boje */
  --bg: #0a0f1f;
  --bg-alt: #0e1526;
  --surface: #131c34;
  --surface-2: #1a2745;
  --border: rgba(123, 148, 224, 0.18);

  --blue: #5b7fdb;
  --blue-soft: #7d9aec;
  --blue-deep: #33477a;
  --orange: #f2954a;
  --orange-soft: #ffb273;

  --text: #f5f7fb;
  --text-muted: #a7b2d1;
  --text-faint: #6c7899;

  /* Tipografija */
  --font-display: "Cinzel", "Georgia", serif;
  --font-body: "Poppins", "Segoe UI", sans-serif;

  /* Layout */
  --container: 1180px;
  --radius: 16px;
  --radius-sm: 10px;
  --nav-height: 78px;

  --shadow-glow: 0 0 0 1px var(--border), 0 20px 60px -20px rgba(91, 127, 219, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
  color: var(--text-muted);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Blago zasijana pozadina — decentni "magic" gradient preko cele stranice */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(650px 400px at 15% -5%, rgba(91, 127, 219, 0.16), transparent 60%),
    radial-gradient(600px 400px at 100% 10%, rgba(242, 149, 74, 0.10), transparent 60%),
    var(--bg);
}

/* ---------- Dugmad ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange), #d9762c);
  color: #1a0e02;
  box-shadow: 0 10px 30px -10px rgba(242, 149, 74, 0.6);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -10px rgba(242, 149, 74, 0.75);
}

.btn-outline {
  background: rgba(91, 127, 219, 0.08);
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--blue-soft);
  background: rgba(91, 127, 219, 0.16);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 0.85rem;
}

/* ---------- Navigacija ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(10, 15, 31, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.nav.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 15, 31, 0.85);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: none;
  width: 100%;
  padding: 0 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--text);
}

.brand-mark {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand strong {
  color: var(--orange);
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(91, 127, 219, 0.12);
}

.nav-links a.active {
  color: var(--text);
  background: rgba(91, 127, 219, 0.18);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  padding-bottom: 100px;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.9;
}

.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo {
  width: 380px;
  height: 380px;
  object-fit: contain;
  margin-bottom: 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(91, 127, 219, 0.08);
  color: var(--blue-soft);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 20%, var(--blue-soft) 55%, var(--orange-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 2px solid var(--border);
  border-radius: 20px;
  z-index: 1;
}

.scroll-cue::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--orange-soft);
  transform: translateX(-50%);
  animation: scroll-cue 1.8s ease-in-out infinite;
}

@keyframes scroll-cue {
  0% { opacity: 0; transform: translate(-50%, 0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 12px); }
}

/* ---------- Sekcije opšte ---------- */
section {
  padding: 110px 0;
  position: relative;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-head .eyebrow {
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
}

.section-head p {
  margin: 0;
}

/* ---------- O nama ---------- */
.about {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.about h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
}

.about-body p:last-child {
  margin-bottom: 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.stat-card {
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
}

.stat-card .num {
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--orange-soft);
  display: block;
  margin-bottom: 6px;
}

.stat-card .label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Game karte (grid — koristi se na naslovnoj za "izdvojeno") ---------- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 26px;
}

.game-card {
  background: linear-gradient(165deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent, var(--blue-soft));
  box-shadow: 0 24px 50px -24px rgba(91, 127, 219, 0.5);
}

.game-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-alt);
}

.game-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.game-card:hover .game-card-media img {
  transform: scale(1.06);
}

.status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.status-badge.released {
  background: #2fbf71;
  color: #062519;
  border: 1px solid rgba(6, 37, 25, 0.25);
}

.status-badge.coming-soon {
  background: rgba(242, 149, 74, 0.18);
  color: var(--orange-soft);
  border: 1px solid rgba(242, 149, 74, 0.35);
}

.game-card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.game-card-body h3 {
  font-size: 1.2rem;
  margin: 0;
}

.game-card-body p {
  font-size: 0.92rem;
  margin: 0;
  flex: 1;
}

.game-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}

.store-icons {
  display: flex;
  gap: 8px;
}

.store-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.store-icon:hover {
  border-color: var(--blue-soft);
  background: rgba(91, 127, 219, 0.15);
  transform: translateY(-2px);
}

.store-icon svg {
  width: 16px;
  height: 16px;
}

.view-all-wrap {
  text-align: center;
  margin-top: 48px;
}

/* ---------- Games listing strana — "jedna ispod druge" ---------- */
.games-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.game-row {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent, var(--blue));
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-row:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -26px rgba(91, 127, 219, 0.5);
}

.game-row-media {
  position: relative;
  min-height: 200px;
  background: var(--bg-alt);
  overflow: hidden;
}

.game-row-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-row-body {
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.game-row-body h3 {
  font-size: 1.35rem;
  margin: 0;
}

.game-row-body p {
  margin: 0;
}

.game-row-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* ---------- Strana pojedinačne igre ---------- */
.game-hero {
  position: relative;
  padding-top: calc(var(--nav-height) + 64px);
  padding-bottom: 64px;
}

.game-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  filter: blur(2px);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent);
  mask-image: linear-gradient(to bottom, black, transparent);
}

.game-hero-content {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: center;
}

.game-hero-content .status-badge {
  position: static;
  display: inline-flex;
  margin-bottom: 14px;
}

.game-hero-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-glow);
}

.game-hero-media img {
  width: 100%;
  height: auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-faint);
  font-size: 0.88rem;
  margin-bottom: 22px;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--blue-soft);
}

.game-hero h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  margin-bottom: 14px;
}

.game-store-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* Zvanični Google Play / App Store bedževi (cele slike, assets/icons/) */
.store-badge-link {
  display: inline-flex;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.store-badge-link:hover {
  transform: translateY(-2px);
  opacity: 0.88;
}

.store-badge-link img {
  height: 54px;
  width: auto;
  display: block;
}

.no-store-note {
  color: var(--text-faint);
  font-size: 0.88rem;
  font-style: italic;
}

.game-description {
  max-width: 760px;
  margin: 0 auto;
  padding-top: 20px;
}

.game-description p {
  font-size: 1.02rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.gallery-grid img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  aspect-ratio: 9 / 16;
  object-fit: cover;
  width: 100%;
}

.not-found {
  text-align: center;
  padding: 160px 0 120px;
}

/* ---------- Contact ---------- */
.contact-page {
  padding-top: calc(var(--nav-height) + 130px);
  padding-bottom: 130px;
}

/* ---------- Legal (privacy / terms) ---------- */
.legal-page {
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 100px;
}

.legal-card {
  max-width: 820px;
  margin: 0 auto;
  background: linear-gradient(165deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 56px);
}

.legal-card h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.3rem);
  margin-bottom: 6px;
}

.legal-updated {
  color: var(--text-faint);
  font-size: 0.85rem;
  margin-bottom: 36px;
}

.legal-card h2 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--blue-soft);
  margin-top: 38px;
}

.legal-card h2:first-of-type {
  margin-top: 0;
}

.legal-card ul {
  margin: 0 0 1em;
  padding-left: 20px;
  list-style: disc;
  color: var(--text-muted);
}

.legal-card li {
  margin-bottom: 6px;
}

.legal-card a {
  color: var(--blue-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- CTA sekcija (dno naslovne) ---------- */
.cta {
  text-align: center;
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 72px 32px;
}

.cta h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.3rem);
  margin-bottom: 14px;
}

.cta p {
  max-width: 480px;
  margin: 0 auto 30px;
}

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

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 36px;
}

.footer-brand p {
  max-width: 320px;
  font-size: 0.9rem;
  margin-top: 12px;
}

.footer-links {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.92rem;
  padding: 5px 0;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--text);
}

.social-row {
  display: flex;
  gap: 10px;
}

.social-row a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.social-row a:hover {
  border-color: var(--blue-soft);
  background: rgba(91, 127, 219, 0.12);
}

.social-row svg {
  width: 16px;
  height: 16px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.45s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.55s; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .game-hero-content {
    grid-template-columns: 1fr;
  }

  .game-row {
    grid-template-columns: 1fr;
  }

  .game-row-media {
    min-height: 180px;
  }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(10, 15, 31, 0.97);
    backdrop-filter: blur(14px);
    padding: 14px 20px 26px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-130%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-links a {
    padding: 12px 14px;
  }

  .nav-toggle {
    display: flex;
  }

  section {
    padding: 76px 0;
  }

  .footer-top {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    justify-content: center;
  }
}
