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

:root {
    --bg: #0a0a0b;
    --surface: #141416;
    --surface-hover: #1c1c20;
    --border: #2a2a2e;
    --text: #e8e8ed;
    --text-muted: #7a7a85;
    --accent: #6c5ce7;
    --accent-glow: rgba(108, 92, 231, 0.15);
    --success: #00b894;
    --error: #e74c3c;
}

body {
    font-family: "DM Sans", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Ambient background effect */
body::before {
    content: "";
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, var(--accent-glow) 0%, transparent 50%), radial-gradient(ellipse at 70% 80%, rgba(0, 184, 148, 0.06) 0%, transparent 50%);
    animation: drift 20s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    100% {
        transform: translate(-5%, 3%) rotate(3deg);
    }
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 0 24px;
    animation: fadeIn 0.5s ease;
}

/* Logo & Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), #a29bfe);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    font-family: "JetBrains Mono", monospace;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--accent);
}

.subtitle {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

/* Auth Card */
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.auth-card h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.auth-card p {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 28px;
    line-height: 1.5;
}

/* Buttons */
.btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: "DM Sans", sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:hover {
    background: var(--surface-hover);
    border-color: #3a3a40;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn + .btn {
    margin-top: 12px;
}

.btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 12px;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Status messages */
.status {
    display: none;
    text-align: center;
    padding: 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-top: 20px;
    line-height: 1.5;
}

.status.loading {
    display: block;
    background: var(--accent-glow);
    border: 1px solid rgba(108, 92, 231, 0.2);
    color: var(--text);
}

.status.success {
    display: block;
    background: rgba(0, 184, 148, 0.1);
    border: 1px solid rgba(0, 184, 148, 0.2);
    color: var(--success);
}

.status.error {
    display: block;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
    color: var(--error);
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--accent);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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

/* Footer */
.footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 12px;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
