body {
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Prevent scrolling for app-like feel */
}

/* Top Progress Bar */
.progress-container {
    width: 100%;
    height: 4px;
    background-color: #222;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-color), var(--brand-color-light));
    width: 0%;
    /* Dynamic */
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 10px rgba(255, 106, 0, 0.5);
}

/* Header / Logo Area */
.header {
    padding: 2rem 3rem;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}

.logo {
    width: 60px;
    /* Adjust based on actual logo */
    height: auto;
    /* Placeholder for logo */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--brand-color);
    border-radius: 8px;
    padding: 10px;
    color: var(--brand-color);
    font-weight: 700;
    font-size: 0.8rem;
    text-align: center;
    line-height: 1;
    box-shadow: 0 0 15px rgba(255, 106, 0, 0.2);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

/* Question Container with Animations */
.question-container {
    max-width: 800px;
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: absolute;
    pointer-events: none;
    visibility: hidden;
}

.question-container.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
    position: relative;
}

/* Question Transition Animations */
.question-container.slide-out-up {
    transform: translateY(-50px);
    opacity: 0;
}

.question-container.slide-in-down {
    transform: translateY(-50px);
    opacity: 0;
    transition: none;
}

.question-container.slide-out-down {
    transform: translateY(50px);
    opacity: 0;
}

.question-container.slide-in-up {
    transform: translateY(50px);
    opacity: 0;
    transition: none;
}


.question-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--text-color);
    color: var(--bg-color);
    font-size: 0.9rem;
    font-weight: 700;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 5px;
}

.question-text {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.question-subtext {
    color: var(--muted-text);
    font-size: 1rem;
    margin-bottom: 2rem;
    padding-left: calc(24px + 1rem);
    /* Align with text */
}

/* Options & Inputs */
.options-list,
.text-input-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-left: calc(24px + 1rem);
    /* Align with text */
}

.text-answer-input,
.phone-answer-input {
    background-color: transparent;
    border: none;
    border-bottom: 2px solid var(--border-color);
    border-radius: 0;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 500;
    padding: 15px 0;
    width: 100%;
    transition: all 0.4s ease;
    outline: none;
}

.text-answer-input::placeholder,
.phone-answer-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
    font-weight: 400;
}

.text-answer-input:focus,
.phone-answer-input:focus {
    border-bottom-color: var(--brand-color);
    box-shadow: 0 10px 10px -10px rgba(255, 106, 0, 0.3);
}

/* Intl-Tel-Input Customization - Luxury Dark Theme */
.iti {
    width: 100%;
}

.iti__country-list {
    background-color: #000000 !important;
    border: 1px solid var(--border-color) !important;
    color: white !important;
    border-radius: 12px !important;
    padding: 10px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9) !important;
    margin-top: 10px !important;
    max-height: 300px !important;
    font-family: var(--font-main) !important;
}

/* Custom styling for the library's search input */
.iti__search-input {
    background-color: #050505 !important;
    color: white !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    padding: 12px 15px !important;
    margin-bottom: 10px !important;
    font-family: var(--font-main) !important;
    font-size: 0.9rem !important;
    outline: none !important;
}

.iti__search-input:focus {
    border-color: var(--brand-color) !important;
    box-shadow: 0 0 0 2px rgba(255, 106, 0, 0.2) !important;
}

/* Custom Scrollbar */
.iti__country-list::-webkit-scrollbar {
    width: 6px;
}

.iti__country-list::-webkit-scrollbar-track {
    background: #050505;
}

.iti__country-list::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

.iti__country-list::-webkit-scrollbar-thumb:hover {
    background: var(--brand-color);
}

.iti__country {
    padding: 12px 15px !important;
    transition: all 0.2s ease !important;
    border-radius: 6px !important;
    margin-bottom: 2px !important;
}

.iti__country:hover,
.iti__country.iti__highlight {
    background-color: rgba(255, 106, 0, 1) !important;
    color: white !important;
}

.iti__selected-country {
    background-color: #1a1a1a !important;
}

.iti__selected-dial-code {
    color: var(--brand-color) !important;
    font-weight: 600 !important;
    margin-left: 8px !important;
}

.iti__country-container {
    position: absolute;
    top: 0;
    left: 0px;
    bottom: 2px !important;
    padding: 0 !important;
}

