:root {
    --primary-color: #FF4500;
    --text-color: #333;
    --bg-color: #1a1a1a;
    --white: #ffffff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --error-color: #dc3545;
}

/* Alert link styling for better visibility */
.alert .alert-link {
    font-weight: 600;
    text-decoration: underline;
    color: inherit;
    opacity: 0.9;
}

.alert .alert-link:hover {
    opacity: 1;
    text-decoration: none;
}

.alert-warning .alert-link {
    color: #856404;
}

.alert-info .alert-link {
    color: #004085;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0C0019 0%, #1a1a2e 100%);
}

.auth-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.2);
}

.auth-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.auth-logo {
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding: 2.5rem 1.5rem 1.5rem;
    margin: -2.5rem -2.5rem 2rem -2.5rem;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.08) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px 20px 50% 50% / 20px 20px 30px 30px;
    box-shadow: 
        inset 0 0 20px rgba(255, 255, 255, 0.1),
        0 4px 8px -4px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-logo::before {
    content: '';
    position: absolute;
    top: 2.5rem;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    -webkit-mask-image: url('../logo.png');
    mask-image: url('../logo.png');
    -webkit-mask-size: 120px auto;
    mask-size: 120px auto;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    filter: blur(1px);
    z-index: 1;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.1);
}

.auth-logo::after {
    content: '';
    position: absolute;
    top: calc(2.5rem + 2px);
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.15) 0%,
        transparent 100%
    );
    -webkit-mask-image: url('../logo.png');
    mask-image: url('../logo.png');
    -webkit-mask-size: 120px auto;
    mask-size: 120px auto;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    filter: blur(2px);
    opacity: 0.7;
    z-index: 2;
}

.auth-logo > div:first-child {
    content: '';
    position: absolute;
    top: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 120px;
    background: radial-gradient(
        circle at center,
        transparent 30%,
        rgba(0, 0, 0, 0.2) 70%,
        rgba(0, 0, 0, 0.4) 100%
    );
    filter: blur(8px);
    z-index: 0;
}

.auth-logo img {
    visibility: hidden;
    max-width: 120px;
    height: auto;
    position: relative;
    z-index: 3;
    margin: 0;
}

.auth-title {
    margin-top: 1.25rem;
    position: relative;
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    white-space: nowrap;
    letter-spacing: -0.02em;
    color: transparent;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
}

.auth-title::before {
    content: 'Well Overdue Publishing';
    position: absolute;
    left: 0;
    right: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.15) 0%,
        transparent 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transform: translateY(1px);
    filter: blur(1px);
    opacity: 0.7;
}

.auth-title::after {
    content: 'Well Overdue Publishing';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    color: transparent;
    background: #000;
    -webkit-background-clip: text;
    background-clip: text;
    opacity: 0.3;
    filter: blur(8px);
    transform: translateY(2px);
    z-index: -1;
}

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

.form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 1rem;
    color: var(--white);
    transition: all 0.3s ease;
}

/* Ensure text remains white while typing */
.form-control:not(:placeholder-shown) {
    color: var(--white);
}

/* Additional selector to override any browser default styling */
input.form-control {
    color: var(--white) !important;
}

