/* =========================================================
   Darkastral — temel stiller (tüm sayfalar)
   ========================================================= */

:root {
    /* Zemin ve yüzeyler */
    --bg: #0B1020;
    --bg-deep: #070A16;
    --panel: #121A2E;
    --glass: rgba(22, 32, 58, .55);
    --glass-strong: rgba(18, 26, 46, .86);
    --line: rgba(148, 170, 220, .14);
    --line-strong: rgba(148, 170, 220, .26);

    /* Metin */
    --text: #E6EAF4;
    --muted: #8C97B2;
    --faint: #5D6884;

    /* Vurgu */
    --amber: #F2B544;
    --amber-soft: rgba(242, 181, 68, .14);
    --teal: #5CC8D6;
    --teal-soft: rgba(92, 200, 214, .14);
    --danger: #F07A7A;
    --success: #7BD9A0;

    /* Kaynak renkleri */
    --c-metal: #A9B4C2;
    --c-crystal: #7FD4F0;
    --c-gas: #B49CFF;
    --c-energy: #F5D76E;
    --c-credits: #9BE3A8;

    /* Tipografi */
    --font-display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
    --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;

    /* Ölçüler */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
    --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: .005em;
}

p { margin: 0; }

a { color: var(--teal); text-decoration: none; }
a:hover { color: #8BE0EA; }

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

button, input, select, textarea { font: inherit; color: inherit; }

code {
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: .88em;
    padding: .1em .35em;
    border-radius: 4px;
    background: rgba(148, 170, 220, .1);
}

:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

::selection { background: rgba(242, 181, 68, .35); color: #fff; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
    width: 20px;
    height: 20px;
    flex: none;
}

.muted { color: var(--muted); }

.eyebrow {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 12px; top: -60px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--amber);
    color: #1A1203;
    font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Marka ---------- */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}
.brand:hover { color: var(--text); }
.brand__mark { width: 30px; height: 30px; color: var(--amber); }
.brand__name {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: .02em;
}

/* ---------- Butonlar ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: none;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .03em;
    cursor: pointer;
    transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
    background: var(--amber);
    color: #1A1203;
    box-shadow: 0 0 0 1px rgba(242, 181, 68, .4), 0 10px 30px -10px rgba(242, 181, 68, .55);
}
.btn--primary:hover { background: #F7C462; color: #1A1203; box-shadow: 0 0 0 1px rgba(242, 181, 68, .6), 0 12px 36px -10px rgba(242, 181, 68, .7); }

.btn--outline {
    border-color: var(--line-strong);
    background: rgba(18, 26, 46, .4);
    color: var(--text);
    backdrop-filter: blur(6px);
}
.btn--outline:hover { border-color: rgba(230, 234, 244, .5); color: #fff; }

.btn--ghost {
    border-color: var(--line);
    color: var(--text);
}
.btn--ghost:hover { border-color: var(--line-strong); background: rgba(148, 170, 220, .06); color: #fff; }

.btn--sm { min-height: 34px; padding: 0 14px; font-size: 13px; }
.btn--lg { min-height: 52px; padding: 0 28px; font-size: 16px; letter-spacing: .08em; }
.btn--block { width: 100%; }

.link-btn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--teal);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}
.link-btn:hover { color: #8BE0EA; text-decoration: underline; }

.icon-btn {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(18, 26, 46, .5);
    color: var(--muted);
    cursor: pointer;
    transition: color .2s, border-color .2s, background-color .2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.icon-btn.is-disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Formlar ---------- */
.form { display: grid; gap: 18px; }

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

.field { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; min-width: 0; }

.field label, .field legend {
    padding: 0;
    color: #C9D0E2;
    font-size: 13.5px;
    font-weight: 600;
}
.field legend { margin-bottom: 9px; }

.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: rgba(7, 10, 22, .55);
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: var(--faint); }
.field input:hover { border-color: rgba(148, 170, 220, .38); }
.field input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(92, 200, 214, .18);
}
.field input[aria-invalid="true"] { border-color: var(--danger); }

