/* ==========================================================================
   Vortéx — components.css
   Cam panel, butonlar, durum göstergeleri, sunucu kartı, diyaloglar,
   kapı (kurallar), çerez bannerı, anahtarlar, bildirim.
   ========================================================================== */

/* --- Cam panel ------------------------------------------------------------ */

.glass {
  position: relative;
  background: var(--surface);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  backdrop-filter: blur(var(--blur)) saturate(140%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 var(--highlight), var(--shadow);
}
/* Üst kenarda ince pirinç ışığı */
.glass--lit::before {
  content: "";
  position: absolute;
  inset: 0 18% auto 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(241, 215, 162, .55), transparent);
  pointer-events: none;
}

/* --- Butonlar ------------------------------------------------------------- */

.btn {
  --btn-h: 50px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--btn-h);
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(30, 25, 20, .5);
  color: var(--text);
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease), color .25s var(--ease), box-shadow .3s var(--ease);
}
.btn .icon { width: 1.05rem; height: 1.05rem; }
.btn:hover { border-color: rgba(207, 174, 124, .5); background: rgba(40, 33, 26, .7); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }

.btn--gold {
  border-color: transparent;
  background: var(--gold-grad);
  background-size: 200% 100%;
  background-position: 0% 0;
  color: var(--gold-ink);
  box-shadow: 0 10px 30px -12px rgba(207, 174, 124, .55), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn--gold:hover {
  background: var(--gold-grad);
  background-size: 200% 100%;
  background-position: 100% 0;
  border-color: transparent;
  box-shadow: 0 14px 38px -12px rgba(207, 174, 124, .7), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.btn--ghost { background: transparent; }
.btn--quiet { background: transparent; border-color: transparent; padding-inline: 12px; color: var(--text-2); }
.btn--quiet:hover { background: rgba(255, 255, 255, .04); color: var(--text); border-color: transparent; }
.btn--sm { --btn-h: 38px; padding: 0 18px; font-size: .76rem; letter-spacing: .18em; }
.btn--lg { --btn-h: 58px; padding: 0 34px; font-size: .92rem; }
.btn--block { width: 100%; }
.btn--icon { width: var(--btn-h); padding: 0; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.link-arrow .icon { transition: transform .3s var(--ease); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* --- Durum & etiketler ---------------------------------------------------- */

.status-dot {
  --c: var(--text-3);
  position: relative;
  width: 8px; height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--c);
}
.status-dot.is-online { --c: var(--ok); }
.status-dot.is-offline { --c: var(--bad); }
.status-dot.is-online::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--c);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%   { transform: scale(.6); opacity: .9; }
  100% { transform: scale(1.8); opacity: 0; }
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .03);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-2);
  white-space: nowrap;
}
.tag .icon { width: .85rem; height: .85rem; }
.tag--gold { color: var(--gold-hi); border-color: rgba(207, 174, 124, .4); background: rgba(207, 174, 124, .08); }
.tag--adult { color: #f3c9a8; border-color: rgba(217, 138, 91, .45); background: rgba(217, 138, 91, .1); }

.meter {
  --value: 0;
  position: relative;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .07);
  overflow: hidden;
}
.meter::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--value) * 1%);
  border-radius: inherit;
  background: var(--gold-grad);
  transition: width .8s var(--ease);
}

/* --- Sunucu kartı --------------------------------------------------------- */

.server-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
@media (max-width: 1020px) { .server-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px)  { .server-grid { grid-template-columns: 1fr; } }

.server-card {
  --accent: var(--gold);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .45s var(--ease), border-color .45s var(--ease);
}
.server-card[data-accent="ember"] { --accent: var(--ember); }
.server-card[data-accent="steel"] { --accent: var(--steel); }
.server-card:hover { transform: translateY(-4px); border-color: var(--line-2); }

.server-card__media {
  position: relative;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.server-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(.55) contrast(1.05) brightness(.72) sepia(.18);
  transform: scale(1.04);
  transition: transform 1.2s var(--ease), filter .6s var(--ease);
}
.server-card:hover .server-card__media img { transform: scale(1.09); filter: saturate(.8) contrast(1.05) brightness(.8) sepia(.1); }
.server-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 9, 7, .1) 0%, rgba(11, 9, 7, .25) 50%, rgba(18, 14, 11, .95) 100%);
}
.server-card__badges {
  position: absolute;
  z-index: 1;
  top: 14px; left: 14px; right: 14px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.server-card__map {
  position: absolute;
  z-index: 1;
  left: 20px; bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-2);
}
.server-card__map .icon { width: .95rem; height: .95rem; color: var(--accent); }

