:root {
    color-scheme: dark;
    --tk-text-main: #f6eddc;
    --tk-text-soft: rgba(241, 223, 189, 0.92);
    --tk-text-muted: rgba(206, 215, 225, 0.78);
    --tk-blue-soft: #7dccff;
    --tk-blue: #3aa7ff;
    --tk-gold: #d6a453;
    --tk-gold-soft: #f0cf8a;
    --tk-panel: rgba(5, 12, 20, 0.42);
    --tk-panel-soft: rgba(5, 12, 20, 0.28);
    --tk-border-gold: rgba(214, 164, 83, 0.30);
    --tk-border-blue: rgba(66, 169, 255, 0.42);
    --tk-shadow-blue: 0 0 18px rgba(58, 167, 255, 0.30);
    --tk-font-ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --tk-font-title: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    font-family: var(--tk-font-ui);
    color: var(--tk-text-main);
    background: #02060a;
}

.tk-login-page {
    min-height: 100dvh;
    position: relative;
    background-image:
        linear-gradient(90deg, rgba(2, 7, 12, 0.74) 0%, rgba(3, 9, 15, 0.56) 28%, rgba(3, 8, 14, 0.12) 54%, rgba(3, 8, 14, 0.18) 100%),
        linear-gradient(180deg, rgba(2, 7, 12, 0.10) 0%, rgba(2, 7, 12, 0.02) 48%, rgba(2, 7, 12, 0.22) 100%),
        url('../img/login_bg_fullhd.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.tk-login-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 76%, rgba(255, 179, 84, 0.08), transparent 18%),
        linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.08) 100%);
    pointer-events: none;
}

.login-shell {
    position: relative;
    z-index: 1;
    min-height: 100dvh;
    width: min(1720px, 100%);
    margin: 0 auto;
    padding: 36px 42px 36px;
    display: grid;
    grid-template-columns: minmax(320px, 580px) 1fr;
    gap: 24px;
}

.left-column {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 20px;
}

.brand-block {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 120px;
}

.brand-mark {
    width: 82px;
    height: 82px;
    border-radius: 18px;
    border: 1px solid rgba(66, 169, 255, 0.44);
    background:
        radial-gradient(circle at 35% 30%, rgba(124, 204, 255, 0.46), transparent 24%),
        linear-gradient(180deg, rgba(14, 27, 41, 0.94), rgba(6, 13, 22, 0.96));
    box-shadow: var(--tk-shadow-blue), inset 0 0 0 1px rgba(255,255,255,0.04);
    position: relative;
    flex: 0 0 auto;
}
.brand-mark::before,
.brand-mark::after {
    content: "";
    position: absolute;
    inset: 17px;
    border: 2px solid rgba(61, 176, 255, 0.88);
    transform: rotate(45deg);
    box-shadow: 0 0 12px rgba(61, 176, 255, 0.42);
}
.brand-mark::after {
    inset: 27px;
    border-width: 1px;
    opacity: 0.75;
}

.brand-copy {
    line-height: 1;
}
.brand-copy strong,
.brand-copy span {
    display: block;
    font-family: var(--tk-font-title);
    font-size: clamp(28px, 3vw, 40px);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 18px rgba(0,0,0,0.30);
}
.brand-copy span {
    margin-top: 8px;
    color: var(--tk-blue-soft);
    font-size: clamp(18px, 2vw, 29px);
    letter-spacing: 0.22em;
}

.login-copy {
    position: relative;
    isolation: isolate;
    max-width: 520px;
    padding-left: 8px;
}

.login-copy::after {
    content: "";
    position: absolute;
    z-index: 0;
    left: -76px;
    top: 145px;
    width: min(620px, calc(100vw - 32px));
    height: 255px;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 42% 42%, rgba(85, 145, 190, 0.16), transparent 58%),
        radial-gradient(ellipse at 50% 72%, rgba(5, 14, 24, 0.42), transparent 66%);
    filter: blur(18px);
}

