/* Match dropdown to input fields */
.input-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    background: #fff;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    margin-bottom: 8px;
}
.input-group select:focus {
    border-color: #3498db;
}
/* Spinner Loader Styles */
.spinner-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-container {
    margin-bottom: 40px;
}

.logo {
    height: 60px;
    width: auto;
}

.form-container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 100%;
    backdrop-filter: blur(10px);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Registration form specific styles */
#registerForm {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

#registerForm .modal-content-title {
    text-align: center;
    color: #2563eb;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 600;
}

#registerForm .input-group {
    margin-bottom: 0;
}

#registerForm .input-group label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
}

/* Checkbox styling */
#registerForm .checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 8px;
    text-align: left;
}

#registerForm .checkbox-group input[type="checkbox"] {
    margin-top: 2px;
    width: auto;
    min-width: 16px;
    height: 16px;
}

#registerForm .checkbox-group label {
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
}

.terms-link {
    color: #2563eb;
    text-decoration: underline;
    cursor: pointer;
}

.terms-link:hover {
    color: #1d4ed8;
}

.input-group {
    position: relative;
}

.input-group input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    outline: none;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    border-color: #2563eb;
}

.input-group input::placeholder {
    color: #9ca3af;
}

.login-btn, .submit-btn, .contact-btn, .ok-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn:hover, .submit-btn:hover, .contact-btn:hover, .ok-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.login-btn:disabled, .submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading button styles */
.submit-btn.loading {
    color: transparent;
    cursor: not-allowed;
    pointer-events: none;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.form-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.create-account, .need-help {
    color: #2563eb;
    text-decoration: underline;
    font-size: 14px;
    cursor: pointer;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.create-account:hover, .need-help:hover {
    color: #1d4ed8;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 20px 0;
    transition: opacity 0.3s ease;
}

.modal-content {
    background: white;
    margin: 20px auto;
    padding: 40px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.modal-logo {
    margin-bottom: 20px;
}

.modal-logo-img {
    height: 50px;
    width: auto;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #1f2937;
    font-size: 24px;
}

.modal-content p {
    margin-bottom: 30px;
    color: #6b7280;
    line-height: 1.6;
    font-size: 16px;
}

.contact-info {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.copy-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 2px solid #e5e7eb;
}

#supportEmail {
    font-weight: 600;
    color: #2563eb;
    font-size: 16px;
}

.copy-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.copy-btn:hover {
    background: #059669;
}

.copy-btn.copied {
    background: #22c55e;
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .form-container {
        padding: 30px 20px;
    }
    
    .modal-content {
        margin: 10px auto;
        padding: 30px 20px;
        width: 95%;
        max-height: calc(100vh - 20px);
    }
    
    .logo {
        height: 50px;
    }
    
    .modal-logo-img {
        height: 40px;
    }
    
    #registerForm {
        gap: 12px;
    }
    
    #registerForm .modal-content-title {
        font-size: 24px;
        margin-bottom: 16px;
    }
    
    .input-group input {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .submit-btn, .login-btn {
        padding: 14px;
        font-size: 15px;
    }
}

@media (max-height: 600px) {
    .modal-content {
        margin: 10px auto;
        max-height: calc(100vh - 20px);
        padding: 20px;
    }
    
    #registerForm .modal-content-title {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    #registerForm {
        gap: 10px;
    }
}

/* Form validation styles */
.input-group input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

.input-group input:valid {
    border-color: #10b981;
}

/* Animation for modals */
.modal.show {
    display: block;
    animation: fadeIn 0.4s ease;
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal.hide .modal-content {
    transform: scale(0.9);
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Smooth transitions between different modal contents */
.modal-transition-enter {
    opacity: 0;
    transform: translateX(20px);
    animation: slideIn 0.3s ease forwards;
}

.modal-transition-exit {
    opacity: 1;
    transform: translateX(0);
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

/* Enhanced input focus animations */
.input-group input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.input-group input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

/* Bottom Ribbon Marquee Styles */
.bottom-ribbon {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    z-index: 1000;
    overflow: hidden;
    height: 50px;
    display: flex;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.marquee {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-content {
    display: inline-block;
    animation: marquee 60s linear infinite;
    font-size: 16px;
    font-weight: 500;
    padding-left: 100%;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Responsive adjustments for marquee */
@media (max-width: 768px) {
    .bottom-ribbon {
        height: 45px;
    }
    
    .marquee-content {
        font-size: 14px;
        animation: marquee 25s linear infinite;
    }
}

@media (max-width: 480px) {
    .bottom-ribbon {
        height: 40px;
    }
    
    .marquee-content {
        font-size: 13px;
        animation: marquee 30s linear infinite;
    }
}

/* Add padding to body to account for fixed ribbon */
body {
    padding-bottom: 50px;
}