.server-card__body { display: grid; gap: 16px; padding: 20px 22px 22px; flex: 1; align-content: start; }
.server-card__mode {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--accent);
}
.server-card__title { font-family: var(--font-display); font-size: 1.85rem; font-weight: 500; line-height: 1.05; }
.server-card__summary { color: var(--text-2); font-size: .98rem; }
.server-card__stats { display: grid; gap: 8px; }
.server-card__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: .85rem;
  color: var(--text-3);
  letter-spacing: .06em;
}
.server-card__row strong { color: var(--text); font-weight: 600; font-size: 1rem; letter-spacing: .02em; }
.server-card__address {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line-2);
  background: rgba(0, 0, 0, .2);
  font-family: var(--font-mono);
  font-size: .88rem;
  color: var(--text-2);
}
.server-card__actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: auto; }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  color: var(--text-3);
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.copy-btn:hover { color: var(--gold-hi); background: rgba(207, 174, 124, .08); }
.copy-btn .icon { width: .95rem; height: .95rem; }

/* Canlı veri yüklenirken */
[data-live="pending"] .live-value { color: var(--text-3); }
.skeleton {
  display: inline-block;
  min-width: 3.5em;
  height: .9em;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .1), rgba(255, 255, 255, .04));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  vertical-align: middle;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* --- Diyaloglar (çerez tercihleri, sunucu detayı) ------------------------- */

.dialog {
  width: min(100% - 32px, 560px);
  max-height: min(88vh, 760px);
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background: rgba(20, 16, 13, .9);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  color: var(--text);
  box-shadow: var(--shadow), inset 0 1px 0 var(--highlight);
  overflow: hidden;
}
.dialog[open] { display: flex; flex-direction: column; animation: dialog-in .45s var(--ease); }
.dialog::backdrop { background: rgba(6, 5, 4, .66); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dialog--wide { width: min(100% - 32px, 760px); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }

.dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 28px 18px;
  border-bottom: 1px solid var(--line);
}
.dialog__head h2 { font-family: var(--font-display); font-weight: 500; font-size: 1.9rem; line-height: 1.1; }
.dialog__head p { color: var(--text-3); font-size: .92rem; margin-top: 6px; }
.dialog__close {
  width: 38px; height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  color: var(--text-2);
  transition: color .2s, border-color .2s, transform .3s var(--ease);
}
.dialog__close:hover { color: var(--text); border-color: var(--gold); transform: rotate(90deg); }
.dialog__body { padding: 22px 28px; overflow-y: auto; display: grid; gap: 14px; }
.dialog__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 28px 24px;
  border-top: 1px solid var(--line);
}

/* --- Anahtar (toggle) ----------------------------------------------------- */

.switch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 18px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .02);
}
.switch-row__title { font-weight: 600; letter-spacing: .04em; }
.switch-row__desc { grid-column: 1; color: var(--text-3); font-size: .9rem; line-height: 1.5; }

.switch { position: relative; display: inline-flex; grid-row: 1 / span 2; grid-column: 2; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch__track {
  width: 46px; height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid var(--line-2);
  transition: background .3s var(--ease), border-color .3s;
  position: relative;
}
.switch__track::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text-2);
  transition: transform .3s var(--ease), background .3s;
}
.switch input:checked + .switch__track { background: rgba(207, 174, 124, .35); border-color: var(--gold); }
.switch input:checked + .switch__track::after { transform: translateX(20px); background: var(--gold-hi); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--gold); outline-offset: 3px; }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + .switch__track { opacity: .6; }

/* --- Onay kutusu ---------------------------------------------------------- */

.check {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
  cursor: pointer;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.check:hover { border-color: var(--line-2); }
.check input {
  appearance: none;
  -webkit-appearance: none;
  width: 22px; height: 22px;
  margin: 1px 0 0;
  border-radius: 6px;
  border: 1.5px solid var(--line-2);
  background: rgba(0, 0, 0, .3);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.check input::after {
  content: "";
  width: 6px; height: 11px;
  border: solid var(--gold-ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px) scale(0);
  transition: transform .2s var(--ease);
}
.check input:checked { background: var(--gold); border-color: var(--gold); }
.check input:checked::after { transform: rotate(45deg) translate(-1px, -1px) scale(1); }
.check:has(input:checked) { border-color: rgba(207, 174, 124, .45); background: rgba(207, 174, 124, .06); }
.check strong { display: block; font-weight: 600; color: var(--text); }
.check span { color: var(--text-2); font-size: .93rem; line-height: 1.5; }

/* --- Kapı: giriş kuralları (18+) ------------------------------------------ */

.gate {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  padding: 24px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(70vw 50vw at 50% 0%, rgba(207, 160, 100, .14), transparent 70%),
    rgba(7, 5, 4, .72);
}
.gate[hidden] { display: none; }
.gate.is-leaving { animation: gate-out .6s var(--ease) forwards; }
@keyframes gate-out { to { opacity: 0; visibility: hidden; } }

.gate__card {
  width: min(100%, 720px);
  margin: auto; /* sığarsa ortalanır, sığmazsa üstten başlar — kırpılmaz */
  border-radius: 24px;
  overflow: hidden;
  animation: dialog-in .7s var(--ease);
}
.gate__head {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 36px 32px 26px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(207, 174, 124, .07), transparent);
}
.gate__mark { width: 74px; filter: drop-shadow(0 8px 24px rgba(207, 174, 124, .3)); }
.gate__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 4vw, 2.7rem); line-height: 1.05; }
.gate__intro { color: var(--text-2); max-width: 52ch; font-size: 1rem; }

