/* Modern Authentication Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 30%, #ffc3d7 60%, #d4a5d9 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
}

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

.auth-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideUp 0.6s ease;
}

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

.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo img {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.auth-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #4a4a68;
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    font-size: 15px;
    color: #8e8ea7;
    margin-bottom: 32px;
}

.error-message {
    background: linear-gradient(135deg, #ffb7d5 0%, #ff9a9e 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(255, 154, 158, 0.25);
    animation: shake 0.5s ease;
}

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

.success-message {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.auth-form {
    margin-top: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    background: white;
    border-color: #8b7fc7;
    box-shadow: 0 0 0 4px rgba(139, 127, 199, 0.15);
}

.input-icon {
    padding: 0 16px;
    color: #a0aec0;
    font-size: 18px;
    transition: color 0.3s ease;
}

.input-wrapper:focus-within .input-icon {
    color: #8b7fc7;
}

.form-input {
    flex: 1;
    padding: 16px 16px 16px 0;
    border: none;
    background: transparent;
    outline: none;
    font-size: 15px;
    color: #2d3748;
    font-family: inherit;
}

.form-input::placeholder {
    color: #a0aec0;
}

.form-link {
    display: block;
    text-align: right;
    margin-top: 12px;
    font-size: 14px;
    color: #8b7fc7;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.form-link:hover {
    color: #a89fd9;
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.btn-auth {
    flex: 1;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #8b7fc7 0%, #a89fd9 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(139, 127, 199, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(139, 127, 199, 0.35);
}

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

.btn-secondary {
    background: white;
    color: #8b7fc7;
    border: 2px solid #8b7fc7;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: #f7fafc;
    transform: translateY(-2px);
}

.form-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 32px 0;
    color: #a0aec0;
    font-size: 14px;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.form-divider span {
    padding: 0 16px;
}

.social-login {
    display: flex;
    gap: 12px;
}

.btn-social {
    flex: 1;
    padding: 14px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 24px;
}

.btn-social:hover {
    border-color: #8b7fc7;
    background: #faf8f5;
    transform: translateY(-2px);
}

.auth-footer {
    text-align: center;
    margin-top: 32px;
    font-size: 14px;
    color: #718096;
}

.auth-footer a {
    color: #8b7fc7;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #a89fd9;
}

/* Toggle between sign in and sign up */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 480px) {
    .auth-card {
        padding: 32px 24px;
    }
    
    .auth-title {
        font-size: 28px;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-auth {
        width: 100%;
    }
}

/* Loading State */
.btn-auth.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-auth.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Checkbox styles */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #8b7fc7;
}

.checkbox-wrapper label {
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
}

/* Select dropdown */
select.form-input {
    padding: 16px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0aec0' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}
