/* features.css — açılış kalkanı, yetenekler, diplomasi, fetih efektleri, ödüller, maç özeti */

/* ── Açılış kalkanı (ülke kartı) ─────────────────────────────────────────── */
.g-shield {
  display: flex; align-items: center; gap: 6px; margin: 8px 0 2px; padding: 6px 9px;
  border-radius: 8px; background: rgba(61, 245, 255, 0.1); border: 1px solid rgba(61, 245, 255, 0.35);
  color: #7CF7FF; font-size: 0.8rem;
}
.g-shield[hidden] { display: none; }
.g-shield b { color: #fff; }

/* ── Yetenekler (saldırı gücü panelinin üstünde) ─────────────────────────── */
.g-abilities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: -2px 0 12px; }
.g-ab {
  --cd: 0deg;
  position: relative; display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 7px;
  padding: 7px 9px; border-radius: 10px; overflow: hidden; cursor: pointer;
  border: 1px solid var(--g-line); background: rgba(234, 240, 247, 0.05); color: var(--g-ink);
  font: 600 0.82rem var(--g-body); text-align: left; transition: border-color .2s, background .2s, transform .12s;
}
.g-ab:hover { border-color: rgba(234, 240, 247, 0.35); }
.g-ab:active { transform: scale(0.97); }
.g-ab img { width: 26px; height: 26px; object-fit: contain; position: relative; z-index: 1; }
.g-ab-name { position: relative; z-index: 1; }
.g-ab kbd { position: relative; z-index: 1; font: 700 0.68rem ui-monospace, monospace; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--g-line); color: var(--g-muted); }
.g-ab-cd { position: absolute; inset: 0; pointer-events: none; background: conic-gradient(rgba(3, 8, 18, 0.72) var(--cd), transparent 0); }
.g-ab-time { position: absolute; right: 8px; top: 2px; z-index: 2; font: 800 0.72rem var(--g-cond); color: #fff; font-style: normal; }
.g-ab.is-cd { color: var(--g-muted); }
.g-ab.is-cd img { filter: grayscale(0.8) brightness(0.7); }
.g-ab.is-active { border-color: #FFC24B; background: rgba(255, 194, 75, 0.14); box-shadow: 0 0 18px rgba(255, 194, 75, 0.35); }
.g-ab.is-active .g-ab-cd { background: conic-gradient(rgba(255, 194, 75, 0.25) var(--cd), transparent 0); }
.g-ab[data-ab="drop"].is-active { border-color: #7CF7FF; background: rgba(124, 247, 255, 0.14); box-shadow: 0 0 18px rgba(124, 247, 255, 0.35); animation: g-ab-pulse 1s infinite; }
@keyframes g-ab-pulse { 50% { box-shadow: 0 0 4px rgba(124, 247, 255, 0.2); } }

/* ── Diplomasi menüsü ────────────────────────────────────────────────────── */
.g-diplo { position: fixed; z-index: 60; width: 236px; padding: 10px; display: grid; gap: 6px; border-radius: 12px; }
.g-diplo[hidden] { display: none; }
.g-diplo header { display: flex; align-items: center; gap: 7px; }
.g-diplo header i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.g-diplo header b { font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-diplo header em { margin-left: auto; font: 700 0.68rem var(--g-body); font-style: normal; padding: 2px 6px; border-radius: 999px; background: rgba(234, 240, 247, 0.1); color: var(--g-muted); }
.g-diplo header em.is-king { background: rgba(255, 194, 75, 0.18); color: #FFC24B; }
.g-diplo p { margin: 0 0 2px; font-size: 0.78rem; color: var(--g-muted); }
.g-diplo button {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--g-line); background: rgba(234, 240, 247, 0.05);
  color: var(--g-ink); font: 600 0.84rem var(--g-body); cursor: pointer; text-align: left;
}
.g-diplo button:hover { background: rgba(234, 240, 247, 0.12); }
.g-diplo button small { font-weight: 500; color: var(--g-muted); font-size: 0.72rem; }
.g-diplo button.is-bad { border-color: rgba(255, 90, 106, 0.5); color: #FF8C98; }

/* Barış teklifi bildirimi */
.g-offer { flex-wrap: wrap; }
.g-offer-btns { display: flex; gap: 6px; width: 100%; margin-top: 6px; }
.g-offer-btns button { flex: 1; padding: 6px; border-radius: 7px; border: 1px solid var(--g-line); background: rgba(234, 240, 247, 0.08); color: var(--g-ink); font: 600 0.8rem var(--g-body); cursor: pointer; pointer-events: auto; }
.g-offer-btns button[data-ok] { background: rgba(61, 220, 132, 0.2); border-color: rgba(61, 220, 132, 0.5); }

/* ── Büyük duyuru bandı ─────────────────────────────────────────────────── */
.fx-banner {
  position: fixed; left: 50%; top: 92px; z-index: 40; pointer-events: none;
  transform: translate(-50%, -12px) scale(0.9); opacity: 0;
  display: grid; justify-items: center; gap: 2px; padding: 10px 28px 12px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(10, 18, 34, 0.92), rgba(10, 18, 34, 0.78));
  border: 1px solid rgba(255, 194, 75, 0.55); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  transition: opacity .25s, transform .35s cubic-bezier(.2, 1.4, .4, 1);
  text-align: center; max-width: min(640px, 90vw);
}
.fx-banner.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.fx-banner b { font: 900 clamp(1.4rem, 3vw, 2.2rem)/1.05 var(--g-cond, sans-serif); letter-spacing: .02em; text-transform: uppercase; color: #FFE7A3; text-shadow: 0 0 18px rgba(255, 194, 75, .55); }
.fx-banner span { font: 500 0.88rem var(--g-body, sans-serif); color: #C9D3E2; }
.fx-banner.is-red { border-color: rgba(255, 90, 106, 0.7); }
.fx-banner.is-red b { color: #FF8C98; text-shadow: 0 0 18px rgba(255, 90, 106, .6); }
.fx-banner.is-cyan { border-color: rgba(61, 245, 255, 0.6); }
.fx-banner.is-cyan b { color: #9BF9FF; text-shadow: 0 0 18px rgba(61, 245, 255, .55); }

/* ── Tehlike kenarlığı ──────────────────────────────────────────────────── */
.fx-danger { position: fixed; inset: 0; z-index: 5; pointer-events: none; opacity: 0; transition: opacity .4s;
  box-shadow: inset 0 0 90px 10px rgba(255, 40, 60, 0.55); }
.fx-danger[data-level="1"] { opacity: 0.45; animation: fx-danger 1.6s ease-in-out infinite; }
.fx-danger[data-level="2"] { opacity: 0.9; animation: fx-danger 0.9s ease-in-out infinite; }
@keyframes fx-danger { 50% { box-shadow: inset 0 0 50px 4px rgba(255, 40, 60, 0.3); } }
@media (prefers-reduced-motion: reduce) { .fx-danger { animation: none !important; } }

/* ── Maç sonu ödülleri ──────────────────────────────────────────────────── */
.g-awards { width: 100%; margin: 6px 0 12px; display: grid; gap: 10px; text-align: left; }
.g-awards h3 { margin: 0; font: 800 0.95rem var(--g-body); color: #FFE7A3; display: flex; justify-content: space-between; }
.g-awards h3 small { color: #3DDC84; font-weight: 700; }
.g-award-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 210px; overflow: auto; }
.g-award-list li { display: grid; grid-template-columns: 38px 1fr; column-gap: 8px; align-items: center; padding: 7px 8px; border-radius: 10px; background: rgba(255, 194, 75, 0.08); border: 1px solid rgba(255, 194, 75, 0.25); animation: g-award-in .45s both; }
.g-award-list li:nth-child(2) { animation-delay: .08s } .g-award-list li:nth-child(3) { animation-delay: .16s } .g-award-list li:nth-child(4) { animation-delay: .24s } .g-award-list li:nth-child(5) { animation-delay: .32s }
@keyframes g-award-in { from { opacity: 0; transform: translateY(6px) scale(.96); } }
.g-award-list img { grid-row: 1 / 3; width: 38px; height: 38px; object-fit: contain; }
.g-award-list b { font-size: 0.85rem; }
.g-award-list span { font-size: 0.72rem; color: #9DA9BC; line-height: 1.25; }
.g-sum { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.g-sum div { padding: 6px 8px; border-radius: 8px; background: rgba(234, 240, 247, 0.05); }
.g-sum dt { font-size: 0.68rem; color: #8C99AE; }
.g-sum dd { margin: 0; font: 800 1rem var(--g-cond, sans-serif); color: #EAF0F7; }
.g-replay-btn { justify-self: center; padding: 9px 18px; border-radius: 999px; border: 1px solid rgba(61, 245, 255, .5); background: rgba(61, 245, 255, .12); color: #9BF9FF; font: 700 0.9rem var(--g-body); cursor: pointer; }
.g-replay-btn:hover { background: rgba(61, 245, 255, .22); }
#match-end .g-over, #game-over .g-over { max-height: 92vh; overflow: auto; }

/* ── Maç özeti penceresi ─────────────────────────────────────────────────── */
.g-replay { position: fixed; inset: 0; margin: auto; height: fit-content; max-height: 94vh; width: min(1000px, 94vw); padding: 0; border: 1px solid rgba(234, 240, 247, 0.15); border-radius: 16px; background: #071022; color: #EAF0F7; overflow: hidden; }
.g-replay::backdrop { background: rgba(0, 0, 0, 0.7); }
.g-replay header, .g-replay footer { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.g-replay header b { font: 800 1.05rem var(--g-body); }
.g-replay header button { margin-left: auto; width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(234,240,247,.15); background: transparent; color: inherit; font-size: 1.2rem; cursor: pointer; }
.g-replay canvas { display: block; width: 100%; height: auto; background: #030A1A; }
.g-replay footer button { padding: 8px 14px; border-radius: 9px; border: 1px solid rgba(234,240,247,.15); background: rgba(234,240,247,.06); color: inherit; font: 600 0.88rem var(--g-body); cursor: pointer; }
.g-replay footer button.is-primary { background: #00D0FF; color: #03131F; border-color: transparent; }
.g-replay footer button:disabled { opacity: .5; cursor: wait; }
.g-replay footer span { font-size: 0.82rem; color: #8C99AE; }
.g-ally { font: 800 0.62rem var(--g-body); font-style: normal; padding: 1px 5px; border-radius: 999px; background: rgba(61, 220, 132, 0.2); color: #7CFFB2; vertical-align: 1px; }

/* ── Şehir / liman sayacı (ülke kartı) ───────────────────────────────────── */
.g-hold { margin-top: 10px; padding: 8px 10px; border-radius: 9px; background: rgba(124, 247, 255, 0.07); border: 1px solid rgba(124, 247, 255, 0.22); display: grid; gap: 4px; }
.g-hold-n { display: flex; gap: 14px; font-size: 0.82rem; color: #C9D3E2; }
.g-hold-n span { display: inline-flex; align-items: center; gap: 5px; }
.g-hold-n svg { color: #7CF7FF; }
.g-hold-n b { font: 900 1.05rem var(--g-cond); color: #fff; }
.g-hold-p { font-size: 0.76rem; color: #9DA9BC; }
.g-hold-p b { color: #3DDC84; }
.g-hold.is-empty { background: rgba(234, 240, 247, 0.04); border-color: var(--g-line); }
.g-hold.is-empty .g-hold-n svg { color: var(--g-muted); }

/* ── Dünya olayları ──────────────────────────────────────────────────────── */
.g-event { margin-top: 10px; padding: 8px 10px; border-radius: 9px; background: rgba(255, 194, 75, 0.1); border: 1px solid rgba(255, 194, 75, 0.4);
  display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; animation: g-ev-in .4s both; }
.g-event[hidden] { display: none; }
.g-event b { font: 800 0.86rem var(--g-body); color: #FFD54F; }
.g-event span { font: 900 0.95rem var(--g-cond); color: #fff; }
.g-event small { grid-column: 1 / -1; font-size: 0.72rem; color: #C9D3E2; }
@keyframes g-ev-in { from { opacity: 0; transform: translateY(-4px); } }
.fx-storm { position: fixed; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity 1.2s;
  background:
    repeating-linear-gradient(105deg, rgba(180, 220, 255, 0.10) 0 1px, transparent 1px 22px),
    radial-gradient(ellipse at center, transparent 40%, rgba(10, 30, 60, 0.45));
  background-size: 220px 220px, 100% 100%;
  animation: fx-rain .5s linear infinite; }
.fx-storm.is-on { opacity: 1; }
@keyframes fx-rain { to { background-position: -60px 220px, 0 0; } }
@media (prefers-reduced-motion: reduce) { .fx-storm { animation: none; } }

/* ── İlk maç rehberi ─────────────────────────────────────────────────────── */
.g-tut { position: fixed; left: 16px; top: 50%; transform: translateY(-50%); z-index: 35; width: 300px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid rgba(61, 245, 255, 0.45); box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(61, 245, 255, 0.08); }
.g-tut.is-pop { animation: g-tut-pop .4s cubic-bezier(.2, 1.4, .4, 1); }
.g-tut.is-out { opacity: 0; transition: opacity .3s; }
@keyframes g-tut-pop { from { opacity: 0; transform: translateY(-50%) translateX(-10px) scale(.97); } }
.g-tut header { display: flex; align-items: center; justify-content: space-between; }
.g-tut-n { font: 700 0.7rem var(--g-body); letter-spacing: .08em; text-transform: uppercase; color: #7CF7FF; }
.g-tut header button { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--g-line); background: transparent; color: var(--g-muted); cursor: pointer; font-size: 1rem; }
.g-tut h4 { margin: 6px 0 4px; font: 900 1.25rem var(--g-cond); letter-spacing: .02em; color: #fff; }
.g-tut p { margin: 0; font-size: 0.86rem; line-height: 1.45; color: #C9D3E2; }
.g-tut p b { color: #fff; }
.g-tut kbd { font: 700 0.72rem ui-monospace, monospace; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--g-line); color: #fff; }
.g-tut-bar { height: 3px; border-radius: 2px; background: rgba(234, 240, 247, 0.1); margin: 10px 0 8px; overflow: hidden; }
.g-tut-bar i { display: block; height: 100%; background: #3DF5FF; transition: width .4s; }
.g-tut footer { display: flex; justify-content: flex-end; }
.g-tut footer button { padding: 6px 14px; border-radius: 8px; border: 1px solid var(--g-line); background: rgba(234, 240, 247, 0.06); color: var(--g-ink); font: 600 0.82rem var(--g-body); cursor: pointer; }
.g-tut footer button.is-primary { background: #00D0FF; color: #03131F; border-color: transparent; }
.tut-glow { position: relative; outline: 2px solid #3DF5FF; outline-offset: 3px; border-radius: 10px; animation: tut-glow 1.2s ease-in-out infinite; }
@keyframes tut-glow { 50% { outline-color: rgba(61, 245, 255, 0.25); box-shadow: 0 0 22px rgba(61, 245, 255, 0.35); } }

/* ── Telefon ve dar ekran ────────────────────────────────────────────────── */
@media (max-width: 760px), (pointer: coarse) and (max-height: 520px) {
  .g-card { top: 8px; left: 8px; width: 170px; padding: 9px 10px; }
  .g-card-head { font-size: 0.8rem; }
  #hud-troops { font-size: 1.7rem; }
  .g-rate { font-size: 0.75rem; }
  .g-shield { font-size: 0.68rem; padding: 4px 6px; margin-top: 5px; }
  .g-hold { margin-top: 6px; padding: 5px 7px; }
  .g-hold-n { gap: 8px; font-size: 0.72rem; }
  .g-hold-p { font-size: 0.66rem; }
  .g-attacks:not(:empty) { margin-top: 6px; padding-top: 6px; }
  .g-attack { font-size: 0.72rem; }

  .g-board { top: 8px; right: 8px; width: 150px; padding: 4px 4px 0; }
  .g-board-title { font-size: 1rem; }
  .g-row { font-size: 0.7rem; padding: 3px 6px; }
  .g-row .g-crest { display: none; }
  #scoreboard-list li:nth-child(n+4):not(.is-player):not(.g-row-gap) { display: none; }
  .g-board-foot { display: none; }
  .g-event { padding: 5px 7px; }
  .g-event small { display: none; }

  .g-power { left: 8px; right: 8px; bottom: 8px; width: auto; transform: none; padding: 8px 10px; }
  .g-power.visible { transform: none; }
  .g-power-top label { font-size: 0.72rem; }
  #spend-val { font-size: 1.15rem; }
  .g-presets button { font-size: 0.72rem; padding: 4px 0; }
  .g-presets kbd { display: none; }
  .g-abilities { gap: 6px; margin: 0 0 8px; }
  .g-ab { grid-template-columns: 22px 1fr; padding: 5px 7px; font-size: 0.72rem; }
  .g-ab img { width: 22px; height: 22px; }
  .g-ab kbd { display: none; }

  .g-exit { bottom: auto; top: 50%; left: 8px; height: 32px; padding: 0 10px; font-size: 0.75rem; }
  .bp-hud, .g-emote { bottom: 186px; left: 8px; }
  .g-emote { bottom: 232px; }
  .g-zoom { display: none; }
  .g-mute { right: 8px; bottom: 186px; width: 36px; height: 34px; }
  .g-notices { right: 8px; bottom: 228px; width: min(260px, calc(100vw - 16px)); font-size: 0.75rem; }
  .g-toasts { top: auto; bottom: 186px; font-size: 0.75rem; max-width: calc(100vw - 120px); }
  .g-tip { display: none !important; }

  .fx-banner { top: 64px; padding: 8px 16px 10px; }
  .fx-banner b { font-size: 1.2rem; }
  .fx-banner span { font-size: 0.75rem; }
  .g-tut { left: 8px; right: 8px; top: auto; bottom: 186px; width: auto; transform: none; padding: 10px 12px; }
  .g-tut.is-pop { animation: none; }
  .g-tut h4 { font-size: 1.05rem; }
  .g-tut p { font-size: 0.78rem; }
  .g-diplo { width: min(260px, calc(100vw - 16px)); }
  .g-award-list { grid-template-columns: 1fr 1fr; }
  .g-sum { grid-template-columns: 1fr 1fr; }
}

/* ── Kalıcı profil ve başarımlar (lobi) ──────────────────────────────────── */
.hub-ach-btn { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 10px; padding: 8px 10px; border-radius: 10px;
  border: 1px solid rgba(255, 194, 75, 0.35); background: rgba(255, 194, 75, 0.08); color: inherit; font: 600 0.82rem inherit; cursor: pointer; text-align: left; }
.hub-ach-btn:hover { background: rgba(255, 194, 75, 0.16); }
.hub-ach-btn img { width: 24px; height: 24px; object-fit: contain; }
.hub-ach-btn b { margin-left: auto; color: #FFC24B; }
.hub-ach { width: min(760px, 94vw); max-height: 90vh; overflow: auto; }
.hub-ach h3 { display: flex; justify-content: space-between; margin: 18px 0 10px; }
.hub-ach h3 small { color: #FFC24B; }
.hub-ach-stats { margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.hub-ach-stats div { padding: 8px 10px; border-radius: 10px; background: rgba(127, 127, 127, 0.1); }
.hub-ach-stats dt { font-size: 0.72rem; opacity: 0.7; }
.hub-ach-stats dd { margin: 2px 0 0; font: 800 1.2rem 'Big Shoulders Display', 'Arial Narrow', sans-serif; }
.hub-ach-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.hub-ach-list li { display: grid; grid-template-columns: 44px 1fr; column-gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; border: 1px solid rgba(127, 127, 127, 0.25); opacity: 0.55; }
.hub-ach-list li img { grid-row: 1 / 3; width: 44px; height: 44px; object-fit: contain; filter: grayscale(1) brightness(0.7); }
.hub-ach-list li b { font-size: 0.88rem; }
.hub-ach-list li span { font-size: 0.72rem; opacity: 0.8; line-height: 1.3; }
.hub-ach-list li.is-on { opacity: 1; border-color: rgba(255, 194, 75, 0.45); background: rgba(255, 194, 75, 0.08); }
.hub-ach-list li.is-on img { filter: none; }
.hub-ach-list em, .g-award-list em { font-style: normal; font-size: 0.68rem; color: #FFC24B; }
.g-award-list li.is-new { border-color: #FFC24B; box-shadow: 0 0 16px rgba(255, 194, 75, 0.35); }
.g-award-list li.is-new em { background: #FFC24B; color: #1A1200; padding: 1px 5px; border-radius: 999px; font-weight: 800; }
.g-music { bottom: 158px; }
.g-music svg, .lb-mute[data-music] svg { width: 17px; height: 17px; display: block; }
@media (max-width: 760px), (pointer: coarse) and (max-height: 520px) {
  .g-music { bottom: 226px; right: 8px; width: 36px; height: 34px; }
  .g-notices { bottom: 268px; }
}
@media (min-width: 761px) { .g-notices { bottom: 206px; } }
@media (max-width: 760px), (pointer: coarse) and (max-height: 520px) {
  .g-toasts { top: 150px; bottom: auto; max-width: calc(100vw - 24px); }
  .g-toast { font-size: 0.72rem; padding: 6px 10px; }
  .g-tut { bottom: 196px; padding: 8px 10px; border-radius: 12px; }
  .g-tut h4 { margin: 3px 0 2px; font-size: 0.98rem; }
  .g-tut p { font-size: 0.74rem; line-height: 1.35; }
  .g-tut-bar { margin: 6px 0 5px; }
  .g-tut footer button { padding: 4px 10px; font-size: 0.74rem; }
}
@media (max-width: 760px), (pointer: coarse) and (max-height: 520px) {
  .g-ab { grid-template-columns: 1fr; justify-items: center; padding: 6px 4px; }
  .g-ab .g-ab-name { display: none; }
  .g-power-top label { display: none; }
  .g-power-top { justify-content: flex-end; }
  .g-tut { bottom: 150px; }
  .g-toasts { top: 212px; }
  .bp-hud { bottom: 150px; }
  .g-emote { bottom: 194px; }
  .g-mute { bottom: 150px; }
  .g-music { bottom: 190px; }
  .g-notices { bottom: 232px; }
}
@media (max-width: 760px), (pointer: coarse) and (max-height: 520px) {
  .g-exit { font-size: 0; gap: 0; width: 36px; padding: 0; justify-content: center; }
}

/* ── Final savaşı ────────────────────────────────────────────────────────── */
body.is-final::after { content: ""; position: fixed; inset: 0; z-index: 6; pointer-events: none;
  box-shadow: inset 0 0 140px 30px rgba(255, 40, 60, 0.55); animation: final-pulse 0.7s ease-in-out 6 alternate; }
@keyframes final-pulse { from { opacity: 0.35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body.is-final::after { animation: none; opacity: .6; } }
