/* ==========================================
   ANIMATED RESPONSIVE LOGIN FORM - CSS
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --error-color: #ef4444;
    --success-color: #10b981;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

/* ==========================================
   HEADER SECTION
   ========================================== */

.login-header {
    text-align: center;
    margin-bottom: 40px;
    animation: slideDown 0.6s ease-out 0.1s both;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header h1 {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-weight: 700;
}

.login-header p {
    color: var(--text-light);
    font-size: 14px;
}

/* ==========================================
   FORM SECTION
   ========================================== */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    animation: slideUp 0.6s ease-out both;
}

.form-group:nth-child(1) {
    animation-delay: 0.2s;
}

.form-group:nth-child(2) {
    animation-delay: 0.3s;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f9fafb;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: var(--primary-color);
    background: #f0f4ff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.input-icon {
    width: 20px;
    height: 20px;
    margin-left: 15px;
    color: var(--text-light);
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.input-wrapper:focus-within .input-icon {
    color: var(--primary-color);
}

input[type="email"],
input[type="password"] {
    flex: 1;
    border: none;
    background: transparent;
    padding: 14px 12px;
    font-size: 15px;
    color: var(--text-dark);
    outline: none;
    font-family: inherit;
}

input[type="email"]::placeholder,
input[type="password"]::placeholder {
    color: var(--text-light);
}

input[type="email"]:focus::placeholder,
input[type="password"]:focus::placeholder {
    color: transparent;
}

.toggle-password {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 12px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary-color);
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

.error-message {
    display: block;
    color: var(--error-color);
    font-size: 12px;
    margin-top: 6px;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ==========================================
   FORM FOOTER
   ========================================== */

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    animation: slideUp 0.6s ease-out 0.4s both;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.remember-me span {
    font-size: 14px;
    color: var(--text-dark);
}

.forgot-link {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ==========================================
   LOGIN BUTTON
   ========================================== */

.login-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    animation: slideUp 0.6s ease-out 0.5s both;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.btn-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.login-btn:hover .btn-icon {
    transform: translateX(4px);
}

/* ==========================================
   SIGNUP LINK
   ========================================== */

.signup-link {
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
    margin-top: 20px;
    animation: slideUp 0.6s ease-out 0.6s both;
}

.signup-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.signup-link a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ==========================================
   DIVIDER
   ========================================== */

.divider {
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
    margin: 25px 0;
    position: relative;
    animation: slideUp 0.6s ease-out 0.7s both;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
    z-index: -1;
}

.divider::after {
    content: 'Or continue with';
    position: relative;
    background: white;
    padding: 0 12px;
}

/* ==========================================
   SOCIAL LOGIN
   ========================================== */

.social-login {
    display: flex;
    gap: 12px;
    animation: slideUp 0.6s ease-out 0.8s both;
}

.social-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-btn:hover {
    border-color: var(--primary-color);
    background: #f0f4ff;
    transform: translateY(-2px);
}

.social-btn svg {
    width: 24px;
    height: 24px;
}

.google-btn:hover svg {
    color: #ea4335;
}

.github-btn:hover svg {
    color: #000;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
    }

    .login-header h1 {
        font-size: 24px;
    }

    .login-header p {
        font-size: 13px;
    }

    input[type="email"],
    input[type="password"] {
        padding: 12px 10px;
        font-size: 14px;
    }

    .input-icon {
        width: 18px;
        height: 18px;
        margin-left: 12px;
    }

    .toggle-password {
        padding: 0 10px;
    }

    .form-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .forgot-link {
        align-self: flex-end;
    }

    .login-btn {
        padding: 12px 16px;
        font-size: 15px;
    }

    .social-login {
        gap: 10px;
    }

    .social-btn svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 360px) {
    .login-box {
        padding: 25px 15px;
    }

    .login-header h1 {
        font-size: 22px;
    }

    .form-group {
        gap: 12px;
    }

    .input-wrapper {
        border-radius: 10px;
    }

    input[type="email"],
    input[type="password"] {
        padding: 11px 8px;
        font-size: 13px;
    }

    .login-btn {
        font-size: 14px;
    }
}

/* ==========================================
   DARK MODE SUPPORT (Optional)
   ========================================== */

@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    }

    .login-box {
        background: #1f2937;
        color: #f3f4f6;
    }

    .login-header h1 {
        color: #f3f4f6;
    }

    .login-header p {
        color: #9ca3af;
    }

    .input-wrapper {
        background: #374151;
        border-color: #4b5563;
    }

    .input-wrapper:focus-within {
        border-color: var(--primary-color);
        background: rgba(99, 102, 241, 0.1);
    }

    .input-icon {
        color: #9ca3af;
    }

    input[type="email"],
    input[type="password"] {
        background: transparent;
        color: #f3f4f6;
    }

    input[type="email"]::placeholder,
    input[type="password"]::placeholder {
        color: #6b7280;
    }

    .remember-me span {
        color: #e5e7eb;
    }

    .divider::before {
        background: #374151;
    }

    .divider {
        color: #9ca3af;
    }

    .divider::after {
        background: #1f2937;
    }

    .social-btn {
        background: #374151;
        border-color: #4b5563;
    }

    .social-btn:hover {
        background: rgba(99, 102, 241, 0.15);
    }
}
