/* --- Root Variables Alignment --- */
:root {
    --primary: #00f0ff;
    --secondary: #a855f7;
    --border-color: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #64748b;
    --transition: all 0.2s ease-in-out;
}

.auth-page-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #030508;
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.auth-page-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

.modal-card {
    background: #0e131f;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    width: 100%;
    padding: 40px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    z-index: 10;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
    z-index: 20;
}
.modal-close-btn:hover { color: var(--text-main); }
.modal-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; text-align: center; letter-spacing: -0.5px; }
.modal-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; text-align: center; line-height: 1.5; }

/* --- Auth Tabs Navigation --- */
.auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 24px;
    position: relative;
    z-index: 15;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* --- Forms & General Layout Global Rules --- */
.auth-form { display: flex; flex-direction: column; gap: 12px; }

/* Utility class to flip between forms via JS */
.auth-form.hidden {
    display: none !important;
}

.auth-input {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 14px 16px;
    border-radius: 10px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
}
.auth-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

/* --- Action Buttons --- */
.btn {
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    padding: 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: #030508;
}
.btn-primary:hover {
    background: #00d8e6;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--secondary);
    color: #dfb2ff;
}
.btn-secondary:hover {
    background: rgba(168, 85, 247, 0.1);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.15);
}

.full-width {
    width: 100%;
}

/* --- Separator Divider --- */
.auth-divider {
    text-align: center;
    margin: 28px 0 20px 0;
    position: relative;
}
.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--border-color);
    z-index: 1;
}
.auth-divider span {
    background: #0e131f;
    padding: 0 12px;
    font-size: 11px;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* --- Social Identity Providers Grid --- */
.social-auth-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 10px; 
}

.social-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color); /* TYPO COMPLETELY FIXED HERE */
    color: var(--text-main);
    font-size: 12px;
    padding: 12px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.social-btn:hover { 
    background: rgba(255, 255, 255, 0.05); 
    border-color: var(--text-muted); 
}

.social-btn svg { 
    flex-shrink: 0; 
}

/* Brand specific micro-interactions on hover */
.btn-google:hover svg { filter: drop-shadow(0 0 4px rgba(66, 133, 244, 0.3)); }
.btn-telegram:hover { color: #24A1DE; border-color: rgba(36, 161, 222, 0.4); }
.btn-instagram:hover { color: #E1306C; border-color: rgba(225, 48, 108, 0.4); }