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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #334155;
}

.container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
    color: #1e293b;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #0f172a;
}

.header p {
    font-size: 1rem;
    color: #64748b;
    font-weight: 400;
}

.auth-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    padding: 2rem;
    position: relative;
}

.form-section {
    display: none;
}

.form-section.active {
    display: block;
}

.form-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #1e293b;
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
    background-color: #fefefe;
}

.input-group input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: white;
}

.input-group input:valid {
    border-color: #10b981;
}

.input-group small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.btn {
    width: 100%;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: #1f2937;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #374151;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.3);
}

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

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.btn-spinner {
    display: none;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-spinner {
    display: inline;
}

.form-switch {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.form-switch p {
    color: #6b7280;
    font-size: 0.9rem;
}

.form-switch a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.form-switch a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.message-container {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.message-container.success {
    background-color: #10b981;
    color: white;
}

.message-container.error {
    background-color: #ef4444;
    color: white;
}

.message-container.info {
    background-color: #3b82f6;
    color: white;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .auth-container {
        padding: 1.5rem;
    }
}

/* Form validation styles */
.input-group input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-group .error-message {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

/* Animation for form switching */
.form-section {
    animation: fadeIn 0.3s ease-in-out;
}

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

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

.btn-spinner::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

/* Forgot Password Link */
.forgot-password {
    text-align: center;
    margin-top: 1rem;
}

.forgot-password a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

.close {
    color: #6b7280;
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
    transition: color 0.2s ease;
}

.close:hover,
.close:focus {
    color: #374151;
}

.modal h2 {
    margin-bottom: 0.5rem;
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal p {
    margin-bottom: 1.5rem;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        margin: 1rem;
    }
    
    .login-form {
        padding: 2rem 1.5rem;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        max-width: none;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Verification Modal Styles */
.verification-modal {
    max-width: 500px;
    padding: 0;
}

.verification-modal .modal-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 1.5rem;
    text-align: center;
    border-radius: 12px 12px 0 0;
}

.verification-modal .modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.verification-modal .modal-body {
    padding: 2rem;
    text-align: center;
}

.warning-text {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.verification-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.verification-actions .btn {
    min-width: 180px;
}

.status-message {
    margin-top: 1rem;
    min-height: 40px;
}

.status-message .loading {
    color: #3b82f6;
    font-style: italic;
}

.status-message .success {
    color: #059669;
    font-weight: 600;
}

.status-message .error {
    color: #dc2626;
    font-weight: 600;
}

@media (max-width: 480px) {
    .verification-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .verification-actions .btn {
        width: 100%;
        min-width: auto;
    }
} 