.gate__body { padding: 24px 32px; display: grid; gap: 18px; }
.gate__rules { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gate-rule {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
}
.gate-rule__icon {
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(207, 174, 124, .1);
  color: var(--gold);
}
.gate-rule__icon .icon { width: 1.05rem; height: 1.05rem; }
.gate-rule strong { display: block; font-size: .98rem; font-weight: 600; line-height: 1.3; }
.gate-rule span { display: block; font-size: .86rem; color: var(--text-3); line-height: 1.45; margin-top: 3px; }
.gate-rule--key { grid-column: 1 / -1; border-color: rgba(217, 138, 91, .35); background: rgba(217, 138, 91, .06); }
.gate-rule--key .gate-rule__icon { background: rgba(217, 138, 91, .16); color: #f3c9a8; font-weight: 700; font-size: .85rem; letter-spacing: .02em; }

.gate__checks { display: grid; gap: 10px; }
.gate__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 0 32px 30px;
}
.gate__foot .btn--gold { min-width: 230px; }
.gate__fine { color: var(--text-3); font-size: .82rem; }
.gate__fine a { color: var(--text-2); border-bottom: 1px solid var(--line-2); }

.gate__denied { display: none; padding: 40px 32px 36px; text-align: center; gap: 16px; justify-items: center; }
.gate.is-denied .gate__body,
.gate.is-denied .gate__foot { display: none; }
.gate.is-denied .gate__denied { display: grid; }
.gate__denied h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.9rem; }
.gate__denied p { color: var(--text-2); max-width: 46ch; }

@media (max-width: 640px) {
  .gate__rules { grid-template-columns: 1fr; }
  .gate__head, .gate__body { padding-inline: 20px; }
  .gate__foot { padding-inline: 20px; }
  .gate__foot .btn { width: 100%; }
}

/* --- Çerez bannerı -------------------------------------------------------- */

.cookie-banner {
  position: fixed;
  z-index: 90;
  left: 24px;
  bottom: 24px;
  width: min(100% - 48px, 460px);
  padding: 22px 22px 20px;
  border-radius: 20px;
  display: grid;
  gap: 14px;
  animation: cookie-in .7s var(--ease) .4s both;
}
.cookie-banner[hidden] { display: none; }
@keyframes cookie-in { from { opacity: 0; transform: translateY(24px); } }
.cookie-banner__head { display: flex; align-items: center; gap: 12px; }
.cookie-banner__head .icon { width: 1.4rem; height: 1.4rem; color: var(--gold); }
.cookie-banner__head h2 { font-family: var(--font-display); font-weight: 500; font-size: 1.45rem; line-height: 1.1; }
.cookie-banner p { color: var(--text-2); font-size: .93rem; line-height: 1.55; }
.cookie-banner p a { color: var(--gold); border-bottom: 1px solid rgba(207, 174, 124, .35); }
.cookie-banner__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cookie-banner__actions .btn { padding-inline: 12px; }
.cookie-banner__actions .btn--quiet { grid-column: 1 / -1; height: 34px; }
@media (max-width: 520px) {
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; width: auto; }
}

/* --- Bildirim (toast) ----------------------------------------------------- */

.toast-region {
  position: fixed;
  z-index: 150;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(207, 174, 124, .35);
  background: rgba(20, 16, 13, .92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
  font-size: .92rem;
  white-space: nowrap;
  animation: toast-in .4s var(--ease);
}
.toast .icon { color: var(--gold); }
.toast.is-leaving { animation: toast-out .35s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* --- Segment (sekme) kontrolü --------------------------------------------- */

.segmented {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .25);
}
.segmented button {
  height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-3);
  transition: color .2s, background .25s var(--ease);
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] { background: rgba(207, 174, 124, .14); color: var(--gold-hi); box-shadow: inset 0 0 0 1px rgba(207, 174, 124, .35); }

.field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .25);
  color: var(--text-3);
  transition: border-color .2s;
}
.field:focus-within { border-color: rgba(207, 174, 124, .5); }
.field input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; color: var(--text); }
.field input::placeholder { color: var(--text-3); }
