/* Register Multi-step Styles */
.register-step {
    display: none;
}

.register-step.active {
    display: block;
}

.step-info {
    margin-bottom: 30px;
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    color: #ec1b1b;
    margin-bottom: 10px;
    text-align: center;
}

.step-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 15px;
}

.step-progress {
    margin-top: 15px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ec1b1b 0%, #b91c1c 100%);
    transition: width 0.3s ease;
}

.step-text {
    text-align: right;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

.form-label {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    font-weight: 500;
}

/* Birthdate Container */
.birthdate-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

/* Custom Select Styles */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select {
    position: relative;
    width: 100%;
    user-select: none;
}

.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    font-size: 14px;
    color: #6b7280;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(236, 27, 27, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-select-trigger:hover {
    border-color: rgba(236, 27, 27, 0.4);
    background-color: rgba(255, 255, 255, 1);
}

.custom-select.open .custom-select-trigger {
    border-color: #ec1b1b;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(236, 27, 27, 0.15);
}

.custom-select-trigger span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-trigger.selected {
    color: #1f2937;
}

.custom-select-arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.custom-select.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: #2d3748;
    border: 1px solid rgba(236, 27, 27, 0.3);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.custom-select.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-option {
    padding: 12px 14px;
    font-size: 14px;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-select-option:hover {
    background: rgba(236, 27, 27, 0.2);
    color: #ffffff;
}

.custom-select-option.selected {
    background: rgba(236, 27, 27, 0.3);
    color: #ff5252;
    font-weight: 500;
}

/* Custom Scrollbar */
.custom-select-options::-webkit-scrollbar {
    width: 6px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: #1a202c;
    border-radius: 4px;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

@media (max-width: 480px) {
    .birthdate-container {
        gap: 8px;
    }
    
    .custom-select-trigger {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    .custom-select-arrow {
        width: 16px;
        height: 16px;
    }
    
    .custom-select-option {
        padding: 10px 12px;
        font-size: 13px;
    }
}

.register-form {
    margin-bottom: 20px;
}

/* ==================== TERMS CHECKBOX ==================== */
.terms-checkbox-section {
    margin: 20px 0;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    position: relative;
    padding-left: 32px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    line-height: 1.6;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 20px;
    width: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(236, 27, 27, 0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-container:hover input ~ .checkmark {
    background: rgba(236, 27, 27, 0.1);
    border-color: rgba(236, 27, 27, 0.5);
}

.checkbox-container input:checked ~ .checkmark {
    background: linear-gradient(135deg, #ff5252 0%, #ec1b1b 100%);
    border-color: #ec1b1b;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
}

.terms-link {
    color: #ff5252;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.terms-link:hover {
    color: #ec1b1b;
    text-decoration: underline;
}

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


/* Fix icon position when label exists */
.register-form .form-group {
    position: relative;
}

.register-form .input-icon {
    position: absolute;
    right: 18px;
    top: calc(50% + 11px);
    transform: translateY(-50%);
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    width: 20px;
    height: 20px;
}

.register-form .input-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.register-form .toggle-password {
    cursor: pointer;
    pointer-events: auto;
    transition: color 0.2s ease;
}

.register-form .toggle-password:hover {
    color: #4a90e2;
}

.otp-reference {
    text-align: center;
    margin: -5px 0 15px 0;
}

.otp-reference small {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.otp-reference span {
    font-weight: 600;
    color: #4a90e2;
}

.btn-resend {
    width: 100%;
    padding: 10px;
    background: transparent;
    color: #4a90e2;
    border: 1px solid #4a90e2;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Prompt', sans-serif;
    cursor: pointer;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.btn-resend:hover {
    background: #4a90e2;
    color: white;
}

.btn-resend:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Success Popup */
.success-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

.success-popup.show {
    display: flex;
}

.success-popup-content {
    background: white;
    padding: 35px 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideDown 0.3s ease;
    text-align: center;
}

.success-popup-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 0.5s ease;
    flex-shrink: 0;
}

.success-popup-icon svg {
    width: 34px;
    height: 34px;
    color: white;
}

.success-popup-message {
    font-size: 15px;
    color: #374151;
    line-height: 1.8;
    margin-bottom: 24px;
    font-weight: 400;
    white-space: pre-line;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.success-popup-btn {
    width: 100%;
    padding: 14px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Prompt', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.success-popup-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.success-popup-btn:active {
    background: #047857;
    transform: translateY(0);
}

/* Success Icon Large (for step 4) */
.success-icon-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 0.5s ease;
}

.success-icon-large svg {
    width: 40px;
    height: 40px;
    color: white;
}

/* Responsive Popup for Mobile */
@media (max-width: 480px) {
    .success-popup {
        padding: 15px;
    }
    
    .success-popup-content {
        padding: 30px 25px;
        max-width: 100%;
        border-radius: 12px;
    }
    
    .success-popup-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 20px;
    }
    
    .success-popup-icon svg {
        width: 30px;
        height: 30px;
    }
    
    .success-popup-message {
        font-size: 14px;
        line-height: 1.7;
        margin-bottom: 20px;
    }
    
    .success-popup-btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .success-icon-large {
        width: 64px;
        height: 64px;
    }
    
    .success-icon-large svg {
        width: 32px;
        height: 32px;
    }
}

/* ==================== TERMS MODAL ==================== */
.terms-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.terms-modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.terms-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.terms-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    z-index: 1;
}

.terms-modal-header {
    padding: 28px 32px 24px;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    flex-shrink: 0;
}

.terms-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 4px 0;
    text-align: center;
}

.terms-modal-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    text-align: center;
}

.terms-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 32px;
    height: 32px;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.terms-modal-close svg {
    width: 18px;
    height: 18px;
    color: #6b7280;
}

.terms-modal-close:hover {
    background: #e5e7eb;
}

.terms-modal-close:hover svg {
    color: #374151;
}

.terms-modal-body {
    padding: 24px 32px;
    overflow-y: auto;
    flex: 1;
}

.terms-modal-body::-webkit-scrollbar {
    width: 8px;
}

.terms-modal-body::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 10px;
}

.terms-modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    border-radius: 10px;
}

.terms-modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.terms-modal-body {
    scrollbar-width: thin;
    scrollbar-color: #60a5fa #f3f4f6;
}

.terms-section-modal {
    margin-bottom: 24px;
}

.terms-section-modal:last-of-type {
    margin-bottom: 0;
}

.terms-section-modal h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px 0;
}

