/* Base Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: #0b0f19;
    color: #f3f4f6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Gradients and Blobs */
.auth-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    z-index: 1;
}

.auth-bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, #111827 0%, #030712 100%);
    z-index: -2;
}

.auth-bg-blobs {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: -1;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
    animation: float 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-logo {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

.auth-logo img {
    max-width: 280px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.3));
}

/* Glassmorphism Card */
.auth-card {
    width: 100%;
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth-title {
    font-size: 1.85rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #9ca3af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: #9ca3af;
    text-align: center;
    margin-bottom: 2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    background: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.875rem 1.125rem;
    color: #ffffff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: #6b7280;
}

.form-input:focus {
    border-color: #3b82f6;
    background: rgba(31, 41, 55, 0.8);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Form Helpers */
.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #9ca3af;
    user-select: none;
}

.form-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(31, 41, 55, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-checkbox input[type="checkbox"]:checked {
    background: #3b82f6;
    border-color: #3b82f6;
}

.form-checkbox input[type="checkbox"]:checked::after {
    content: "✓";
    font-size: 10px;
    color: white;
    font-weight: bold;
}

.form-link {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.form-link:hover {
    color: #60a5fa;
    text-decoration: underline;
}

/* Buttons */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: none;
    border-radius: 12px;
    padding: 0.875rem;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
}

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

.btn-secondary {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.875rem;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-action-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn-row {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.btn-row .btn-primary, 
.btn-row .btn-secondary {
    flex: 1;
}

/* SSO Divider */
.sso-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #4b5563;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sso-line {
    flex-grow: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.sso-text {
    padding: 0 1rem;
}

/* SSO Google Button */
.btn-google {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.875rem;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
}

.btn-google:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.btn-google svg {
    width: 18px;
    height: 18px;
}

/* Alerts */
.alert-container {
    margin-top: 1rem;
    width: 100%;
}

.alert {
    padding: 0.875rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: fadeIn 0.3s ease;
    width: 100%;
    line-height: 1.4;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    padding-left: 0.5rem;
}

.alert-close:hover {
    opacity: 1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* CAPTCHA Wrapper */
.captcha-container {
    display: flex;
    justify-content: center;
    margin: 1.25rem 0;
}

/* OTP code input */
.otp-input-container {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.otp-field {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.25em;
    font-weight: 700;
    width: 160px;
    padding: 0.5rem;
    background: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    outline: none;
    transition: all 0.3s ease;
}

.otp-field:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.25rem;
    width: 90%;
    max-width: 400px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.modal-icon.success { color: #10b981; }
.modal-icon.warning { color: #f59e0b; }

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.modal-text {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Spinner Loader */
.loader-spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top: 3px solid #3b82f6;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Media Queries */
@media (max-width: 480px) {
    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
}
