/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-1: #060608;
    --bg-2: #0b0b0f;
    --panel: rgba(18, 18, 18, 0.92);
    --panel-strong: #151515;
    --stroke: #2a2a2a;
    --text: #f2f4f7;
    --muted: #9aa0a6;
    --accent: #00d6b4;
    --accent-2: #6c2785;
    --accent-3: #00a7d6;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
    --font-body: "Kanit", sans-serif;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(700px 420px at 12% 10%, rgba(0, 214, 180, 0.12), transparent 60%),
        radial-gradient(700px 520px at 90% 18%, rgba(108, 39, 133, 0.16), transparent 55%),
        linear-gradient(180deg, var(--bg-2), var(--bg-1));
    padding: 30px 18px 60px;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 34px 34px;
    pointer-events: none;
}

.auth-header {
    width: 100%;
    max-width: 520px;
    display: flex;
    justify-content: center;
    margin: 8px 0 6px;
    position: relative;
    z-index: 1;
}

.auth-header p {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(18, 24, 33, 0.9);
    border: 1px solid #283444;
    color: var(--muted);
    font-size: 0.92rem;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.auth-header a {
    color: #e7fffb;
    text-decoration: none;
    font-weight: 600;
}

.auth-header a:hover {
    color: var(--accent);
}

.auth-container {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 26px;
    position: relative;
    z-index: 1;
}

.auth-form {
    background: linear-gradient(160deg, rgba(21, 21, 21, 0.96), rgba(14, 14, 18, 0.96));
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 34px 32px 36px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    animation: rise 0.6s ease both;
}

.auth-form h2 {
    font-size: 2rem;
    margin-bottom: 6px;
    color: #f5f8fb;
}

.auth-subtitle {
    color: var(--muted);
    margin-bottom: 22px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    border: 1px solid #243041;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 1rem;
    background: #0f141b;
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(44, 198, 163, 0.18);
    background: #101722;
}

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: rgba(18, 24, 33, 0.9);
    color: #c7d2de;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.password-toggle:hover {
    background: rgba(18, 24, 33, 1);
    color: #f0f6ff;
    border-color: rgba(0, 214, 180, 0.35);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
    transform: translateY(-50%) translateY(-1px);
}

.password-toggle:focus-visible {
    outline: none;
    border-color: rgba(0, 214, 180, 0.6);
    box-shadow: 0 0 0 3px rgba(0, 214, 180, 0.18);
}

.auth-btn {
    margin-top: 8px;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(120deg, var(--accent-2), var(--accent));
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 20px rgba(0, 214, 180, 0.25);
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(0, 214, 180, 0.35);
}

.switch-auth {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.switch-auth p {
    color: var(--muted);
}

.switch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 999px;
    border: 1px solid #283444;
    background: #121923;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    min-width: 220px;
}

.switch-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 214, 180, 0.6);
    color: var(--accent);
}

.forgot-password {
    display: block;
    text-align: center;
    margin-top: 18px;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    body {
        padding: 24px 16px 40px;
    }
}

@media (max-width: 600px) {
    .auth-form {
        padding: 26px 22px 28px;
    }
}
