﻿@import url("https://fonts.googleapis.com/css2?family=Paytone+One&display=swap");
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css");

:root {
    --tg-auth-text: #333333;
    --tg-auth-muted: #9ca3af;
    --tg-auth-navy: #1a2f4c;
    --tg-auth-border: #d1d5db;
    --tg-auth-border-soft: #e5e7eb;
    --tg-auth-black: #111111;
}

body.tg-auth-body {
    margin: 0;
    background: #ffffff;
    color: var(--tg-auth-text);
    font-family: "Pretendard", sans-serif !important;
}

body.tg-auth-body,
body.tg-auth-body button,
body.tg-auth-body input,
body.tg-auth-body textarea,
body.tg-auth-body select,
body.tg-auth-body a,
body.tg-auth-body span,
body.tg-auth-body div,
body.tg-auth-body label,
body.tg-auth-body p,
body.tg-auth-body li {
    font-family: "Pretendard", sans-serif !important;
}

.tg-auth-screen {
    min-height: 100vh;
    padding: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    font-family: "Pretendard", sans-serif;
}

.tg-auth-screen::before,
.tg-auth-screen::after {
    display: none;
    content: none;
}

.tg-auth-shell {
    width: min(100%, 400px);
    padding: 32px 24px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.tg-auth-shell--compact {
    padding-top: 32px;
}

.tg-auth-kicker {
    display: none;
}

.tg-auth-logo,
body.tg-auth-body .tg-auth-logo,
body.tg-auth-body h1.tg-auth-logo {
    margin: 0;
    font-family: "Paytone One", sans-serif !important;
    font-weight: 400 !important;
    font-style: normal;
    font-size: 3rem;
    line-height: 1;
    letter-spacing: 0.025em;
    text-align: center;
    color: #000000;
}

.tg-auth-title {
    margin: 24px 0 40px;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    color: var(--tg-auth-navy);
}

.tg-auth-description {
    display: none;
}

.tg-auth-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tg-auth-alert {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(190, 24, 93, 0.16);
    background: rgba(244, 63, 94, 0.08);
    color: #be123c;
    font-size: 0.9rem;
    line-height: 1.5;
}

.tg-auth-alert--success {
    border-color: rgba(21, 128, 61, 0.18);
    background: rgba(34, 197, 94, 0.08);
    color: #166534;
}

.tg-auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.tg-auth-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--tg-auth-navy);
}

.tg-auth-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;
}

.tg-auth-input-wrap {
    position: relative;
}

.tg-auth-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border: 1px solid var(--tg-auth-border);
    border-radius: 0;
    background: #ffffff;
    color: var(--tg-auth-text);
    font-size: 0.875rem;
    font-family: "Pretendard", sans-serif !important;
    transition: border-color 0.18s ease;
}

.tg-auth-input::placeholder {
    color: var(--tg-auth-muted);
}

.tg-auth-input:focus {
    outline: none;
    border-color: #6b7280;
    box-shadow: none;
}

.tg-auth-input--with-action {
    padding-right: 48px;
}

.tg-auth-input-action {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background: transparent;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.18s ease;
}

.tg-auth-input-action:hover {
    color: #6b7280;
}

.tg-auth-input-action:focus-visible {
    outline: none;
}

.tg-auth-hint {
    font-size: 0.8rem;
    line-height: 1.5;
    color: #8c94a0;
}

.tg-auth-validation {
    display: block;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #b91c1c;
}

.tg-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 32px;
}

.tg-auth-row--stack {
    flex-direction: column;
    align-items: stretch;
}

.tg-auth-utility-note {
    display: none;
}

.tg-auth-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
}

.tg-auth-check-input {
    appearance: none;
    margin: 0;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: inline-grid;
    place-content: center;
    border: 1.5px solid var(--tg-auth-border);
    background: #ffffff;
    cursor: pointer;
}

.tg-auth-check-input::before {
    content: "";
    transform: scale(0);
    transition: transform 120ms ease-in-out;
}

.tg-auth-check-input:checked::before {
    transform: scale(1);
}

.tg-auth-check-input--circle {
    border-radius: 50%;
}

.tg-auth-check-input--circle::before {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #a1a1aa;
}

.tg-auth-check-input--square {
    border-radius: 4px;
}

.tg-auth-check-input--square::before {
    width: 11px;
    height: 11px;
    border-radius: 2px;
    background: #a1a1aa;
}