.field__hint { color: var(--faint); font-size: 12.5px; }
.field__error { color: var(--danger); font-size: 13px; font-weight: 500; }

.input-wrap { position: relative; }
.input-wrap input { padding-right: 46px !important; }
.input-wrap__btn {
    position: absolute;
    top: 50%; right: 6px;
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--muted);
    cursor: pointer;
    transform: translateY(-50%);
}
.input-wrap__btn:hover, .input-wrap__btn[aria-pressed="true"] { color: var(--teal); }

.check {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    color: var(--muted) !important;
    font-weight: 400 !important;
    cursor: pointer;
}
.check input {
    flex: none;
    width: 18px; height: 18px;
    margin: 2px 0 0;
    accent-color: var(--amber);
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Flash mesajları ---------- */
.flash {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px 12px 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--glass-strong);
    backdrop-filter: blur(10px);
    font-size: 14px;
}
.flash p { flex: 1; }
.flash__dot {
    flex: none;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 10px currentColor;
}
.flash--success { border-color: rgba(123, 217, 160, .3); }
.flash--success .flash__dot { background: var(--success); color: var(--success); }
.flash--error { border-color: rgba(240, 122, 122, .35); }
.flash--error .flash__dot { background: var(--danger); color: var(--danger); }
.flash--notice .flash__dot { background: var(--amber); color: var(--amber); }
.flash--dev { border-style: dashed; }
.flash--dev .flash__dot { background: var(--c-gas); color: var(--c-gas); }
.flash__close {
    display: grid;
    place-items: center;
    width: 30px; height: 30px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--muted);
    cursor: pointer;
}
.flash__close:hover { color: var(--text); background: rgba(148, 170, 220, .08); }
.flash__close .icon { width: 16px; height: 16px; }
.flash__action { flex: none; }

/* ---------- Avatarlar (önceden tanımlı 8 renk) ---------- */
.avatar {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 44px; height: 44px;
    border-radius: 50%;
    color: #0B1020;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    box-shadow: inset 0 -6px 12px rgba(0, 0, 0, .25), 0 0 0 2px rgba(11, 16, 32, .9), 0 0 0 3px var(--line-strong);
}
.avatar--sm { width: 34px; height: 34px; font-size: 14px; }
.avatar--lg { width: 64px; height: 64px; font-size: 26px; }
.avatar-1 { background: radial-gradient(circle at 30% 25%, #FFE1A1, #F2B544 55%, #A86F12); }
.avatar-2 { background: radial-gradient(circle at 30% 25%, #C9F5FA, #5CC8D6 55%, #22707C); }
.avatar-3 { background: radial-gradient(circle at 30% 25%, #E5DBFF, #B49CFF 55%, #5D3FB8); }
.avatar-4 { background: radial-gradient(circle at 30% 25%, #D8F7E1, #7BD9A0 55%, #2C7A4C); }
.avatar-5 { background: radial-gradient(circle at 30% 25%, #FFD3C7, #F08A6E 55%, #93391F); }
.avatar-6 { background: radial-gradient(circle at 30% 25%, #EEF2F8, #A9B4C2 55%, #4F5A6B); }
.avatar-7 { background: radial-gradient(circle at 30% 25%, #FFD6EC, #E883B8 55%, #8C2F61); }
.avatar-8 { background: radial-gradient(circle at 30% 25%, #DDE6FF, #7D9BFF 55%, #2D45A6); }

/* ---------- İnce kapasite rayı ---------- */
.rail {
    position: relative;
    display: block;
    height: 3px;
    border-radius: 3px;
    background: rgba(148, 170, 220, .12);
    overflow: hidden;
}
.rail--lg { height: 6px; }
.rail__fill {
    --fill: 0%;
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--fill);
    border-radius: inherit;
    background: var(--teal);
    transition: width .8s var(--ease);
}
.rail--amber .rail__fill { background: linear-gradient(90deg, #C98A1F, var(--amber)); }
.rail__fill.is-full { background: var(--danger); }

.tag {
    display: inline-block;
    padding: 1px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 500;
    vertical-align: 1px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