.terms-section-modal p {
    font-size: 14px;
    line-height: 1.7;
    color: #4b5563;
    margin: 0 0 8px 0;
}

.terms-section-modal p:last-child {
    margin-bottom: 0;
}

.terms-section-modal.warning-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    padding: 20px;
    border-radius: 12px;
}

.terms-section-modal.warning-section h3 {
    color: #b45309;
    font-size: 17px;
}

.terms-section-modal.warning-section .warning-intro {
    background: rgba(255, 255, 255, 0.6);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #fbbf24;
}

.terms-section-modal.warning-section p strong {
    color: #92400e;
}

.terms-modal-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.terms-update {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
    text-align: center;
}

.terms-modal-buttons {
    padding: 20px 32px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.terms-modal-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Prompt', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.terms-decline {
    background: #f3f4f6;
    color: #6b7280;
}

.terms-decline:hover {
    background: #e5e7eb;
    color: #374151;
}

.terms-accept {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: white;
}

.terms-accept:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

/* Responsive Terms Modal */
@media (max-width: 768px) {
    .terms-modal-header {
        padding: 24px 24px 20px;
    }

    .terms-modal-title {
        font-size: 20px;
    }

    .terms-modal-subtitle {
        font-size: 12px;
    }

    .terms-modal-close {
        top: 20px;
        right: 20px;
        width: 28px;
        height: 28px;
    }

    .terms-modal-close svg {
        width: 16px;
        height: 16px;
    }

    .terms-modal-body {
        padding: 20px 24px;
    }

    .terms-section-modal h3 {
        font-size: 15px;
    }

    .terms-section-modal p {
        font-size: 13px;
    }

    .terms-section-modal.warning-section {
        padding: 16px;
    }

    .terms-section-modal.warning-section h3 {
        font-size: 16px;
    }

    .terms-section-modal.warning-section .warning-intro {
        padding: 10px 14px;
        font-size: 13px;
    }

    .terms-modal-buttons {
        padding: 16px 24px;
        gap: 10px;
    }

    .terms-modal-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .terms-modal {
        padding: 15px;
    }

    .terms-modal-content {
        border-radius: 16px;
    }

    .terms-modal-header {
        padding: 20px 20px 16px;
    }

    .terms-modal-title {
        font-size: 18px;
        padding-right: 30px;
    }

    .terms-modal-body {
        padding: 16px 20px;
    }

    .terms-section-modal {
        margin-bottom: 20px;
    }

    .terms-section-modal h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .terms-section-modal p {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .terms-section-modal.warning-section {
        padding: 14px;
    }

    .terms-section-modal.warning-section h3 {
        font-size: 14px;
    }

    .terms-section-modal.warning-section .warning-intro {
        padding: 10px 12px;
        font-size: 12px;
    }

    .terms-modal-buttons {
        padding: 14px 20px;
        flex-direction: column;
    }

    .terms-modal-btn {
        width: 100%;
    }
}

