/* Signup Modal Styles */

/* Modal overlay and base styles */
#fresh-login-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0,0,0,0.4) !important;
    backdrop-filter: blur(20px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
    animation: fadeInOverlay 0.5s cubic-bezier(.4,0,.2,1) !important;
    pointer-events: auto !important;
    overflow-y: auto !important;
    padding: 2rem 1rem !important;
}

#fresh-login-modal {
    position: relative !important;
    padding: 2rem !important;
    background: rgba(101, 47, 202, 0.4) !important;
    box-shadow: 0 20px 60px 0 rgba(101, 47, 202, 0.4), 0 8px 32px 0 rgba(31, 38, 135, 0.37) !important;
    border-radius: 24px !important;
    border: 2px solid rgba(145, 93, 250, 0.5) !important;
    backdrop-filter: blur(25px) !important;
    width: 90vw !important;
    max-width: 900px !important;
    min-width: 320px !important;
    max-height: 85vh !important;
    margin: auto !important;
    display: block !important;
    animation: modalFadeIn 0.5s ease !important;
    pointer-events: auto !important;
    color: white !important;
    transform: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* Custom scrollbar for modal */
#fresh-login-modal::-webkit-scrollbar {
    width: 8px;
}

#fresh-login-modal::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

#fresh-login-modal::-webkit-scrollbar-thumb {
    background: rgba(145, 93, 250, 0.5);
    border-radius: 10px;
}

#fresh-login-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(145, 93, 250, 0.7);
}

.modal-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem auto;
    display: block;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Form switch tabs */