.tg-auth-check-input:focus-visible {
    outline: none;
}

.tg-auth-button {
    width: 100%;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 16px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.tg-auth-button:disabled {
    opacity: 0.65;
    cursor: default;
}

.tg-auth-button--primary {
    background: var(--tg-auth-black);
    color: #ffffff;
}

.tg-auth-button--primary:hover:not(:disabled) {
    background: #000000;
}

.tg-auth-button--secondary {
    background: #ffffff;
    border-color: var(--tg-auth-black);
    color: #000000;
}

.tg-auth-button--secondary:hover:not(:disabled) {
    background: #f9fafb;
}

.tg-auth-button--subtle {
    background: rgba(17, 17, 17, 0.04);
    color: #111111;
}

.tg-auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0 32px;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.tg-auth-divider::before,
.tg-auth-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #f3f4f6;
}

.tg-auth-social-list {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}

.tg-auth-social-button {
    border: none;
    background: transparent;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.tg-auth-social-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.tg-auth-social-button--kakao .tg-auth-social-circle {
    background: #fee500;
    color: #111111;
}

.tg-auth-social-button--google .tg-auth-social-circle {
    background: #ffffff;
    border: 1px solid var(--tg-auth-border-soft);
}

.tg-auth-social-button--facebook .tg-auth-social-circle {
    background: #1877f2;
    color: #ffffff;
}

.tg-auth-social-button--discord .tg-auth-social-circle {
    background: #5865f2;
    color: #ffffff;
}

.tg-auth-captcha {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
}

.tg-auth-captcha__surface {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

.tg-auth-captcha__widget {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tg-auth-captcha__widget > div,
.tg-auth-captcha__widget iframe {
    max-width: 100%;
}

.tg-auth-captcha__question {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.tg-auth-captcha__question-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--tg-auth-navy);
}

.tg-auth-terms {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.tg-auth-term {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tg-auth-inline-link {
    border: none;
    background: transparent;
    padding: 0;
    font-size: 12px;
    font-weight: 700;
    color: #9ca3af;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.tg-auth-inline-link:hover {
    color: #6b7280;
}

.tg-auth-footer {
    margin-top: 8px;
    text-align: center;
    font-size: 13px;
    line-height: 1.55;
    color: #6b7280;
}

.tg-auth-footer a {
    color: #111111;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tg-auth-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tg-auth-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.36);
    border-top-color: rgba(255, 255, 255, 0.96);
    animation: tg-auth-spin 0.8s linear infinite;
}

.tg-auth-spinner--dark {
    border-color: rgba(17, 17, 17, 0.14);
    border-top-color: rgba(17, 17, 17, 0.86);
}

.tg-auth-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1050;
    font-family: "Pretendard", sans-serif;
}

.tg-auth-overlay.is-visible {
    display: flex;
}

.tg-auth-dialog {
    width: min(100%, 420px);
    padding: 24px;
    border-radius: 26px;
    border: 1px solid rgba(17, 17, 17, 0.08);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.22);
}

.tg-auth-dialog__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.tg-auth-dialog__title {
    margin: 0 0 8px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--tg-auth-navy);
}

.tg-auth-dialog__description {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.55;
}

.tg-auth-dialog__close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.05);
    color: #4b5563;
    cursor: pointer;
}

.tg-auth-dialog__close:hover {
    background: rgba(17, 17, 17, 0.08);
}

.tg-auth-dialog__email {
    margin-bottom: 16px;
    padding: 13px 14px;
    border-radius: 16px;
    background: rgba(26, 47, 76, 0.05);
    border: 1px solid rgba(26, 47, 76, 0.08);
}

.tg-auth-dialog__email-label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
}

.tg-auth-dialog__email-value {
    font-size: 0.92rem;
    font-weight: 700;
    word-break: break-word;
}

.tg-auth-dialog__footer {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.tg-auth-dialog__footer .tg-auth-button {
    flex: 1 1 0;
    margin-bottom: 0;
}

@keyframes tg-auth-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 640px) {
    .tg-auth-screen {
        padding: 0;
    }

    .tg-auth-shell {
        width: min(100%, 400px);
        padding: 32px 24px;
    }

    .tg-auth-row {
        flex-wrap: wrap;
    }

    .tg-auth-dialog {
        padding: 20px 18px;
        border-radius: 22px;
    }
}