.iti__country-name {
    font-size: 0.95rem !important;
}

.iti__arrow {
    border-top-color: var(--muted-text) !important;
    margin-left: 8px !important;
}

.iti__arrow--up {
    border-bottom-color: var(--muted-text) !important;
}

.iti--inline-dropdown .iti__dropdown-content {
    position: absolute;
    z-index: 2;
    margin-top: 3px;
    margin-left: calc(var(--iti-border-width) * -1);
    border: var(--iti-border-width) solid #3a3a3a !important;
    box-shadow: none !important;
    background-color: #000000 !important;
    padding: 10px !important;
    border-radius: 11px !important;
}

.option-item {
    background-color: var(--option-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.option-item:hover {
    background-color: var(--option-hover-bg);
    border-color: #444;
    transform: translateX(5px);
}

.option-item.selected {
    background-color: var(--option-selected-bg);
    border-color: var(--option-selected-border);
    box-shadow: 0 0 20px rgba(255, 106, 0, 0.1);
}

.option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: transparent;
    border: 1px solid var(--muted-text);
    color: var(--muted-text);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 15px;
    transition: all 0.3s ease;
}

.option-item:hover .option-letter {
    border-color: var(--text-color);
    color: var(--text-color);
}

.option-item.selected .option-letter {
    background-color: var(--brand-color);
    border-color: var(--brand-color);
    color: white;
}

.option-text {
    font-size: 1.1rem;
    font-weight: 500;
    flex-grow: 1;
}

/* OK Button */
.action-container {
    margin-top: 2rem;
    padding-left: calc(24px + 1rem);
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
    visibility: hidden;
}

.action-container.visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.btn-ok {
    background: linear-gradient(135deg, var(--brand-color), var(--brand-color-dark));
    color: white;
    border: none;
    padding: 12px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(238, 68, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-ok:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 68, 0, 0.5);
    background: linear-gradient(135deg, #ff7a1a, #ff5500);
}

.press-enter-hint {
    color: var(--muted-text);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Navigation Controls (Bottom Right) */
.nav-controls {
    position: fixed;
    bottom: 30px;
    right: 40px;
    display: flex;
    gap: 10px;
    z-index: 100;
}

.nav-btn {
    background-color: var(--brand-color);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.nav-btn:hover:not(:disabled) {
    background-color: var(--brand-color-dark);
    transform: translateY(-2px);
}

.nav-btn:disabled {
    background-color: #333;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
}

/* Custom Checkmark for selected option */
.check-icon {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
    color: var(--brand-color);
    font-size: 1.2rem;
}

.option-item.selected .check-icon {
    opacity: 1;
    transform: scale(1);
}

/* Custom Popup / Modal */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.custom-modal.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content-custom {
    background-color: #111;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 3rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.custom-modal.visible .modal-content-custom {
    transform: scale(1);
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
}

.modal-icon.success {
    color: var(--brand-color);
}

.modal-icon.error {
    color: #ff4444;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.modal-text {
    color: var(--muted-text);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.btn-modal {
    background: linear-gradient(135deg, var(--brand-color), var(--brand-color-dark));
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 106, 0, 0.4);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .header {
        padding: 1.5rem 1.5rem;
    }

    .logo {
        width: 50px;
        font-size: 0.7rem;
        padding: 8px;
    }

    .main-content {
        padding: 1.5rem;
        align-items: center;
        justify-content: center;
    }

    .question-text {
        font-size: 1.3rem;
    }

    .question-subtext {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
        padding-left: 0;
    }

    .question-header {
        gap: 0.75rem;
    }

    .options-list,
    .text-input-container {
        padding-left: 0;
    }

    .text-answer-input,
    .phone-answer-input {
        font-size: 1.1rem;
        padding: 12px 0;
    }

    .iti__selected-dial-code {
        font-size: 0.9rem !important;
    }

    .option-item {
        padding: 12px 15px;
    }

    .option-text {
        font-size: 0.95rem;
    }

    .option-letter {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
        margin-right: 10px;
    }

    .action-container {
        padding-left: 0;
        margin-top: 1.5rem;
    }

    .btn-ok {
        padding: 10px 25px;
        font-size: 1rem;
    }

    .nav-controls {
        bottom: 20px;
        right: 20px;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
    }
}