/* ======== CSS Variables ======== */
:root {
    --color-primary: #E6007E;
    --color-secondary: #F37B23;
    --color-tertiary: #00AEEF;
    --color-dark-blue: #2A2F67;
    --color-success: #10B981;
    --color-error: #EF4444;
    
    --color-bg: #F9FAFB;
    --color-card: #FFFFFF;
    --color-text: #1F2937;
    --color-text-light: #6B7280;
    --font-primary: 'Poppins', sans-serif;
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* ======== Animated Background ======== */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--color-primary), transparent);
    top: -250px;
    left: -250px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--color-tertiary), transparent);
    bottom: -200px;
    right: -200px;
    animation-delay: 7s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--color-secondary), transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 14s;
}

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

/* ======== Logo Loader ======== */
.logo-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.logo-loader.active {
    display: flex;
}

.loader-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(230, 0, 126, 0.1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loader-text {
    margin-top: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}

/* ======== Auth Container ======== */
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

.auth-card {
    background: var(--color-card);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.6s ease-out;
}

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

/* ======== Auth Header ======== */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.auth-logo:hover {
    transform: scale(1.05) rotate(5deg);
}

.auth-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-dark-blue);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* ======== Auth Tabs ======== */
.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: var(--color-bg);
    padding: 5px;
    border-radius: 12px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: var(--color-text-light);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-tab.active {
    background: var(--color-card);
    color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ======== Auth Forms ======== */
.auth-form-container {
    display: none;
}

.auth-form-container.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--color-card);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-tertiary);
    box-shadow: 0 0 0 4px rgba(0, 174, 239, 0.1);
}

.form-group input::placeholder {
    color: #9CA3AF;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--color-text-light);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.forgot-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--color-dark-blue);
}

/* ======== Buttons ======== */
.btn-primary {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 0, 126, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 0, 126, 0.4);
}

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

/* ======== Divider ======== */
.divider {
    position: relative;
    text-align: center;
    margin: 25px 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #E5E7EB;
}

.divider span {
    position: relative;
    background: var(--color-card);
    padding: 0 15px;
    color: var(--color-text-light);
    font-size: 0.85rem;
}

/* ======== OAuth Buttons ======== */
.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    background: var(--color-card);
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-oauth:hover {
    border-color: var(--color-text-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

/* ======== Auth Messages ======== */
.auth-message {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    display: none;
}

.auth-message.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

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

.auth-message.success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #10B981;
}

.auth-message.error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #EF4444;
}

/* ======== Responsive Design ======== */
@media (max-width: 640px) {
    .auth-card {
        padding: 30px 20px;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .auth-logo {
        width: 60px;
        height: 60px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
