/* ============================================
   AUTH LAYOUT CSS - MoneyTruck
   ============================================ */

:root {
    --primary: #6C3CE1;
    --primary-dark: #5A2DBF;
    --primary-light: #8B6CF2;
    --secondary: #00D4FF;
    --accent: #FF6B6B;
    --gradient-main: linear-gradient(135deg, #6C3CE1 0%, #00D4FF 100%);
    --dark-bg: #0A0A1A;
    --dark-border: rgba(255,255,255,0.08);
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255,255,255,0.7);
    --text-muted: rgba(255,255,255,0.4);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;  /* ✅ ALLOW SCROLLING */
}

/* ---------- ANIMATED BACKGROUND ---------- */
.auth-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--dark-bg);
    overflow: hidden;
}

.auth-bg .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: floatOrb 25s infinite ease-in-out;
}

.auth-bg .orb:nth-child(1) {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -200px;
    right: -100px;
}

.auth-bg .orb:nth-child(2) {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: -100px;
    left: -100px;
    animation-delay: -8s;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(60px, -60px) scale(1.1); }
    66% { transform: translate(-40px, 40px) scale(0.9); }
}

/* ---------- AUTH CONTAINER ---------- */
.auth-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
    margin: 20px auto;  /* ✅ Allow margin for scrolling */
}

/* ---------- AUTH CARD ---------- */
.auth-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transition: var(--transition);
}

.auth-card:hover {
    border-color: rgba(108, 60, 225, 0.3);
    box-shadow: 0 20px 80px rgba(108, 60, 225, 0.1);
}

/* ---------- AUTH LOGO ---------- */
.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo .logo-icon {
    font-size: 3rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-logo h2 {
    font-weight: 800;
    font-size: 1.8rem;
    margin-top: 10px;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-logo p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 5px;
}

/* ---------- FORM ELEMENTS ---------- */
.form-control {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid var(--dark-border) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(108, 60, 225, 0.15) !important;
    background: rgba(255,255,255,0.08) !important;
}

.form-control::placeholder {
    color: var(--text-muted) !important;
}

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-check-input {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--dark-border);
}

.form-check-input:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.form-check-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-check {
    margin-bottom: 20px;
}

/* ---------- BUTTONS ---------- */
.btn-auth {
    background: var(--gradient-main);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    transition: var(--transition);
    box-shadow: 0 0 30px rgba(108, 60, 225, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 50px rgba(108, 60, 225, 0.4);
    color: #fff;
}

.btn-auth::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: all 0.5s ease;
}

.btn-auth:hover::before {
    left: 100%;
}

.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ---------- LINKS ---------- */
.auth-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.auth-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* ---------- ALERTS ---------- */
.alert {
    border-radius: var(--radius-sm);
    border: none;
    padding: 14px 18px;
    font-size: 0.9rem;
}

.alert-danger {
    background: rgba(255, 107, 107, 0.15);
    color: #FF6B6B;
    border-left: 4px solid #FF6B6B;
}

.alert-success {
    background: rgba(0, 230, 118, 0.15);
    color: #00E676;
    border-left: 4px solid #00E676;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.15);
    color: #FFC107;
    border-left: 4px solid #FFC107;
}

/* ---------- DIVIDER ---------- */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--dark-border);
}

.auth-divider::before {
    margin-right: 15px;
}

.auth-divider::after {
    margin-left: 15px;
}

/* ---------- CODE INPUT ---------- */
.code-input {
    font-size: 2rem !important;
    letter-spacing: 15px !important;
    text-align: center !important;
    font-weight: 600 !important;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 480px) {
    .auth-card {
        padding: 25px;
    }
    
    .auth-logo h2 {
        font-size: 1.5rem;
    }
    
    .auth-logo .logo-icon {
        font-size: 2.5rem;
    }
    
    body {
        padding: 20px 10px;
    }
}

/* ---------- UTILITY ---------- */
.text-muted-custom {
    color: var(--text-muted) !important;
}

.verification-timer {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.verification-timer .timer {
    color: var(--secondary);
    font-weight: 600;
}

.resend-link {
    color: var(--secondary);
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.resend-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.resend-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   REGISTER PAGE SPECIFIC - SCROLL FIX
   ============================================ */
.auth-container {
    max-height: none;  /* ✅ Allow full height */
}

.auth-card {
    overflow-y: visible;  /* ✅ Allow content to flow */
}

/* ✅ Ensure the page scrolls properly on mobile */
@media (max-height: 700px) {
    .auth-container {
        margin: 10px auto;
    }
    .auth-card {
        padding: 25px;
    }
    .auth-logo {
        margin-bottom: 15px;
    }
    .auth-logo h2 {
        font-size: 1.3rem;
    }
    .auth-logo .logo-icon {
        font-size: 2rem;
    }
    .form-control {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    .btn-auth {
        padding: 12px;
    }
}