@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@500;700;800;900&display=swap');

:root {
  --navy-deep: #09152e;
  --navy-dark: #0f234c;
  --navy-panel: #183672;
  --navy-light: #2555ad;
  --panel-edge: #071126;
  --gold: #f7c844;
  --gold-bright: #ffe680;
  --gold-deep: #c98812;
  --purple-royal: #6e35c7;
  --green-top: #50d848;
  --green-bot: #219622;
  --blue-top: #4495f5;
  --blue-bot: #1f5ec4;
  --red-top: #f24c4c;
  --red-bot: #a81c1c;
  --text-main: #ffffff;
  --text-muted: #bdd2f7;
  --shadow-heavy: 0 12px 28px rgba(0, 0, 0, 0.55);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--navy-deep);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(56, 126, 242, 0.38) 0%, transparent 58%),
    radial-gradient(circle at 85% 35%, rgba(124, 58, 237, 0.22) 0%, transparent 45%),
    linear-gradient(180deg, #102757 0%, #09152e 55%, #060e20 100%);
  color: var(--text-main);
  min-block-size: 100dvh;
  line-height: 1.55;
  overflow-x: clip;
}

img {
  display: block;
  max-inline-size: 100%;
  block-size: auto;
}

/* Top Navigation Bar */
.topbar {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  background: rgba(9, 21, 46, 0.88);
  backdrop-filter: blur(12px);
  border-block-end: 3px solid rgba(247, 200, 68, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.topbar-inner {
  max-inline-size: 1180px;
  margin-inline: auto;
  padding-block: 10px;
  padding-inline: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: safe center;
  gap: 14px;
}

.brand-link {
  display: flex;
  align-items: safe center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  inline-size: 46px;
  block-size: 46px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 2.5px solid var(--gold);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.brand-title {
  font-weight: 900;
  font-size: clamp(1.05rem, 0.9rem + 0.6vw, 1.35rem);
  color: var(--gold);
  letter-spacing: 0.03em;
  text-shadow: 0 2px 0 #000, 0 3px 6px rgba(0, 0, 0, 0.65);
}

.nav-links {
  margin-inline-start: auto;
  display: flex;
  flex-wrap: wrap;
  flex-wrap: balance;
  align-items: safe center;
  gap: 10px;
}

.nav-pill {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.92rem;
  padding-block: 7px;
  padding-inline: 13px;
  border-radius: 10px;
  background: rgba(24, 54, 114, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.nav-pill:hover,
.nav-pill.active {
  color: var(--gold-bright);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.lang-toggle {
  display: inline-flex;
  border-radius: 10px;
  overflow: clip;
  border: 2px solid var(--gold);
  background: var(--navy-dark);
}

.lang-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.82rem;
  padding-block: 6px;
  padding-inline: 10px;
  cursor: pointer;
}

.lang-btn.active {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #1a1200;
}

/* Main Container */
.page-shell {
  max-inline-size: 1180px;
  margin-inline: auto;
  padding-block: 28px 64px;
  padding-inline: 20px;
}

/* Hero Section */
.hero {
  position: relative;
  background:
    radial-gradient(circle at 72% 45%, rgba(247, 200, 68, 0.22) 0%, transparent 52%),
    linear-gradient(165deg, #214b9c 0%, #142e66 55%, #0d1f47 100%);
  border: 3px solid var(--gold);
  border-radius: 28px;
  padding: clamp(24px, 4vw, 44px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.28),
    0 14px 0 #071126,
    0 22px 42px rgba(0, 0, 0, 0.65);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  align-items: center;
  gap: 32px;
  margin-block-end: 48px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.hero-logo {
  inline-size: min(100%, 360px);
  aspect-ratio: 509 / 243;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.6));
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.resource-pill {
  display: inline-flex;
  align-items: safe center;
  gap: 7px;
  background: rgba(8, 19, 43, 0.78);
  border: 2px solid rgba(247, 200, 68, 0.55);
  border-radius: 999px;
  padding-block: 5px;
  padding-inline: 12px;
  font-weight: 800;
  font-size: 0.86rem;
  color: var(--gold-bright);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.resource-pill img {
  inline-size: 20px;
  block-size: 20px;
  aspect-ratio: 1 / 1;
}

.hero-headline {
  font-size: clamp(1.65rem, 1.2rem + 2vw, 2.55rem);
  font-weight: 900;
  line-height: 1.15;
  color: #ffffff;
  text-shadow: 0 3px 0 #071126, 0 6px 14px rgba(0, 0, 0, 0.55);
}

.hero-lead {
  font-size: clamp(1rem, 0.94rem + 0.35vw, 1.15rem);
  color: var(--text-muted);
  max-inline-size: 56ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-block-start: 6px;
}

/* Clash Royale Chunky 3D Buttons */
.chunky-btn {
  display: inline-flex;
  align-items: safe center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-family: inherit;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: #ffffff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.65);
  padding-block: 13px;
  padding-inline: 22px;
  border-radius: 16px;
  border: 2.5px solid #071126;
  cursor: pointer;
  position: relative;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.chunky-btn.green {
  background: linear-gradient(180deg, var(--green-top) 0%, var(--green-bot) 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.42), 0 6px 0 #115712, 0 10px 18px rgba(0, 0, 0, 0.45);
}

.chunky-btn.blue {
  background: linear-gradient(180deg, var(--blue-top) 0%, var(--blue-bot) 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.42), 0 6px 0 #103578, 0 10px 18px rgba(0, 0, 0, 0.45);
}

.chunky-btn.gold {
  background: linear-gradient(180deg, #ffe26a 0%, #dca41c 55%, #b8780a 100%);
  color: #211300;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.6), 0 6px 0 #6e4402, 0 10px 18px rgba(0, 0, 0, 0.45);
}

.chunky-btn.red {
  background: linear-gradient(180deg, var(--red-top) 0%, var(--red-bot) 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.38), 0 6px 0 #5e0d0d, 0 10px 18px rgba(0, 0, 0, 0.45);
}

.chunky-btn:hover {
  filter: brightness(1.07);
  transform: translateY(-2px);
}

.chunky-btn:active {
  transform: translateY(3px);
}

/* Hero Visual Showcase */
.hero-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-block-size: 340px;
}

.hero-castle {
  inline-size: min(100%, 420px);
  aspect-ratio: 1 / 1;
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.65));
  animation: floatIsland 4.5s ease-in-out infinite;
}

.hero-king-overlay {
  position: absolute;
  inset-block-end: -10px;
  inset-inline-end: 4%;
  inline-size: clamp(135px, 34%, 195px);
  aspect-ratio: 328 / 360;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.75));
}

.hero-chest-overlay {
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 4%;
  inline-size: clamp(96px, 24%, 135px);
  aspect-ratio: 1 / 1;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.75));
}

@keyframes floatIsland {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Ribbon Section Titles */
.section-header {
  text-align: center;
  margin-block: 44px 24px;
}

.ribbon-title {
  display: inline-block;
  background: linear-gradient(180deg, #f7c844 0%, #c98812 100%);
  color: #1d1100;
  font-weight: 900;
  font-size: clamp(1.2rem, 1rem + 1vw, 1.65rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-block: 9px;
  padding-inline: 28px;
  border-radius: 14px;
  border: 3px solid #071126;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.65), 0 6px 0 #071126, 0 10px 22px rgba(0, 0, 0, 0.55);
}

.section-sub {
  color: var(--text-muted);
  margin-block-start: 12px;
  font-size: 1.02rem;
  max-inline-size: 64ch;
  margin-inline: auto;
}

/* 3D Character Roster Cards Grid */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 18px;
}

.unit-card {
  container: unitcard / inline-size;
  background: linear-gradient(180deg, #2756b3 0%, #15316b 65%, #0e214a 100%);
  border: 3px solid var(--gold);
  border-radius: 20px;
  padding: 14px 12px 16px;
  text-align: center;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.28), 0 8px 0 #071126, 0 14px 24px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.unit-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-bright);
}

.unit-portrait-wrap {
  inline-size: 100%;
  aspect-ratio: 328 / 360;
  background: radial-gradient(circle at 50% 60%, rgba(255, 224, 112, 0.28), rgba(9, 21, 46, 0.65) 75%);
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: end center;
  overflow: clip;
  margin-block-end: 10px;
}

.unit-portrait-wrap img {
  inline-size: 92%;
  aspect-ratio: 328 / 360;
  object-fit: contain;
}

.unit-tier-badge {
  display: inline-block;
  background: linear-gradient(180deg, #9d4edd, #5a189a);
  border: 1.5px solid var(--gold);
  color: #fff;
  font-weight: 800;
  font-size: 0.74rem;
  padding: 2px 9px;
  border-radius: 999px;
  margin-block-end: 6px;
}

.unit-name {
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
}

.unit-role {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-block-start: 3px;
}

/* Feature Panels */
.feature-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
  gap: 22px;
  margin-block-start: 28px;
}

.game-panel {
  background: linear-gradient(180deg, #1d428a 0%, #122a5c 100%);
  border: 3px solid var(--gold);
  border-radius: 22px;
  padding: 24px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.22), 0 9px 0 #071126, 0 16px 28px rgba(0, 0, 0, 0.5);
}

.game-panel h2,
.game-panel h3 {
  color: var(--gold);
  font-weight: 900;
  margin-block-end: 10px;
  text-shadow: 0 2px 0 #071126;
}

.game-panel p,
.game-panel li {
  color: var(--text-muted);
  font-size: 0.96rem;
}

.game-panel ul,
.game-panel ol {
  padding-inline-start: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-block: 10px;
}

.panel-art {
  inline-size: 120px;
  block-size: 120px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin-inline: auto;
  margin-block-end: 14px;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55));
}

/* Legal & Support Forms */
.legal-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-inline-size: 860px;
  margin-inline: auto;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-block: 12px 16px;
}

.form-field label {
  font-weight: 800;
  color: var(--gold-bright);
  font-size: 0.92rem;
}

.form-input {
  inline-size: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  border: 2.5px solid #3563b8;
  background: #0a1836;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
}

.form-input:focus {
  outline: none;
  border-color: var(--gold);
}

code {
  background: rgba(7, 17, 38, 0.75);
  color: var(--gold-bright);
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 700;
}

/* Footer */
.site-footer {
  margin-block-start: 64px;
  padding-block: 32px;
  border-block-start: 3px solid rgba(247, 200, 68, 0.28);
  background: rgba(6, 14, 32, 0.85);
  text-align: center;
}

.footer-inner {
  max-inline-size: 1180px;
  margin-inline: auto;
  padding-inline: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  flex-wrap: balance;
  justify-content: center;
  gap: 16px;
}

.footer-links a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
}

.footer-links a:hover {
  text-decoration: underline;
  color: var(--gold-bright);
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.86rem;
}

[data-lang-content="en"] {
  display: none;
}

body.lang-en [data-lang-content="tr"] {
  display: none;
}

body.lang-en [data-lang-content="en"] {
  display: block;
}

span[data-lang-content="en"] {
  display: none;
}

body.lang-en span[data-lang-content="tr"] {
  display: none;
}

body.lang-en span[data-lang-content="en"] {
  display: inline;
}
