/* mini-analytic/assets/css/login.css */
:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --dark: #121212;
    --darker: #0a0a0a;
    --light: #f8f9fa;
    --gray: #2d3748;
    --gray-light: #4a5568;
    --success: #10b981;
    --error: #ef4444;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--light);
    overflow-x: hidden;
}

/* Animated background particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    z-index: -1;
}

.login-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 420px;
    padding: 50px 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.logo {
    text-align: center;
    margin-bottom: 30px;
    animation: float 6s ease-in-out infinite;
}

.logo svg {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 10px 20px rgba(102, 126, 234, 0.3));
}

h1 {
    color: white;
    text-align: center;
    margin-bottom: 10px;
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideUp 0.6s ease-out 0.2s both;
}

.subtitle {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-bottom: 40px;
    font-size: 15px;
    letter-spacing: 0.5px;
    animation: slideUp 0.6s ease-out 0.3s both;
}

.error-message {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 4px solid var(--error);
    font-size: 14px;
    animation: shake 0.5s ease-in-out;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-message::before {
    content: '⚠';
    font-size: 18px;
}

.login-form {
    animation: slideUp 0.6s ease-out 0.4s both;
}

.input-group {
    position: relative;
    margin-bottom: 24px;
}

.input-group input {
    width: 100%;
    padding: 18px 20px 18px 50px;
    background: rgba(255, 255, 255, 0.07);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 16px;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.1),
        inset 0 1px 2px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    transition: all 0.3s;
}

.input-group.focused .input-icon {
    color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.login-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.login-btn::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.7s;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 20px 40px rgba(102, 126, 234, 0.4),
        0 10px 20px rgba(0, 0, 0, 0.2);
}

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

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

.login-btn .arrow {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.3s;
}

.login-btn:hover .arrow {
    transform: translateX(5px);
}

.login-footer {
    text-align: center;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    animation: slideUp 0.6s ease-out 0.5s both;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .login-container {
        padding: 40px 25px;
        border-radius: 20px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .input-group input {
        padding: 16px 20px 16px 50px;
        font-size: 15px;
    }
    
    .login-btn {
        padding: 16px 25px;
    }
}

/* Loading state */
.login-btn.loading {
    pointer-events: none;
}

.login-btn.loading .arrow {
    animation: spin 1s linear infinite;
}

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