.form-control:focus {
    border-color: #007bff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-label {
    font-weight: 500;
    color: var(--white);
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.btn-auth {
    width: 100%;
    padding: 12px;
    border-radius: 100px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 123, 255, 0.9);
    border: 1px solid rgba(0, 123, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.btn-auth:hover {
    transform: translateY(-2px);
    background: #007bff;
    border-color: #007bff;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: var(--primary-color);
}

.auth-link-separator {
    color: rgba(255, 255, 255, 0.4);
    margin: 0 1rem;
    font-size: 0.8rem;
}

.modal {
    backdrop-filter: blur(5px);
}

.modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
    margin: 1.75rem auto;
}

.modal-content {
    background: rgba(26, 26, 26, 0.95);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
}

.modal-header .modal-title {
    color: var(--white);
}

.modal-header .close {
    color: var(--white);
    opacity: 0.7;
}

.modal-header .close:hover {
    opacity: 1;
}

.modal-body {
    padding: 1.5rem;
}

.alert {
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.alert.alert-dismissible {
    position: relative;
    padding-right: calc(1rem + 2.5rem);
}

.alert.alert-dismissible .close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: none;
}

/* Form validation styles */
.form-control.is-invalid {
    border-color: var(--error-color);
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,...");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.password-requirements {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    font-size: 0.85rem;
}

.password-requirements li {
    margin: 5px 0;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.password-requirements li::before {
    content: '•';
    color: var(--secondary-color);
    margin-right: 8px;
    transition: all 0.3s ease;
}

.password-requirements li.met {
    color: var(--success-color);
}

.password-requirements li.met::before {
    content: '✓';
    color: var(--success-color);
}

/* Password strength meter */
.password-strength-meter {
    height: 4px;
    border-radius: 2px;
    background: #e1e1e1;
    margin-top: 10px;
    overflow: hidden;
    position: relative;
}

.password-strength-meter .strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-bar.weak { background-color: var(--error-color); }
.strength-bar.medium { background-color: #ffc107; }
.strength-bar.strong { background-color: var(--success-color); }

/* Password match indicator styles */
.password-match-indicator {
    height: 4px;
    border-radius: 2px;
    background: #e1e1e1;
    margin-top: 10px;
    overflow: hidden;
    position: relative;
}

.match-status {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.match-status.no-match { 
    background-color: var(--error-color);
    width: 100%;
}

.match-status.partial-match { 
    background-color: #ffc107;
    width: 100%;
}

.match-status.match { 
    background-color: var(--success-color);
    width: 100%;
}

.password-match-message {
    font-size: 0.85rem;
    margin-top: 5px;
    transition: all 0.3s ease;
}

/* Alert styles */
.alert-info {
    background-color: #e8f4f8;
    border-color: #b8e2ef;
    color: #0c5460;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    line-height: 1.5;
}

.alert-info .fas {
    margin-right: 0.75rem;
    color: #0c5460;
    font-size: 1.1em;
    margin-top: 0.2rem;
}

.modal.no-dismiss {
    backdrop-filter: blur(5px);
}

.modal.no-dismiss .modal-dialog {
    pointer-events: auto;
}

.modal.no-dismiss .close {
    display: none;
}

/* Modal footer styles */
.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

.modal-footer .text-muted {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 0.875rem;
}

.modal-footer .fas {
    margin-right: 0.5rem;
    color: #6c757d;
}

.password-match-message.match {
    color: var(--success-color);
}

.password-match-message.no-match {
    color: var(--error-color);
}

.password-match-message.partial-match {
    color: #ffc107;
}

/* Success animation */
@keyframes successCheck {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-animation {
    display: none;
    text-align: center;
    padding: 2rem;
}

.success-animation.show {
    display: block;
}

.success-animation i {
    color: #28a745;
    font-size: 3rem;
    animation: successCheck 0.5s ease-in-out forwards;
}

.success-animation h4 {
    margin-top: 1rem;
    color: var(--white);
}

.success-animation p {
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Reset Password Success Animation */
.reset-success-animation {
    display: none;
    text-align: center;
    padding: 2rem;
}

.reset-success-animation.show {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

.reset-success-animation i {
    color: #28a745;
    font-size: 3rem;
    animation: successCheck 0.5s ease-in-out forwards;
}

.reset-success-animation h4 {
    margin-top: 1rem;
    color: var(--white);
}

.reset-success-animation p {
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Styles moved from login.html */
/* System font stack as fallback */
.auth-title, .modal-title {
    font-family: 'Recoleta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: bold;
    font-display: swap;
}

.form-label, .auth-links a {
    font-family: 'Recoleta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    font-display: swap;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    background: transparent;
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 80%;
    color: var(--error-color);
}

.is-invalid ~ .invalid-feedback {
    display: block;
}

.form-control.is-invalid {
    border-color: var(--error-color);
    padding-right: calc(1.5em + 0.75rem);
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-text {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* Toast Notification Styles */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 350px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    font-size: 0.95rem;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-notification.toast-error {
    background-color: rgba(220, 53, 69, 0.95);
    border-left: 5px solid #bd2130;
}

.toast-notification.toast-success {
    background-color: rgba(40, 167, 69, 0.95);
    border-left: 5px solid #1e7e34;
}

.toast-notification.toast-info {
    background-color: rgba(0, 123, 255, 0.95);
    border-left: 5px solid #0062cc;
}

.toast-notification.toast-warning {
    background-color: rgba(255, 193, 7, 0.95);
    border-left: 5px solid #d39e00;
    color: #212529;
}

/* Terms of Service Checkbox and Link */
.custom-control-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.terms-link {
    color: rgba(0, 123, 255, 0.9);
    text-decoration: underline;
    transition: all 0.3s ease;
}

.terms-link:hover {
    color: #007bff;
    text-decoration: none;
}

.custom-control-input:checked ~ .custom-control-label::before {
    background-color: rgba(0, 123, 255, 0.9);
    border-color: rgba(0, 123, 255, 0.9);
}

.custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Modal nested - prevent multiple backdrops */
.modal.show + .modal {
    z-index: 1060;
}

.modal-backdrop + .modal-backdrop {
    z-index: 1055;
}

/* Auth Footer Styles */
.auth-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;
}

.auth-footer a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-family: 'Recoleta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.auth-footer a:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer-separator {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 0.75rem;
    font-size: 0.7rem;
}

/* Mobile responsive footer */
@media (max-width: 768px) {
    .auth-footer {
        padding: 1rem;
    }
    
    .auth-footer a {
        font-size: 0.9rem;
    }
}

/* Terms of Service, Cookies Policy, and Privacy Policy Modal Styles */
.modal-content.terms-of-service-modal,
.modal-content.cookies-policy-modal,
.modal-content.privacy-policy-modal {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.terms-of-service-modal .modal-header,
.cookies-policy-modal .modal-header,
.privacy-policy-modal .modal-header {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.08) 100%
    );
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terms-of-service-modal .modal-body,
.cookies-policy-modal .modal-body,
.privacy-policy-modal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

.terms-of-service-modal .modal-body::-webkit-scrollbar,
.cookies-policy-modal .modal-body::-webkit-scrollbar,
.privacy-policy-modal .modal-body::-webkit-scrollbar {
    width: 8px;
}

.terms-of-service-modal .modal-body::-webkit-scrollbar-track,
.cookies-policy-modal .modal-body::-webkit-scrollbar-track,
.privacy-policy-modal .modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.terms-of-service-modal .modal-body::-webkit-scrollbar-thumb,
.cookies-policy-modal .modal-body::-webkit-scrollbar-thumb,
.privacy-policy-modal .modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

/* Section styles for modals */
.terms-of-service-modal .terms-section,
.cookies-policy-modal .cookies-section,
.privacy-policy-modal .privacy-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-family: 'Recoleta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.terms-of-service-modal .terms-section h5,
.cookies-policy-modal .cookies-section h5,
.privacy-policy-modal .privacy-section h5 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    font-family: 'Recoleta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.terms-of-service-modal .terms-section h6,
.cookies-policy-modal .cookies-section h6,
.privacy-policy-modal .privacy-section h6 {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    font-weight: 500;
    margin: 1rem 0 0.5rem;
    font-family: 'Recoleta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.terms-of-service-modal .terms-section p,
.cookies-policy-modal .cookies-section p,
.privacy-policy-modal .privacy-section p {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    font-family: 'Recoleta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.terms-of-service-modal .terms-section ul,
.cookies-policy-modal .cookies-section ul,
.privacy-policy-modal .privacy-section ul {
    color: rgba(255, 255, 255, 0.75);
    font-family: 'Recoleta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.terms-of-service-modal .terms-section ul li,
.cookies-policy-modal .cookies-section ul li,
.privacy-policy-modal .privacy-section ul li {
    color: rgba(255, 255, 255, 0.75);
    padding: 0.4rem 0;
    line-height: 1.5;
    font-family: 'Recoleta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Contact info box */
.terms-of-service-modal .contact-info,
.cookies-policy-modal .contact-info,
.privacy-policy-modal .contact-info {
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.2);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
    font-family: 'Recoleta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.terms-of-service-modal .contact-info p,
.cookies-policy-modal .contact-info p,
.privacy-policy-modal .contact-info p {
    margin: 0.25rem 0;
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Recoleta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Modal footer */
.terms-of-service-modal .modal-footer,
.cookies-policy-modal .modal-footer,
.privacy-policy-modal .modal-footer {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.15) 100%
    );
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Links in privacy policy */
.privacy-policy-modal a,
.privacy-link {
    color: rgba(0, 123, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 123, 255, 0.3);
}

.privacy-policy-modal a:hover,
.privacy-link:hover {
    color: #007bff;
    border-bottom-color: #007bff;
}
