:root {
    --gold: #c29959;
    --gold-soft: rgba(194, 153, 89, 0.25);
    --panel: rgba(7, 7, 12, 0.82);
    --panel-border: rgba(194, 153, 89, 0.45);
    --text-soft: #d0d0d0;
    --danger: #ff5c5c;
    --success: #8fff8f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Orbitron', sans-serif;
    color: white;
    overflow: hidden;
    background: #080808;
}

.page-bg {
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
        url("../img/kaizen-bg.jpg") center center / cover no-repeat, #0a0606;
    z-index: 0;
}

.login-screen {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 430px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    padding: 28px 22px;
    box-shadow:
        0 0 30px rgba(0, 0, 0, 0.55),
        0 0 22px rgba(194, 153, 89, 0.18);
    backdrop-filter: blur(8px);
}

.logo-area {
    text-align: center;
    margin-bottom: 26px;
}

.logo-area h1 {
    margin: 0;
    font-size: 34px;
    letter-spacing: 5px;
    color: var(--gold);
    text-shadow: 0 0 14px rgba(194, 153, 89, 0.35);
}

.logo-area p {
    margin: 8px 0 0;
    font-size: 13px;
    letter-spacing: 4px;
    color: var(--text-soft);
}

.form-area {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.name-input {
    width: 100%;
    border: 1px solid rgba(194, 153, 89, 0.40);
    background: rgba(0, 0, 0, 0.45);
    color: white;
    border-radius: 14px;
    padding: 16px 14px;
    text-align: center;
    font-size: 16px;
    outline: none;
    font-family: 'Orbitron', sans-serif;
}

.name-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 12px rgba(194, 153, 89, 0.18);
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}

.main-btn {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 16px 12px;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1px;
    cursor: pointer;
}

.main-btn:active {
    transform: scale(0.98);
}

.create-btn {
    background: linear-gradient(135deg, #d7ad69, #b88743);
    color: black;
    box-shadow: 0 0 16px rgba(194, 153, 89, 0.25);
}

.join-btn {
    background: rgba(255, 255, 255, 0.06);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.status-text {
    min-height: 20px;
    margin: 4px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--text-soft);
}

.status-text.error {
    color: var(--danger);
}

.status-text.success {
    color: var(--success);
}

@media (max-width: 480px) {
    .login-card {
        max-width: 390px;
        padding: 24px 18px;
        border-radius: 20px;
    }

    .logo-area h1 {
        font-size: 30px;
    }

    .name-input,
    .main-btn {
        font-size: 14px;
    }
}

/* ---------- Davet, kaldığın yer, nasıl oynanır ---------- */
body { overflow-x: hidden; overflow-y: auto; }
.login-screen { padding: 24px 16px; }

.resume-box { display: grid; gap: 8px; margin: 0 0 16px; }
.resume-title { font-size: 10px; letter-spacing: 3px; color: var(--gold); text-align: center; }
.resume-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 14px; border-radius: 14px; background: rgba(194, 153, 89, 0.14); border: 1px solid var(--panel-border); color: #fff; text-decoration: none; font-family: 'Exo 2', sans-serif; font-size: 14px; }
.resume-btn b { color: var(--gold); letter-spacing: 1px; }
.resume-go { font-family: 'Orbitron', sans-serif; font-size: 10px; font-weight: 900; color: var(--gold); white-space: nowrap; }

.invite-note { padding: 12px 14px; border-radius: 14px; background: rgba(143, 255, 143, 0.08); border: 1px solid rgba(143, 255, 143, 0.35); font-family: 'Exo 2', sans-serif; font-size: 14px; line-height: 1.4; text-align: center; color: #e9ffe9; }
.invite-note b { font-family: 'Orbitron', sans-serif; letter-spacing: 1px; color: var(--success); }
.invite-note.bad { background: rgba(255, 92, 92, 0.08); border-color: rgba(255, 92, 92, 0.4); color: #ffe3e3; }
.invite-note.bad b { color: var(--danger); }

.entry-form { display: flex; flex-direction: column; gap: 10px; }
.or-line { display: flex; align-items: center; gap: 10px; color: var(--text-soft); font-family: 'Exo 2', sans-serif; font-size: 12px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.12); }

.howto-btn { display: block; margin: 18px auto 0; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--panel-border); background: transparent; color: var(--gold); font-family: 'Orbitron', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 2px; cursor: pointer; }

.howto-wrap { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0.6); }
.howto-wrap[hidden] { display: none; }
.howto-sheet { width: min(480px, 100%); max-height: 90vh; overflow-y: auto; padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); border-radius: 24px 24px 0 0; background: #15131a; border: 1px solid var(--panel-border); border-bottom: 0; animation: howto-up 0.22s ease-out; }
@keyframes howto-up { from { transform: translateY(30px); opacity: 0.5; } to { transform: none; opacity: 1; } }
.howto-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.howto-head h2 { margin: 0; font-size: 16px; letter-spacing: 3px; color: var(--gold); }
.howto-close { width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.05); color: #fff; font-size: 14px; cursor: pointer; }

.steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.step { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.07); counter-increment: s; position: relative; }
.step::before { content: counter(s); position: absolute; top: -7px; left: -5px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #111; font-size: 11px; font-weight: 900; }
.step-text { font-family: 'Exo 2', sans-serif; font-size: 13.5px; line-height: 1.45; color: #e6e2da; }
.step-text b { color: #fff; }
.step-text > b:first-child { display: block; font-family: 'Orbitron', sans-serif; font-size: 12px; letter-spacing: 1px; color: var(--gold); margin-bottom: 3px; }
.step-art { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; align-items: center; min-height: 60px; }

.mini { width: 19px; height: 24px; border-radius: 5px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 900; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55); }
.mini.t1 { background: linear-gradient(160deg, #6fdcff, #1491c2); }
.mini.t2 { background: linear-gradient(160deg, #ff8f8f, #c43535); }
.mini.n { background: linear-gradient(160deg, #bdb9b0, #6f6c65); }
.mini.a { background: linear-gradient(160deg, #34343c, #08080a); box-shadow: inset 0 0 0 1.5px #ff4d4d; }
.mini.lab { width: 23px; height: 29px; font-size: 12px; }
.mini.closed { background: linear-gradient(180deg, #dfe5f1, #c3cde0); box-shadow: inset 0 0 0 3px #d6ddeb, inset 0 0 0 4px rgba(201, 151, 63, 0.7), 0 0 0 2px #e7c06a; color: #2a2f3d; }
.mini.big { width: 92px; height: 64px; border-radius: 12px; position: relative; }
.mini.big em { font-style: normal; font-size: 13px; letter-spacing: 1px; margin-top: -6px; }
.mini.big .ok { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); padding: 2px 7px; border-radius: 999px; background: #2fbf68; color: #fff; font-size: 7.5px; letter-spacing: 1px; }
.clue-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--panel-border); font-size: 14px; font-weight: 900; letter-spacing: 1px; }
.clue-chip i { font-style: normal; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: #111; font-size: 12px; }
.trophy { font-size: 34px; }

@media (max-width: 360px) {
    .step { grid-template-columns: 92px 1fr; }
    .mini.big { width: 80px; }
}

/* Logo */
.logo-img { display: block; width: min(220px, 60vw); height: auto; margin: -8px auto 2px; border-radius: 18px; filter: drop-shadow(0 6px 22px rgba(255, 90, 40, 0.35)); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.feedback-link { display: block; width: max-content; margin: 12px auto 0; color: var(--gold); opacity: 0.75; font-size: 13px; text-decoration: none; }
.feedback-link:hover { opacity: 1; }
.install-btn { display: block; margin: 12px auto 0; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--gold); background: rgba(212,175,55,0.12); color: var(--gold); font: 700 13px system-ui, sans-serif; cursor: pointer; }
.install-hint { max-width: 320px; margin: 10px auto 0; text-align: center; font-size: 13px; color: var(--gold); opacity: 0.85; }
.info-links { display: flex; justify-content: center; gap: 8px; margin: 14px auto 0; font-size: 12px; opacity: 0.7; }
.info-links a { color: var(--gold); text-decoration: none; }
.info-links span { color: var(--gold); opacity: 0.6; }
