html,
body {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    background-color: #181818;
    color: #ffffff;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Custom Panel Design - Dark cards popping over #181818 page background */
.glass-panel {
    background: #242424;
    border: 1px solid #2e2e2e;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
}

.pb-safe {
    padding-bottom: calc(env(safe-area-inset-bottom) + 16px);
}

.pt-safe {
    padding-top: calc(env(safe-area-inset-top) + 8px);
}

.qr-enter {
    animation: pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Interactive Elements */
.btn-active:active {
    transform: scale(0.97);
    transition: transform 0.1s;
}

.hover-effect {
    transition: all 0.2s ease;
}

.hover-effect:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: #ffffff;
}

/* Input Styling Override - Sharp Border for High Visibility */
input,
textarea,
select {
    background-color: #181818 !important;
    border: 1px solid #3f3f46 !important;
    color: #ffffff !important;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1) !important;
}

input::placeholder,
textarea::placeholder {
    color: #71717a;
    opacity: 0.8;
}

/* Tab Transitions */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Pickr Customization for Dark Theme */
.pcr-app {
    background: #242424 !important;
    border: 1px solid #3f3f46 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    border-radius: 16px !important;
    padding: 12px !important;
}

.pcr-interaction input {
    background: #181818 !important;
    color: #ffffff !important;
    border: 1px solid #3f3f46 !important;
    border-radius: 8px !important;
}

.pcr-app .pcr-swatches {
    margin-top: 8px !important;
    gap: 6px !important;
    justify-content: flex-start !important;
}

.pcr-app .pcr-swatches .pcr-swatch {
    border-radius: 8px !important;
    border: 1px solid #3f3f46 !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.pcr-app .pcr-swatches .pcr-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
}

/* Custom styling for Pickr buttons to look like presets */
.pcr-button {
    width: 24px !important;
    height: 24px !important;
    border-radius: 9999px !important;
    border: 1px solid #3f3f46 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    background: conic-gradient(from 0deg, red, yellow, green, cyan, blue, magenta, red) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.pcr-button:hover {
    transform: scale(1.08);
}

.pcr-button:active {
    transform: scale(0.9) !important;
}

/* Fix canvas-wrapper display */
#canvas-wrapper {
    display: none;
}

#canvas-wrapper.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Download success state */
@keyframes successPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

.btn-success {
    animation: successPulse 0.4s ease;
    background: #22c55e !important;
    border-color: #22c55e !important;
    color: #ffffff !important;
    box-shadow: 0 10px 20px -5px rgba(34, 197, 94, 0.3) !important;
}

/* Custom styled dot buttons active state */
.dot-btn-active {
    background-color: #ffffff !important;
    color: #000000 !important;
    font-weight: 700 !important;
}

/* ================= STANDARDIZED SPAC2 BRAND HEADER ================= */
.btn-back {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    color: #ffffff !important;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    flex-shrink: 0;
    font-size: 18px;
    padding: 0;
    box-sizing: border-box;
}

.btn-back i,
.btn-back svg {
    color: #ffffff !important;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff !important;
    transform: translateX(-2px);
    border-color: rgba(255, 255, 255, 0.45);
}

.btn-back:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.6);
    opacity: 0.85;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.15s ease;
    flex-shrink: 0;
}

.brand-link:hover {
    opacity: 0.92;
}

.brand-logo-card {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
    padding: 3.5px;
    box-sizing: border-box;
    transition: transform 0.2s ease;
}

.brand-link:hover .brand-logo-card {
    transform: scale(1.04);
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
    display: block;
}

.brand-text {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    line-height: 1;
    white-space: nowrap;
}

.brand-name {
    font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 19px;
    color: #ffffff;
    letter-spacing: -0.025em;
    line-height: 1;
}

.brand-divider {
    font-size: 14px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.4);
    opacity: 0.7;
    user-select: none;
}

.brand-app {
    font-size: 14px;
    font-weight: 600;
    color: #cbd5e1;
    letter-spacing: -0.01em;
    line-height: 1;
}

@media (max-width: 640px) {
    .btn-back {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 16px;
    }

    .brand-logo-card {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        padding: 3px;
    }

    .brand-name {
        font-size: 17px;
    }

    .brand-divider {
        font-size: 13px;
    }

    .brand-app {
        font-size: 13px;
    }
}