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

:root {
    --primary-color: #ff6b6b;
    --secondary-color: #ffd93d;
    --accent-orange: #ff8c42;
    --accent-pink: #ff6b9d;
    --dark: #2d3436;
    --light: #fef9f3;
    --gray: #636e72;
    --white: #ffffff;
    --success-color: #10b981;
    --error-color: #ef4444;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff6b9d 50%, #ffd93d 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.container {
    max-width: 450px;
    width: 100%;
}

.card {
    background: white;
    border-radius: 25px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: slideUp 0.5s ease;
}

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

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-pink));
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
}

.card-header .logo {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.card-header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.card-body {
    padding: 2.5rem 2rem;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.input-group {
    position: relative;
}

input {
    width: 100%;
    padding: 1rem 1.25rem;
    padding-right: 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
    background: #f8fafc;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
}

input.error {
    border-color: var(--error-color);
}

.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 1.1rem;
}

.password-toggle {
    cursor: pointer;
    user-select: none;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-pink));
    color: white;
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    width: auto;
    font-weight: 500;
}

.btn-link:hover {
    text-decoration: underline;
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

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

.divider span {
    background: white;
    padding: 0 1rem;
    position: relative;
    color: var(--gray);
    font-size: 0.9rem;
}

.social-login {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    flex: 1;
    padding: 0.875rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.social-btn.google:hover {
    border-color: #DB4437;
    background: #DB4437;
    color: white;
}

.social-btn.facebook:hover {
    border-color: #1877F2;
    background: #1877F2;
    color: white;
}

.social-btn.apple:hover {
    border-color: #000;
    background: #000;
    color: white;
}

.social-btn-icon {
    font-size: 1.25rem;
}

.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: none;
    font-size: 0.9rem;
}

.alert.show {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-info {
    background: rgba(255, 107, 107, 0.1);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.forgot-password {
    text-align: right;
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
}

.footer-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.footer-links p {
    color: var(--gray);
    font-size: 0.9rem;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.footer-links a:hover {
    text-decoration: underline;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.remember-me input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.remember-me label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
    font-size: 0.9rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    margin-bottom: 1.5rem;
    font-weight: 500;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.back-link:hover {
    opacity: 1;
}

/* Modal for password reset */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: white;
    border-radius: 20px;
    max-width: 400px;
    width: 100%;
    padding: 2rem;
    animation: slideUp 0.3s ease;
}

.modal h3 {
    margin-bottom: 1rem;
    color: var(--dark);
}

.modal p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-buttons .btn {
    flex: 1;
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--dark);
}

.btn-secondary:hover {
    background: #e2e8f0;
}

@media (max-width: 480px) {
    .card-body {
        padding: 2rem 1.5rem;
    }

    .social-login {
        flex-direction: column;
    }

    .modal-buttons {
        flex-direction: column;
    }
}
