/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary: hsl(200, 95%, 45%);
    --primary-dark: hsl(200, 95%, 35%);
    --primary-light: hsl(200, 95%, 55%);
    --accent: hsl(25, 95%, 53%);
    --background: hsl(210, 40%, 98%);
    --card-bg: hsl(0, 0%, 100%);
    --text-primary: hsl(222, 47%, 11%);
    --text-secondary: hsl(215, 16%, 47%);
    --border: hsl(214, 32%, 91%);
    --error: hsl(0, 84%, 60%);
    --success: hsl(142, 71%, 45%);
    
    /* Shadows */
    --shadow-soft: 0 4px 24px -4px hsla(200, 95%, 45%, 0.12);
    --shadow-medium: 0 8px 32px -8px hsla(200, 95%, 45%, 0.18);
    --shadow-large: 0 20px 60px -12px hsla(200, 95%, 45%, 0.25);
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--background) 0%, hsl(200, 50%, 96%) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-wrapper {
    width: 100%;
    max-width: 28rem;
    animation: fadeInUp 0.6s ease-out;
}

/* Brand Section */
.brand-section {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    margin-bottom: 1rem;
    animation: scaleIn 0.5s ease-out 0.2s both;
}

.logo-circle i {
    font-size: 2rem;
    color: white;
}

.title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

/* Login Card */
.login-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-large);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    font-size: 1.25rem;
    pointer-events: none;
}

.form-input {
    width: 100%;
    height: 3rem;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--card-bg);
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px hsla(200, 95%, 45%, 0.1);
}

.form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.125rem;
    transition: var(--transition);
}

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

.error-message {
    font-size: 0.875rem;
    color: var(--error);
    display: none;
    margin-top: -0.25rem;
}

.error-message.show {
    display: block;
    animation: shake 0.3s ease-out;
}

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

/* Forgot Password */
.forgot-password {
    display: flex;
    justify-content: flex-end;
    margin-top: -0.5rem;
}

.forgot-link {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--primary-dark);
}

/* Buttons */
.btn-primary {
    width: 100%;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-large);
}

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

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

.btn-text,
.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border);
}

.divider-text {
    position: relative;
    display: inline-block;
    padding: 0 1rem;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Google Button */
.btn-google {
    width: 100%;
    height: 3rem;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.btn-google:hover {
    background: hsl(210, 40%, 96%);
    border-color: var(--primary);
}

.btn-google i {
    font-size: 1.25rem;
}

/* Sign Up Link */
.signup-link {
    text-align: center;
}

.signup-link p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.signup-link a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.signup-link a:hover {
    color: var(--primary-dark);
}

/* Footer */
.footer-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 1.5rem;
    line-height: 1.5;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--success);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-large);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    transform: translateX(calc(100% + 2rem));
    transition: transform 0.3s ease-out;
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
}

.toast i {
    font-size: 1.25rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Responsive Design */
@media (max-width: 640px) {
    .login-card {
        padding: 1.5rem;
    }
    
    .title {
        font-size: 1.75rem;
    }
    
    .toast {
        right: 1rem;
        left: 1rem;
        top: 1rem;
    }
}

@media (max-width: 380px) {
    .container {
        padding: 0.75rem;
    }
    
    .login-card {
        padding: 1.25rem;
    }
    
    .form-input,
    .btn-primary,
    .btn-google {
        height: 2.75rem;
        font-size: 0.9375rem;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --background: hsl(222, 47%, 11%);
        --card-bg: hsl(217, 33%, 17%);
        --text-primary: hsl(210, 40%, 98%);
        --text-secondary: hsl(215, 20%, 65%);
        --border: hsl(217, 33%, 25%);
    }
    
    body {
        background: linear-gradient(135deg, var(--background) 0%, hsl(220, 45%, 15%) 100%);
    }
}
