/* ====================================================
   MERO LOVE - LOGIN PAGE STYLES
   ==================================================== */

/* CSS Variables */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-light: #8a6de9;
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    --error-gradient: linear-gradient(135deg, #ff6b6b 0%, #ffa8a8 100%);
    --dark-bg: #121212;
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-dark: rgba(30, 30, 30, 0.95);
    --text-dark: #2d3436;
    --text-light: #636e72;
    --border-light: rgba(99, 110, 114, 0.2);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 30px 80px rgba(0, 0, 0, 0.2);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: var(--primary-light);
    animation: float 20s infinite linear;
}

.circle-1 { width: 300px; height: 300px; top: 10%; left: 5%; animation-delay: 0s; }
.circle-2 { width: 200px; height: 200px; top: 60%; right: 10%; animation-delay: -5s; }
.circle-3 { width: 150px; height: 150px; bottom: 20%; left: 15%; animation-delay: -10s; }
.circle-4 { width: 100px; height: 100px; top: 20%; right: 20%; animation-delay: -15s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-30px) rotate(120deg); }
    66% { transform: translateY(30px) rotate(240deg); }
}

/* Container */
.container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.logo-circle {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo-circle i {
    font-size: 36px;
    color: white;
}

.logo-text h1 {
    color: white;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.logo-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(14px, 3vw, 16px);
    font-weight: 400;
    max-width: 300px;
    margin: 0 auto;
}

/* Auth Card */
.auth-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: clamp(30px, 6vw, 48px);
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 36px;
}

.form-header h2 {
    color: var(--text-dark);
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-header p {
    color: var(--text-light);
    font-size: 15px;
}

/* Form Elements */
.input-group {
    margin-bottom: 24px;
    position: relative;
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-light);
    font-size: 18px;
    z-index: 1;
}

.form-input {
    width: 100%;
    padding: 18px 20px 18px 52px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-dark);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    background: white;
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

/* Password Toggle */
.password-toggle-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.password-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-light);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 18px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    margin-top: 8px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--secondary-gradient);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(245, 87, 108, 0.4);
}

.btn-success {
    background: var(--success-gradient);
    color: white;
}

/* Messages */
.message-box {
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    animation: slideIn 0.5s ease-out;
    border-left: 4px solid;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.error-message {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe3e3 100%);
    border-left-color: #ff6b6b;
    color: #d63031;
}

.success-message {
    background: linear-gradient(135deg, #f0fff4 0%, #e6fffa 100%);
    border-left-color: #27ae60;
    color: #2ecc71;
}

.info-message {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f0ff 100%);
    border-left-color: #3498db;
    color: #2980b9;
}

.warning-message {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border-left-color: #f39c12;
    color: #d68910;
}

/* Verification Sections */
.verification-section {
    padding: 30px;
    border-radius: var(--radius-md);
    margin: 30px 0;
    text-align: center;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.verification-icon {
    font-size: 48px;
    margin-bottom: 20px;
    background: var(--warning-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.email-display {
    background: rgba(255, 255, 255, 0.9);
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-md);
    padding: 18px;
    margin: 20px 0;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    word-break: break-all;
}

/* OTP Input */
.otp-container {
    margin: 30px 0;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
}

.otp-input {
    width: 55px;
    height: 65px;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.otp-input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.otp-input.filled {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border-color: var(--primary-light);
}

/* Links */
.form-links {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.form-link {
    display: inline-block;
    margin: 0 12px;
    color: var(--text-light);
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
}

.form-link:hover {
    color: var(--primary-light);
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-link i {
    margin-right: 8px;
}

/* Loading States */
.btn.loading {
    pointer-events: none;
}

.btn.loading span {
    visibility: hidden;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* OTP Timer */
.otp-timer {
    margin: 20px 0;
}

.timer-progress {
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.timer-progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    width: 100%;
    animation: timer 600s linear;
}

@keyframes timer {
    from { width: 100%; }
    to { width: 0%; }
}

.timer-text {
    font-size: 14px;
    color: var(--text-light);
    text-align: center;
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    body {
        padding: 12px;
        align-items: flex-start;
        padding-top: 40px;
    }

    .container {
        max-width: 100%;
    }

    .auth-card {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .otp-input {
        width: 45px;
        height: 55px;
        font-size: 24px;
    }

    .form-link {
        display: block;
        margin: 12px 0;
    }

    .bg-circle {
        display: none;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --card-bg: var(--card-dark);
        --text-dark: #f8f9fa;
        --text-light: #adb5bd;
        --border-light: rgba(255, 255, 255, 0.1);
    }

    .auth-card {
        background: var(--card-dark);
    }

    .form-input {
        background: rgba(255, 255, 255, 0.05);
        color: var(--text-dark);
        border-color: var(--border-light);
    }

    .form-input:focus {
        background: rgba(255, 255, 255, 0.1);
    }

    .email-display {
        background: rgba(255, 255, 255, 0.05);
        color: var(--text-dark);
    }

    .password-toggle-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Animations */
.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}