/* Core Layout */
:root {
    --primary: #3b82f6;
}

body {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    display: flex;
    justify-content: center;
    background-color: #f8fafc; /* slate-50 */
}

.dark body {
    background-color: #020617; /* slate-950 */
}

#app {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

/* Custom Scrollbar for Desktop visibility */
@media (min-width: 768px) {
    .no-scrollbar::-webkit-scrollbar {
        display: block;
        height: 4px;
    }
    .no-scrollbar::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.05);
        border-radius: 10px;
    }
    .dark .no-scrollbar::-webkit-scrollbar-track {
        background: rgba(255,255,255,0.05);
    }
    .no-scrollbar::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 10px;
        opacity: 0.5;
    }
}

/* Fix Modals for Desktop & Mobile centering */
#subs-modal, #contact-modal, #privacy-modal, #terms-modal, #complete-modal, #about-modal {
    width: calc(100% - 3rem);
    max-width: 400px;
    left: 50% !important;
    position: fixed;
    z-index: 210;
}

/* Bottom Sheet Modal (Subscription) */
#subs-modal {
    bottom: 0;
    left: 50% !important;
    transform: translateX(-50%) translateY(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
#subs-modal.modal-active {
    transform: translateX(-50%) translateY(0);
}

/* Center Modals (About, Contact, etc.) */
#contact-modal, #privacy-modal, #terms-modal, #complete-modal, #about-modal {
    top: 50% !important;
    transform: translateX(-50%) translateY(-40%) scale(0.95);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
    pointer-events: none;
}

#contact-modal.modal-active, #privacy-modal.modal-active, #terms-modal.modal-active, #complete-modal.modal-active, #about-modal.modal-active {
    transform: translateX(-50%) translateY(-50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* Subscription Active State */
.plan-card.active-plan {
    border-color: var(--primary) !important;
    background-color: rgba(59, 130, 246, 0.05);
}
.plan-card.active-plan .plan-radio-inner {
    transform: scale(1);
}

/* Custom Range */
.custom-range {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}
.dark .custom-range { background: rgba(255, 255, 255, 0.05); }
.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
}