.login-copy > * {
    position: relative;
    z-index: 1;
}
.login-copy h1 {
    margin: 0;
    font-family: var(--tk-font-title);
    font-size: clamp(46px, 5.1vw, 74px);
    line-height: 1.03;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: #f9f4ea;
    text-shadow: 0 0 24px rgba(0,0,0,0.34);
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 28px 0 24px;
    max-width: 470px;
}
.login-divider::before,
.login-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, rgba(66,169,255,0.12), rgba(66,169,255,0.75), rgba(66,169,255,0.12));
}
.login-divider span {
    color: var(--tk-blue-soft);
    font-size: 24px;
    line-height: 1;
    text-shadow: 0 0 14px rgba(66,169,255,0.48);
}

.login-copy .lead {
    margin: 0;
    max-width: 500px;
    font-size: 17px;
    line-height: 1.75;
    color: var(--tk-text-muted);
    text-shadow: 0 1px 8px rgba(0,0,0,0.26);
}

.player-note {
    margin-top: 42px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    max-width: 470px;
    color: rgba(192, 202, 214, 0.88);
    font-size: 15px;
    line-height: 1.55;
}
.player-note-badge {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(66,169,255,0.22);
    background: rgba(7, 17, 29, 0.44);
    display: grid;
    place-items: center;
    color: var(--tk-blue-soft);
    backdrop-filter: blur(4px);
}
.player-note-badge svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.right-column {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.auth-toolbar {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding-top: 14px;
}
.auth-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
}
.google-login-btn,
.google-disabled-btn {
    min-width: 312px;
    min-height: 64px;
    padding: 0 28px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.16);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(243,245,248,0.96));
    color: #1f2937;
    text-decoration: none;
    font-weight: 800;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    box-shadow: 0 18px 34px rgba(0,0,0,0.22);
}
.google-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 36px rgba(0,0,0,0.28);
}
.google-disabled-btn {
    background: rgba(27, 35, 46, 0.96);
    color: rgba(255,255,255,0.64);
}
.google-icon { width: 22px; height: 22px; flex: 0 0 auto; }

.help-login-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(215, 222, 231, 0.86);
    text-decoration: none;
    font-size: 15px;
    text-shadow: 0 1px 10px rgba(0,0,0,0.35);
}
.help-login-link:hover { color: #ffffff; }
.help-login-link .help-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.22);
    display: grid;
    place-items: center;
    background: rgba(5, 14, 22, 0.36);
    backdrop-filter: blur(4px);
}

.login-help-note {
    margin-top: 4px;
    max-width: 360px;
    color: rgba(255,255,255,0.54);
    font-size: 13px;
    line-height: 1.5;
    text-align: right;
}

.right-spacer {
    flex: 1;
}

@media (max-width: 1180px) {
    .login-shell {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px 22px 34px;
    }
    .brand-block { margin-bottom: 48px; }
    .right-column { align-items: stretch; }
    .auth-toolbar { justify-content: flex-start; }
    .auth-actions { align-items: flex-start; }
    .right-spacer { display: none; }
    .tk-login-page {
        background-position: 62% center;
    }
}

@media (max-width: 700px) {
    .brand-mark { width: 68px; height: 68px; border-radius: 16px; }
    .brand-mark::before { inset: 13px; }
    .brand-mark::after { inset: 22px; }
    .brand-block { gap: 14px; }
    .brand-copy strong { font-size: 24px; }
    .brand-copy span { font-size: 18px; }
    .login-copy h1 { font-size: clamp(38px, 10vw, 52px); }
    .login-copy .lead { font-size: 16px; line-height: 1.65; }
    .login-copy::after { left: -38px; top: 118px; height: 300px; }
    .google-login-btn,
    .google-disabled-btn {
        min-width: 100%;
        width: min(100%, 360px);
    }
}

@media (max-width: 520px) {
    .tk-login-page {
        background-position: 67% center;
    }
    .login-shell {
        padding: 18px 16px 26px;
    }
    .brand-block { margin-bottom: 28px; }
    .player-note { margin-top: 28px; font-size: 14px; }
    .login-copy::after { left: -28px; top: 110px; height: 330px; }
}
