/* ==========================================================================
   CARD SCRAPER MANAGER - LOGIN PAGE (NEPHBOX STYLE)
   ========================================================================== */

:root {
    --primary-color: #8e63f3;
    --accent: #7a53e0;
    --bg-dark: #0d0d1a;
    --transition: 0.3s ease;
}

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

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0d0d1a 0%, #1a1a2e 25%, #16213e 50%, #1a1a2e 75%, #0d0d1a 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated background gradient */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(142, 99, 243, 0.08) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

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

/* Floating particles effect */
body::after {
    content: '';
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(142, 99, 243, 0.15), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(122, 83, 224, 0.15), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(142, 99, 243, 0.1), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(122, 83, 224, 0.1), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(142, 99, 243, 0.15), transparent),
        radial-gradient(1px 1px at 33% 50%, rgba(122, 83, 224, 0.1), transparent),
        radial-gradient(1px 1px at 79% 53%, rgba(142, 99, 243, 0.1), transparent);
    background-size: 200% 200%;
    animation: floatParticles 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes floatParticles {
    0%, 100% {
        background-position: 0% 0%, 100% 100%, 50% 50%, 80% 10%, 90% 60%, 33% 50%, 79% 53%;
    }
    50% {
        background-position: 100% 100%, 0% 0%, 70% 70%, 20% 80%, 10% 40%, 67% 30%, 21% 47%;
    }
}

/* Login Container */
.login-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    animation: fadeIn 0.8s ease;
    max-width: 450px;
    width: 100%;
}

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

/* Logo */
.logo {
    position: relative;
    text-align: center;
}

.logo img {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 8px 32px rgba(142, 99, 243, 0.5));
    animation: logoFloat 6s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

.logo::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(142, 99, 243, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0.9;
    }
}

.logo h1 {
    margin-top: 1.5rem;
    font-size: 1.8rem;
    font-weight: 700;
    color: #eeeeee;
}

.logo h1 .highlight {
    color: var(--primary-color);
}

/* Login Form Card */
.login-card {
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(142, 99, 243, 0.2);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: rgba(18, 18, 18, 0.6);
    border: 2px solid rgba(142, 99, 243, 0.3);
    border-radius: 10px;
    color: #eeeeee;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all var(--transition);
}

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

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(142, 99, 243, 0.15);
    background: rgba(18, 18, 18, 0.8);
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(142, 99, 243, 0.3);
}

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

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

.btn-login:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(142, 99, 243, 0.5);
}

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

/* Flash Messages */
.flash-messages {
    width: 100%;
    margin-bottom: 1rem;
}

.flash-message {
    padding: 0.875rem 1.25rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
    text-align: center;
}

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

.flash-error {
    background: rgba(244, 67, 54, 0.15);
    color: #ef5350;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.flash-success {
    background: rgba(76, 175, 80, 0.15);
    color: #66bb6a;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.flash-info {
    background: rgba(142, 99, 243, 0.15);
    color: var(--primary-color);
    border: 1px solid rgba(142, 99, 243, 0.3);
}

/* Alert styles (for error messages in template) */
.alert {
    padding: 0.875rem 1.25rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
    text-align: center;
    margin-bottom: 1rem;
}

.alert-error {
    background: rgba(244, 67, 54, 0.15);
    color: #ef5350;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        gap: 2rem;
    }

    .logo img {
        width: 100px;
    }

    .logo::before {
        width: 150px;
        height: 150px;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .login-card {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .logo img {
        width: 80px;
    }

    .logo::before {
        width: 130px;
        height: 130px;
    }

    .logo h1 {
        font-size: 1.3rem;
    }

    .login-card {
        padding: 1.5rem;
    }

    .login-container {
        gap: 1.5rem;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
