.form-options {
    margin-bottom: 0.5em;
}
.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 0.5em;
}
.consent-group {
    display: block;
    margin-top: 10px;
    margin-bottom: 1em;
}
.consent-group label, .consent-group input {
    vertical-align: middle;
}

.switch-link {
    color: #667eea !important;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    font-size: larger;
}

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

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .form-row a {
        margin-left: 0;
        margin-top: 8px;
    }
    .form-row {
        margin-bottom: 0.5em;
    }
    .form-row label, .form-row a {
        font-size: 1em;
        color: #444;
    }
    .consent-group {
        margin-top: 10px;
        margin-bottom: 1em;
    }
    .consent-group label {
        font-size: 0.97em;
        color: #555;
    }
    .consent-group a {
        color: #007bff;
        text-decoration: underline;
    }
}
@media (max-width: 480px) {
    .social-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    .message-box {
        width: 100%;
        font-size: 0.95rem;
        padding: 1rem 0.5rem;
        box-sizing: border-box;
    }
    .auth-form {
        padding: 1rem 0.5rem;
    }
    .auth-btn {
        font-size: 1rem;
        padding: 1rem;
    }
}
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.5);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}
.message-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    position: relative;
}
.message-box.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}
.message-box.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}
.message-icon {
    font-size: 1.1rem;
}
.message-text {
    flex: 1;
}
.message-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    margin-left: 0.5rem;
    padding: 0 0.25rem;
    border-radius: 4px;
    transition: background 0.2s;
}
.message-close:focus,
.message-close:hover {
    background: rgba(0,0,0,0.05);
    outline: none;
    opacity: 1;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.password-wrapper .form-input {
    padding-right: 2.5rem;
}
.eye-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    display: flex;
    align-items: center;
    z-index: 2;
    background: none;
    border: none;
    padding: 0;
    outline: none;
}
.eye-icon svg {
    transition: opacity 0.2s;
}
body {
    font-family: "Roboto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 406;
    font-style: normal;
    font-variation-settings: "wdth" 82.3;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    font-size: 1.1rem;
}
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem; /* CHANGED */
}
.auth-container {
    width: 100%;
    max-width: 400px;
}
.auth-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.auth-header {
    text-align: left;
    margin-bottom: 0.5rem;
}
.auth-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0rem;
}
.auth-subtitle {
    color: #666;
    font-size: 1.05rem;
}
.auth-form {
    margin-bottom: 1.5rem;
    position: relative;
}
.form-group {
    margin-bottom: 1.25rem;
}
.form-label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}
.form-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.form-input::placeholder {
    color: #999;
}
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #666;
}
.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 16px;
    height: 16px;
    accent-color: #667eea;
}
.forgot-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}
.forgot-link:hover {
    text-decoration: underline;
}
.terms-link {
    color: #667eea;
    text-decoration: none;
}
.terms-link:hover {
    text-decoration: underline;
}
.auth-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
}
.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}
.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}
.signup-btn {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
}
.signup-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.3);
}
.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-loader .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.hidden {
    display: none;
}
.auth-toggle {
    text-align: center;
    margin-bottom: 1.5rem;
}
.toggle-text {
    color: #666;
    font-size: 0.9rem;
}
.toggle-btn {
    background: none;
    border: none;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    margin-left: 0.25rem;
}
.toggle-btn:hover {
    color: #5a67d8;
}
.social-login {
    margin-top: 1.5rem;
}
.divider {
    position: relative;
    text-align: center;
    margin-bottom: 1.5rem;
}
.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
    transform: translateY(-50%);
}
.divider-text {
    position: relative;
    background: white;
    padding: 0 1rem;
    color: #666;
    font-size: 0.85rem;
    display: inline-block;
    z-index: 1;
}
.social-buttons {
    display: flex;
    gap: 1rem;
}
.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}
.social-btn:hover {
    border-color: #667eea;
    background: #f8f9fa;
    transform: translateY(-1px);
}
.social-icon {
    width: 18px;
    height: 18px;
}
.google-btn:hover {
    border-color: #4285f4;
}
.github-btn:hover {
    border-color: #333;
}
@media (max-width: 480px) {
    .main-content {
        padding: 0 1rem; /* CHANGED */
    }
    .auth-card {
        padding: 2rem 1.5rem;
    }
    .social-buttons {
        flex-direction: column;
    }
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
.form-input.error {
    border-color: #ef4444;
    background: #fef2f2;
}
.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}
.form-input.success {
    border-color: #10b981;
    background: #f0fdf4;
}
.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}
.auth-btn.loading .btn-text {
    opacity: 0;
}
.auth-btn.loading .btn-loader {
    display: block;
}
.form-input.error {
    border-color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.05);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}
.form-input.success {
    border-color: #27ae60;
    background-color: rgba(39, 174, 96, 0.05);
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.2);
}
.field-error {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    animation: slideIn 0.3s ease;
}
.field-error::before {
    content: "⚠️";
    margin-right: 0.5rem;
}
.auth-message {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid;
    animation: slideIn 0.3s ease;
}
.error-message {
    background-color: rgba(231, 76, 60, 0.1);
    border-left-color: #e74c3c;
    color: #c0392b;
}
.success-message {
    background-color: rgba(39, 174, 96, 0.1);
    border-left-color: #27ae60;
    color: #27ae60;
}
.info-message {
    background-color: rgba(52, 152, 219, 0.1);
    border-left-color: #3498db;
    color: #2980b9;
}
.message-content {
    display: flex;
    align-items: center;
}
.message-icon {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}
.message-text {
    flex: 1;
    font-weight: 500;
}
.btn-loader {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
/* Enhanced error display styles */
.error-suggestions {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.05);
    border-radius: 6px;
    border-left: 3px solid #ef4444;
}

.error-suggestions p {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: #dc2626;
    font-size: 0.9rem;
}

.error-suggestions ul {
    margin: 0;
    padding-left: 1.25rem;
    list-style-type: disc;
}

.error-suggestions li {
    margin-bottom: 0.25rem;
    color: #7f1d1d;
    font-size: 0.85rem;
    line-height: 1.4;
}

.message-content {
    flex: 1;
}

.field-error {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    animation: slideIn 0.3s ease;
}

.field-error::before {
    content: "⚠️";
    margin-right: 0.5rem;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
    background-color: rgba(255, 255, 255, 1);
}
@media (max-width: 480px) {
    .auth-message {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    .field-error {
        font-size: 0.8rem;
    }
    .message-icon {
        font-size: 1rem;
    }
}

/* Forgot Password Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #333;
    text-decoration: none;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    margin: 0 0 1.5rem 0;
    color: #666;
    line-height: 1.5;
}

.reset-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.reset-message.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.reset-message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body {
        padding: 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
}

/* Login Page Notification */
.login-notification {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
    animation: slideInDown 0.3s ease-out;
}

.login-notification.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.login-notification.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

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