.form-switch {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.switch-btn {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(145, 93, 250, 0.3);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.switch-btn:hover {
    background: rgba(145, 93, 250, 0.2);
    border-color: rgba(145, 93, 250, 0.5);
    color: #ffffff;
}

.switch-btn.active {
    background: linear-gradient(135deg, #652fca, #915dfa);
    border-color: #915dfa;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(145, 93, 250, 0.4);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
}

.close-modal:hover {
    color: #ff4d00;
}

/* Form styles */
.modal-form-content {
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    transform: none !important;
    transition: opacity 0.3s ease !important;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.signup-form-content {
    max-width: 100% !important;
    width: 100% !important;
    transform: none !important;
    background: transparent !important;
}

.modal-form-content h2 {
    color: #ffffff !important;
    margin-bottom: 1.2rem;
    font-size: 1.6rem;
    font-weight: 600;
    text-align: center;
}

/* Remove hover tilt effect from style.css */
#fresh-login-modal .modal-form-content:hover {
    box-shadow: none !important;
    transform: none !important;
}

/* Floating label styles */
.floating-label {
    position: relative;
    margin-bottom: 1.2rem;
}

.floating-label input,
.floating-label textarea {
    width: 100% !important;
    padding: 1.2rem 1.2rem 0.6rem 1.2rem !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 2px solid rgba(145, 93, 250, 0.3) !important;
    border-radius: 12px !important;
    color: white !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    font-family: 'Rajdhani', sans-serif !important;
    box-sizing: border-box !important;
}

.floating-label textarea {
    min-height: 80px !important;
    resize: vertical !important;
}

.floating-label input:focus,
.floating-label textarea:focus {
    outline: none !important;
    border-color: #915dfa !important;
    background: rgba(0, 0, 0, 0.4) !important;
    box-shadow: 0 0 20px rgba(145, 93, 250, 0.3) !important;
}

.floating-label label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    transition: all 0.3s ease;
    pointer-events: none;
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label,
.floating-label textarea:focus + label,
.floating-label textarea:not(:placeholder-shown) + label {
    top: 0.3rem;
    font-size: 0.8rem;
    color: #915dfa !important;
    font-weight: 600 !important;
}

/* Signup row layout */
.signup-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
    margin-bottom: 0 !important;
    width: 100% !important;
}

.signup-row .floating-label {
    margin-bottom: 1.2rem !important;
}

/* Username and email status */
.username-status,
.email-status {
    font-size: 0.8rem;
    margin-top: 0.3rem;
    min-height: 1rem;
}

.username-available {
    color: #28a745;
}

.username-taken,
.username-error {
    color: #dc3545;
}

.username-suggestions {
    background: rgba(0,0,0,0.8);
    border-radius: 8px;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.suggestions-title {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 0.5rem;
}

.suggest-username {
    background: rgba(255,77,0,0.2);
    border: 1px solid #ff4d00;
    color: white;
    padding: 0.3rem 0.8rem;
    margin: 0.2rem;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.suggest-username:hover {
    background: #ff4d00;
}

/* Password requirements text */
.password-requirements-text {
    display: block;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    margin-top: 0.3rem;
    text-align: left;
    font-style: italic;
}

/* Password hint */
.pw-hint-icon {
    position: absolute;
    right: 1rem;
    top: 1rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-size: 1rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Password toggle button for login form */
.password-field-wrapper {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.9);
    cursor: pointer;
    padding: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    z-index: 10;
    opacity: 1;
}

.password-toggle-btn:hover {
    color: #915dfa;
}

.password-toggle-btn .eye-icon {
    width: 20px;
    height: 20px;
}

.pw-hint-tooltip {
    position: absolute;
    right: 0;
    top: 2.5rem;
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    width: 250px;
    z-index: 1000;
    display: none;
}

.pw-hint-tooltip ul {
    margin: 0;
    padding-left: 1rem;
}

/* Password and email ticks */
.pw-tick,
.cpw-tick {
    position: absolute;
    right: 1rem;
    top: 1rem;
}

/* Next button */
#next-step-btn,
#fresh-login-form button[type="submit"],
#fresh-signup-form button[type="submit"] {
    background: linear-gradient(135deg, #652fca, #915dfa) !important;
    color: white !important;
    border: none !important;
    padding: 0.9rem 2rem !important;
    border-radius: 30px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin-top: 1rem !important;
    margin-bottom: 0.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
    font-family: 'Rajdhani', sans-serif !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 8px 25px rgba(101, 47, 202, 0.3) !important;
    box-sizing: border-box !important;
}

/* Terms & Conditions button */
.tc-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(145, 93, 250, 0.4) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.8rem 1.5rem !important;
    border-radius: 25px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin-top: 1rem !important;
    margin-bottom: 0.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
    font-family: 'Rajdhani', sans-serif !important;
    box-sizing: border-box !important;
    display: block !important;
}

.tc-btn:hover {
    background: rgba(145, 93, 250, 0.2) !important;
    border-color: #915dfa !important;
}

.tc-btn.accepted {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    border-color: #28a745 !important;
    color: white !important;
}

.tc-error {
    color: #dc3545 !important;
    font-size: 0.85rem !important;
    margin-top: 0.5rem !important;
    display: none !important;
    text-align: center !important;
}

#next-step-btn:hover:not(:disabled),
#fresh-login-form button[type="submit"]:hover:not(:disabled),
#fresh-signup-form button[type="submit"]:hover:not(:disabled) {
    background: linear-gradient(135deg, #915dfa, #652fca) !important;
    box-shadow: 0 12px 35px rgba(145, 93, 250, 0.4) !important;
}

#next-step-btn:disabled {
    background: rgba(255,255,255,0.2) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

/* Membership selection */
.membership-selection {
    width: 100% !important;
}

.membership-options {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1.5rem !important;
    margin-top: 2rem !important;
    width: 100% !important;
}

.membership-btn {
    background: linear-gradient(135deg, rgba(101, 47, 202, 0.2), rgba(145, 93, 250, 0.1)) !important;
    border: 2px solid rgba(145, 93, 250, 0.4) !important;
    border-radius: 20px !important;
    padding: 2.5rem 2rem !important;
    color: white !important;
    cursor: pointer !important;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
    text-align: center !important;
    position: relative !important;
    overflow: hidden !important;
    transform: none !important;
}

.membership-btn:hover {
    background: linear-gradient(135deg, rgba(101, 47, 202, 0.4), rgba(145, 93, 250, 0.3)) !important;
    border-color: #915dfa !important;
    box-shadow: 0 15px 40px rgba(101, 47, 202, 0.4) !important;
    transform: none !important;
}

.membership-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.membership-btn h3 {
    margin: 1rem 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.membership-btn p {
    margin: 1rem 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.membership-price {
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    color: #915dfa !important;
    margin-top: 1.5rem !important;
    text-shadow: 0 2px 10px rgba(145, 93, 250, 0.3) !important;
}

/* Terms content */
.terms-content {
    max-height: 400px;
    overflow-y: auto;
    background: rgba(0,0,0,0.3);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    text-align: left;
}

.terms-list h4 {
    color: #ff4d00;
    margin-bottom: 1rem;
}

.terms-list ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.terms-list li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* Terms actions */
.terms-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.terms-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.accept-btn {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.accept-btn:hover {
    background: linear-gradient(45deg, #20c997, #28a745);
    box-shadow: 0 5px 15px rgba(40,167,69,0.4);
}

.decline-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.decline-btn:hover {
    background: rgba(220,53,69,0.8);
    border-color: #dc3545;
}

/* Success modal */
.success-modal-content {
    text-align: center;
    padding: 2rem;
}

.success-animation {
    margin-bottom: 2rem;
}

.checkmark-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(45deg, #28a745, #20c997);
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease-out;
}

.checkmark {
    width: 30px;
    height: 30px;
    border: 3px solid white;
    border-top: none;
    border-right: none;
    transform: rotate(-45deg);
    animation: checkmarkDraw 0.3s ease-out 0.2s both;
}

.success-message {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #28a745;
    font-weight: 600;
}

.next-steps {
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.5;
}

.success-btn {
    background: linear-gradient(45deg, #ff4d00, #ff6a2e);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.success-btn:hover {
    background: linear-gradient(45deg, #ff6a2e, #ff4d00);
    box-shadow: 0 5px 15px rgba(255,77,0,0.4);
}

/* Decline message */
.decline-message {
    text-align: center;
    padding: 2rem;
}

.decline-message h2 {
    color: #dc3545;
    margin-bottom: 1rem;
}

.decline-message p {
    margin-bottom: 2rem;
    line-height: 1.5;
}

.decline-ok-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.decline-ok-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Animations */
@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

@keyframes checkmarkDraw {
    from {
        width: 0;
        height: 0;
    }
    to {
        width: 30px;
        height: 15px;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #fresh-login-modal-overlay {
        padding: 1rem !important;
        align-items: flex-start !important;
    }
    
    #fresh-login-modal {
        min-width: 95vw !important;
        max-width: 95vw !important;
        width: 95vw !important;
        padding: 1.5rem 1rem !important;
        margin: 0 !important;
        max-height: 95vh !important;
    }
    
    .modal-logo {
        width: 80px !important;
        height: 80px !important;
        margin-bottom: 1rem !important;
    }
    
    .modal-form-content h2 {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .signup-row {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
    
    .floating-label {
        margin-bottom: 1.2rem !important;
    }
    
    .floating-label input,
    .floating-label textarea {
        padding: 1rem 1rem 0.5rem 1rem !important;
        font-size: 0.95rem !important;
    }
    
    #next-step-btn,
    #fresh-login-form button[type="submit"],
    #fresh-signup-form button[type="submit"] {
        padding: 0.9rem 2rem !important;
        font-size: 1rem !important;
        margin-top: 1rem !important;
    }
    
    .membership-options {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .membership-btn {
        padding: 1.5rem 1rem !important;
    }
    
    .terms-actions {
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .terms-btn {
        width: 100% !important;
        max-width: 200px !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #fresh-login-modal {
        width: 85vw !important;
        max-width: 750px !important;
    }
}

@media (min-width: 1025px) {
    #fresh-login-modal {
        width: 80vw !important;
        max-width: 900px !important;
    }
}

/* Enhanced field validation styles */
.floating-label input.input-valid {
    border-color: #28a745 !important;
    background: #28a745 !important;
    color: #000000 !important;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.2) !important;
}

.floating-label input.input-invalid {
    border-color: #dc3545 !important;
    background: #dc3545 !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.2) !important;
    animation: none;
}

.floating-label textarea.input-valid {
    border-color: #28a745 !important;
    background: #28a745 !important;
    color: #000000 !important;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.2) !important;
}

.floating-label textarea.input-invalid {
    border-color: #dc3545 !important;
    background: #dc3545 !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.2) !important;
    animation: none;
}

@keyframes shake {
    0%, 100% { }
    25% { }
    75% { }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Validation states */
.input-valid {
    border-color: #28a745 !important;
    background: #28a745 !important;
    color: #000000 !important;
}

.input-invalid {
    border-color: #dc3545 !important;
    background: #dc3545 !important;
    color: #ffffff !important;
}

.validation-message {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    display: inline-block;
}

.validation-success {
    background: #28a745;
    color: #000000;
    border: 1px solid #28a745;
}

.validation-error {
    background: #dc3545;
    color: #ffffff;
    border: 1px solid #dc3545;
}

/* Phone number specific styling */
.mobile-label input {
    letter-spacing: 1px;
}

/* Enhanced password requirements */
.pw-requirements {
    position: absolute;
    right: 0;
    top: 2.5rem;
    background: rgba(0,0,0,0.95);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    width: 280px;
    z-index: 1000;
    display: none;
    border: 1px solid rgba(145, 93, 250, 0.3);
}

.pw-requirements ul {
    margin: 0;
    padding-left: 1.2rem;
}

.pw-requirements li {
    margin-bottom: 0.4rem;
    transition: color 0.3s ease;
}

.pw-requirements li.valid {
    color: #28a745;
}

.pw-requirements li.invalid {
    color: rgba(255,255,255,0.6);
}