:root {
  --bg: #0c1416;
  --bg-2: #0f1c20;
  --text: #e5e7eb;
  --muted: #9aa3a9;
  --gold: #caa45f;
  --gold-2: #9a7b45;
  --accent: #36546b;
  --container: 1120px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

.container { width: min(100% - 32px, var(--container)); margin: 0 auto; }

/* Header */
.site-header { 
  position: relative; 
  top: 30px; 
  left: 0; 
  right: 0; 
  width: 100%; 
  z-index: 20; 
  background: transparent; 
  border-bottom: none; 
  display: flex;
  justify-content: center;
}
.header-inner { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  padding: 10px 0; 
  width: 100%;
  max-width: 1200px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-logo { width: 300px;  object-fit: contain; }
.brand-logo{ animation: breathingGlow 3.6s ease-in-out infinite; }
.brand-text { font-family: Cinzel, serif; letter-spacing: 0.08em; font-weight: 800; }
.nav { display: none; }

/* Hero */
.hero { 
  position: relative; 
  min-height: 100vh; 
  align-items: center;
  justify-content: center;
  text-align: center; 
  background: url('/assets/hero-bg.jpg') center/cover no-repeat;
  padding-bottom: 80px;
}
.hero-overlay { position: absolute; inset: 0; z-index: 0; background: radial-gradient(ellipse at center, rgba(0,0,0,.2), rgba(0,0,0,.65) 60%, rgba(0,0,0,.9)); }
.fog-canvas { position:absolute; inset:0; width:100%; height:100%; z-index:0; opacity:.22; pointer-events:none; background: transparent; }
.hero-aurora { position:absolute; inset:0; pointer-events:none; z-index:1; mix-blend-mode: screen; opacity:.0; background: radial-gradient(1200px 600px at 70% 40%, rgba(120,200,255,.18), transparent 60%), radial-gradient(900px 400px at 30% 55%, rgba(120,255,200,.12), transparent 60%); animation: auroraFlash 8s ease-in-out infinite; }
.hero-content { 
  position: relative; 
  z-index: 2; 
  padding: 56px 0; 
  display: grid; 
  gap: 16px; 
  justify-items: center; 
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  margin-top: 80px; /* Logo ile yazıların üst üste binmesini önlemek için */
}
.hero-top-nav { display: flex; gap: 26px; color: #d1c39a; letter-spacing: .18em; font-weight: 700; font-size: 14px; opacity: .9; text-shadow: 0 2px 10px rgba(0,0,0,.7); }
.hero-title { font-family: Cinzel, serif; font-size: clamp(56px, 10vw,64px); margin: 0; letter-spacing: .08em; color: #e7d8b2; text-shadow: 0 8px 28px rgba(0,0,0,.8); }
.hero-title-sub { font-family: Cinzel, serif; font-size: clamp(28px, 5.6vw, 44px); letter-spacing: .4em; color: #e7d8b2; margin-top: -10px; text-shadow: 0 8px 28px rgba(0,0,0,.8); }
.hero-subtitle { margin: 6px auto 18px; max-width: 900px; color: #d6d6d6; opacity: .9; letter-spacing: .12em; font-weight: 600; }
.hero-actions { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.hero-bottom-strip { margin-top: 22px; color: #bfb58f; opacity: .85; letter-spacing: .22em; font-size: 13px; text-shadow: 0 2px 10px rgba(0,0,0,.7); }

/* Store badges under dynasty strip */
.store-badges { 
  display: flex; 
  gap: 24px; 
  margin-top: 14px; 
  align-items: center; 
  justify-content: center; 
  flex-wrap: wrap; 
}
.store-badges img { height: 44px; width: auto; filter: drop-shadow(0 4px 16px rgba(0,0,0,.5)); }
.store-badges a:hover img { transform: translateY(-1px); transition: transform .15s ease; }

.game-icon-container {
  display: flex;
  justify-content: center;
  align-items: center;
}
.game-icon {
  width: 120px !important;
  height: 120px !important;
  border-radius: 20px;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,.6));
  transition: all .3s ease;
  background: rgba(255,255,255,.05);
  padding: 0;
}
.game-icon:hover {
  transform: translateY(-3px) scale(1.05);
  filter: drop-shadow(0 8px 25px rgba(0,0,0,.8));
  border-color: rgba(203,168,99,.3);
  background: rgba(203,168,99,.1);
}

.badges-column {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
}

/* Sections */
.section { padding: 72px 0; background: var(--bg); }
.section-dark { background: linear-gradient(180deg, var(--bg), var(--bg-2)); border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); }
.section-title { font-family: Cinzel, serif; font-size: clamp(28px, 4.2vw, 44px); letter-spacing: .06em; margin: 0 0 18px; color: #e7d8b2; }
.lead { color: var(--muted); font-size: 18px; line-height: 1.7; }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); border-radius: 12px; padding: 18px; }
.card-title { font-family: Cinzel, serif; margin: 0 0 8px; color: #f1e7c8; }

/* Form */
.form { display: grid; gap: 14px; max-width: 560px; }
.form-row { display: grid; gap: 8px; }
.form input, .form textarea { padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.25); color: var(--text); outline: none; }
.form input:focus, .form textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(202,164,95,.15); }
.form textarea { resize: vertical; min-height: 100px; font-family: inherit; }
.error { color: #ffb4b4; min-height: 18px; }
.form-note { color: var(--muted); font-size: 12px; }
#form-status, #contact-form-status { margin-top: 8px; font-weight: 600; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 10px; text-decoration: none; transition: transform .15s ease, filter .15s ease; border: 1px solid transparent; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-lg { padding: 12px 20px; font-size: 16px; }
.btn-gold { background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: #1b1306; border-color: rgba(0,0,0,.25); font-weight: 700; }
.btn-gold:hover { filter: brightness(1.05); }
.btn-ghost { background: rgba(255,255,255,.06); color: var(--text); border-color: rgba(255,255,255,.1); }
.btn-ghost:hover { background: rgba(255,255,255,.09); }
.btn-close { color: var(--text); opacity: 1; }

/* Framed button look (as in poster) */
.btn-frame { position: relative; border-radius: 8px; border: 1px solid rgba(0,0,0,.6); box-shadow: inset 0 0 0 2px rgba(255,255,255,.08), 0 6px 20px rgba(0,0,0,.4); }
.btn-frame::before { content: ""; position: absolute; inset: -6px; border-radius: 12px; border: 2px solid rgba(203, 168, 99, 0.45); pointer-events: none; }

/* Modal (Bootstrap override) */
.modal-backdrop.show { opacity: .8; }
.tunga-modal-content { background: linear-gradient(180deg, rgba(15,22,25,.96), rgba(8,12,14,.96)); border: 1px solid rgba(255,255,255,.08); box-shadow: 0 30px 80px rgba(0,0,0,.7), inset 0 0 0 1px rgba(203,168,99,.25); border-radius: 14px; }
.tunga-modal-content .modal-body { padding-top: 0; }
.modal-logo {  height: 100px; object-fit: contain; display: block; margin: 0 auto 8px; filter: drop-shadow(0 6px 18px rgba(0,0,0,.6)); }
.modal-title { text-align: center; font-family: Cinzel, serif; color: #e7d8b2; margin: 0 0 12px; letter-spacing: .08em; }

/* Story modal specific */
.story-modal-content .lead { color: var(--muted); line-height: 1.7; }
.story-img { max-height: 360px; border-radius: 10px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); }

/* General story modal specific */
.general-story-modal-content {
  max-width: 800px;
  margin: 0 auto;
}

.general-story-content {
  padding: 20px 0;
  color: var(--text);
  line-height: 1.8;
}

.story-main-title {
  font-family: Cinzel, serif;
  font-size: 28px;
  color: #e7d8b2;
  text-align: center;
  margin-bottom: 30px;
  letter-spacing: .08em;
  text-shadow: 0 4px 16px rgba(0,0,0,.6);
}

.story-chapter {
  margin-bottom: 30px;
}

.chapter-title {
  font-family: Cinzel, serif;
  font-size: 20px;
  color: var(--gold);
  margin-bottom: 16px;
  letter-spacing: .06em;
  border-left: 3px solid var(--gold);
  padding-left: 16px;
}

.story-chapter p {
  margin-bottom: 16px;
  font-size: 16px;
  color: #d9c9a1;
}

.story-divider {
  text-align: center;
  font-size: 24px;
  color: var(--gold);
  margin: 30px 0;
  opacity: 0.7;
}

.dynasty-list, .consequence-list, .player-role-list {
  margin: 16px 0;
  padding-left: 20px;
}

.dynasty-list li, .consequence-list li, .player-role-list li {
  margin-bottom: 8px;
  color: #d9c9a1;
  font-size: 15px;
}

.dynasty-list strong {
  color: var(--gold);
  font-weight: 600;
}

.prophecy-quote {
  background: rgba(203,168,99,.1);
  border-left: 4px solid var(--gold);
  padding: 20px;
  margin: 20px 0;
  border-radius: 8px;
  font-style: italic;
  color: #e7d8b2;
  font-size: 16px;
  line-height: 1.7;
}

.final-words {
  text-align: center;
  font-size: 18px;
  color: #e7d8b2;
  font-weight: 600;
  letter-spacing: .04em;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}

/* Story modal embellishments */
.story-modal-content { position: relative; overflow: hidden; }
.story-modal-content::before { content: ""; position: absolute; inset: -25% -25% auto -25%; height: 220px; background: radial-gradient(600px 220px at 20% 0, rgba(203,168,99,.12), transparent 60%); pointer-events:none; }
.story-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(203,168,99,.35), transparent); margin: 10px 0 14px; }
.lore-bullet { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; }
.lore-bullet::before { content: "✦"; color: #caa45f; margin-top: 2px; }

/* Tabs styling */
.tunga-tabs { display:flex; gap:8px; align-items:center; padding:6px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; margin-bottom: 12px; }
.tunga-tabs .nav-link { color: #cbb892; background: rgba(0,0,0,.15); border: 1px solid rgba(255,255,255,.08); border-radius: 8px; padding: 6px 12px; }
.tunga-tabs .nav-link:hover { color:#e7d8b2; }
.tunga-tabs .nav-link.active { color: #1b1306; background: linear-gradient(180deg, var(--gold), var(--gold-2)); border-color: rgba(0,0,0,.25); font-weight: 700; }
.story-tab-content { padding-top: 6px; }

/* Story enhanced labels */
.story-overline { color:#e7d8b2; font-family: Cinzel, serif; letter-spacing:.12em; font-weight:700; margin-bottom:6px; }
.trait-tags { display:flex; flex-wrap:wrap; gap:8px; padding:0; margin:8px 0 0; list-style:none; }
.trait-tags li { padding:4px 10px; border:1px solid rgba(203,168,99,.4); border-radius:999px; color:#d9c9a1; background: rgba(203,168,99,.08); font-size:14px; }
.trait-tags li:hover { background: rgba(203,168,99,.18); transform: scale(1.05); transition: all .2s ease; }

/* Enhanced story panes with dynamic backgrounds */
.story-pane { padding: 12px; border-radius: 12px; transition: background .3s ease; position: relative; }
#hunlar-pane .story-pane { background: linear-gradient(135deg, rgba(180,50,50,.08), rgba(220,120,60,.05)); }
#gokturkler-pane .story-pane { background: linear-gradient(135deg, rgba(60,120,180,.08), rgba(100,140,160,.05)); }
#selcuklular-pane .story-pane { background: linear-gradient(135deg, rgba(180,140,60,.08), rgba(120,160,80,.05)); }

/* Floating character images */
.story-img { animation: floating 6s ease-in-out infinite; }
@keyframes floating {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

/* Tab switching animation enhancement */
.tab-pane { opacity: 0; transform: translateX(12px); transition: opacity .4s ease, transform .4s ease; }
.tab-pane.show.active { opacity: 1; transform: translateX(0); }

/* Dynasty symbols */
.dynasty-symbol { position: absolute; top: 12px; right: 12px; font-size: 24px; opacity: .3; animation: symbolPulse 4s ease-in-out infinite; }
@keyframes symbolPulse {
  0%, 100% { opacity: .3; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.1); }
}

/* Game features showcase */
.game-features { margin: 16px 0; display: flex; flex-direction: row; gap: 8px; }
.feature-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: rgba(203,168,99,.08); border-radius: 6px; border-left: 3px solid var(--gold); }
.feature-icon { font-size: 18px; }
.feature-text { font-size: 14px; color: #e7d8b2; font-weight: 500; }

/* Enhanced story content */
.story-pane .lead { font-size: 16px; line-height: 1.6; color: #d9c9a1; margin-bottom: 12px; }
.story-overline { font-size: 18px; margin-bottom: 8px; }
.trait-tags li { font-weight: 500; transition: all .3s ease; }
.trait-tags li:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(203,168,99,.2); }

/* Dynasty action buttons */
.dynasty-action { margin-top: 16px; text-align: center; }
.dynasty-action .btn { padding: 8px 20px; font-weight: 600; letter-spacing: .5px; }
.action-note { display: block; margin-top: 6px; color: #a8a8a8; font-size: 12px; }

/* New Story Layout */
.story-hero-section { 
  position: relative; 
  margin: -20px -20px 20px -20px; 
  padding: 30px 20px; 
  background: linear-gradient(135deg, rgba(203,168,99,.1), rgba(0,0,0,.3)); 
  border-radius: 14px 14px 0 0; 
  text-align: center; 
  overflow: hidden; 
}

.story-hero-bg { 
  position: absolute; 
  inset: 0; 
  background: radial-gradient(ellipse at center, rgba(203,168,99,.05) 0%, transparent 70%); 
  pointer-events: none; 
}

.story-hero-title { 
  color: var(--gold); 
  font-size: 24px; 
  font-weight: 700; 
  margin-bottom: 8px; 
  position: relative; 
  z-index: 1; 
}

.story-hero-subtitle { 
  color: #d9c9a1; 
  font-size: 16px; 
  opacity: .8; 
  position: relative; 
  z-index: 1; 
}

.story-layout { 
  display: grid; 
  grid-template-columns: 1fr 1.5fr; 
  gap: 30px; 
  align-items: start; 
}

.story-visual-section { 
  text-align: center; 
}

.character-container { 
  position: relative; 
  margin-bottom: 20px; 
}

.story-character { 
  width: 100%; 
  max-width: 300px; 
  height: auto; 
  border-radius: 12px; 
  animation: floating 6s ease-in-out infinite; 
}

.character-glow { 
  position: absolute; 
  inset: -10px; 
  background: radial-gradient(ellipse at center, rgba(203,168,99,.2) 0%, transparent 70%); 
  border-radius: 16px; 
  z-index: -1; 
  animation: breathingGlow 4s ease-in-out infinite alternate; 
}

.dynasty-stats { 
  display: flex; 
  flex-direction: column; 
  gap: 12px; 
  margin-top: 20px; 
}

.stat-item { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
}

.stat-label { 
  min-width: 80px; 
  color: #e7d8b2; 
  font-weight: 600; 
  font-size: 14px; 
}

.stat-bar { 
  flex: 1; 
  height: 8px; 
  background: rgba(255,255,255,.1); 
  border-radius: 4px; 
  overflow: hidden; 
}

.stat-fill { 
  height: 100%; 
  background: linear-gradient(90deg, var(--gold), var(--gold-2)); 
  border-radius: 4px; 
  transition: width .8s ease; 
}

.story-content-section { 
  padding: 20px; 
  background: rgba(0,0,0,.2); 
  border-radius: 12px; 
  border-left: 4px solid var(--gold); 
}

.dynasty-header { 
  margin-bottom: 20px; 
}

.dynasty-title { 
  color: var(--gold); 
  font-size: 28px; 
  font-weight: 700; 
  margin-bottom: 4px; 
}

.dynasty-subtitle { 
  color: #d9c9a1; 
  font-size: 16px; 
  opacity: .8; 
}

.dynasty-description { 
  margin-bottom: 24px; 
}

.dynasty-description p { 
  color: #d9c9a1; 
  font-size: 16px; 
  line-height: 1.6; 
  margin: 0; 
}

.dynasty-abilities h5 { 
  color: var(--gold); 
  font-size: 18px; 
  font-weight: 600; 
  margin-bottom: 16px; 
}

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

.ability-item { 
  padding: 12px; 
  background: rgba(203,168,99,.08); 
  border-radius: 8px; 
  border: 1px solid rgba(203,168,99,.2); 
  transition: all .3s ease; 
}

.ability-item:hover { 
  background: rgba(203,168,99,.15); 
  transform: translateY(-2px); 
  box-shadow: 0 4px 12px rgba(203,168,99,.2); 
}

.ability-icon { 
  color: var(--gold); 
  font-weight: 600; 
  font-size: 14px; 
  margin-bottom: 4px; 
}

.ability-desc { 
  color: #d9c9a1; 
  font-size: 12px; 
  opacity: .8; 
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .story-layout { 
    grid-template-columns: 1fr; 
    gap: 20px; 
  }
  
  .story-hero-title { 
    font-size: 20px; 
  }
  
  .dynasty-title { 
    font-size: 24px; 
  }
  
  .ability-grid { 
    grid-template-columns: 1fr; 
  }

  .general-story-content {
    padding: 15px 0;
  }

  .story-main-title {
    font-size: 24px;
    margin-bottom: 25px;
  }

  .chapter-title {
    font-size: 18px;
    margin-bottom: 14px;
  }

  .story-chapter p {
    font-size: 15px;
  }

  .prophecy-quote {
    padding: 16px;
    font-size: 15px;
  }
}

.site-footer { 
  position: fixed; 
  left: 0; 
  right: 0; 
  bottom: 0; 
  border-top: 1px solid rgba(255,255,255,.08); 
  background: rgba(11,17,19,.95); 
  backdrop-filter: blur(8px);
  z-index: 100;
}
.footer-inner { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 14px; 
  padding: 18px 0; 
}
.socials { 
  display: flex; 
  gap: 12px; 
  align-items: center;
}
.social { 
  display: inline-flex; 
  color: #9aa3a9; 
  opacity: 0.9; 
  transition: all .3s ease;
  padding: 6px;
  border-radius: 6px;
}
.social:hover { 
  opacity: 1; 
  color: #9aa3a9; 
  transform: translateY(-1px);
  background: rgba(154,163,169,.1);
}

@media (max-width: 640px) {
  .site-header { 
    top: 20px; 
    display: flex;
    justify-content: center;
  }
  .header-inner { 
    gap: 12px; 
    width: 100%;
    max-width: 100%;
  }
  .brand-text { display: none; }
  .hero-content { 
    width: 100%;
    max-width: 100%;
    padding: 40px 20px;
    margin-top: 60px; /* Mobilde daha az margin */
  }
  .hero-title { 
    font-size: clamp(42px, 12vw, 56px); 
    letter-spacing: .04em;
  }
  .hero-title-sub { 
    font-size: clamp(20px, 6vw, 28px); 
    letter-spacing: .2em;
  }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-top-nav { display: none; }
  .store-badges { 
    flex-direction: column; 
    align-items: center; 
    gap: 20px;
  }
  .game-icon { 
    width: 100px !important; 
    height: 100px !important; 
    border-radius: 18px; 
  }
  .badges-column { 
    flex-direction: column;
    gap: 10px; 
    align-items: center; 
  }
  .footer-inner { 
    flex-direction: column; 
    text-align: center; 
    gap: 16px; 
    padding: 20px 0;
  }
  .socials { 
    justify-content: center; 
    gap: 16px;
  }
  .hero { padding-bottom: 100px; }
}

@media (max-width: 480px) {
  .site-header { 
    top: 15px; 
    display: flex;
    justify-content: center;
  }
  .hero-title { 
    font-size: clamp(42px, 12vw, 56px); 
    letter-spacing: .02em;
  }
  .hero-title-sub { 
    font-size: clamp(20px, 6vw, 28px); 
    letter-spacing: .1em;
  }
  .hero-subtitle { font-size: 14px; }
  .hero-content { 
    width: 100%;
    max-width: 100%;
    padding: 30px 15px;
    margin-top: 50px; /* Çok küçük ekranlarda daha da az margin */
  }
  .hero-actions .btn { width: 100%; max-width: 280px; }
  .store-badges { 
    flex-direction: column; 
    align-items: center; 
    gap: 16px;
  }
  .game-icon { 
    width: 80px !important; 
    height: 80px !important; 
    border-radius: 16px; 
  }
  .badges-column { 
    flex-direction: column;
    gap: 8px; 
    align-items: center; 
  }
  .modal-dialog { margin: 16px; }
  .story-layout { grid-template-columns: 1fr; gap: 20px; }
  .dynasty-stats { grid-template-columns: 1fr; }
  .footer-inner { padding: 24px 0; }
  .socials { gap: 18px; }
  .hero { padding-bottom: 120px; }
}

@media (prefers-reduced-motion: reduce){
  .hero-aurora, .brand-logo{ animation: none !important }
}

/* Aurora/random flash */
@keyframes auroraFlash {
  0%, 15% { opacity:.0 }
  16% { opacity:.22 }
  20% { opacity:.06 }
  30% { opacity:.18 }
  55% { opacity:.08 }
  70% { opacity:.16 }
  100%{ opacity:.0 }
}

/* Breathing glow for logo */
@keyframes breathingGlow {
  0% { filter: drop-shadow(0 0 0 rgba(202,164,95,0)); }
  50% { filter: drop-shadow(0 0 16px rgba(202,164,95,.35)); }
  100% { filter: drop-shadow(0 0 0 rgba(202,164,95,0)); }
}


