:root {
    --tg-theme-bg-color: #f8fafc;
    --tg-theme-button-color: #2563eb;
}

body {
    background-color: var(--tg-theme-bg-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.hero-gradient {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 0 0 24px 24px;
}

.tab-active {
    color: #2563eb;
    border-bottom: 3px solid #2563eb;
}

.tab-inactive {
    color: #94a3b8;
    border-bottom: 3px solid transparent;
}

#order-modal {
    transition: opacity 0.3s ease;
}

.modal-content-container {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(100%);
}

.modal-active .modal-content-container {
    transform: translateY(0%);
}

.product-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card:active {
    transform: scale(0.98);
}

input:focus,
textarea:focus,
select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
    outline: none;
}

.progress-subtext {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
}

.progress-container {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    height: 8px;
    margin: 8px 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.level-bar {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    width: 0%;
    height: 100%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reward-icon-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 20;
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    border: none;
}

.reward-box {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 18px;
    padding: 14px;
}

.claimed-reward-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 14px;
}

.order-card {
    background: white;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
    border: 1px solid #eef2f7;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-delivered {
    background: #dcfce7;
    color: #166534;
}

.qty-btn {
    width: 34px;
    height: 34px;
    border-radius: 9999px;
    background: #eff6ff;
    color: #2563eb;
    border: none;
    font-weight: 700;
}

.qty-value {
    min-width: 24px;
    text-align: center;
    font-weight: 700;
}

#checkout-bar {
    z-index: 40;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    pointer-events: auto;
}

#confirm-order-btn {
    pointer-events: auto;
    touch-action: manipulation;
}

#main-container {
    padding-bottom: 140px !important;
}

button {
    touch-action: manipulation;
}

.shop-filter-box {
    background: white;
    border-radius: 20px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
    margin-bottom: 16px;
}

.shop-search-input,
.shop-category-select {
    width: 100%;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 14px;
    background: #fff;
}

.category-block {
    margin-bottom: 18px;
}

.category-heading {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
    padding-left: 2px;
}

.empty-shop-box {
    background: white;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    text-align: center;
    color: #64748b;
}

.product-category-pill {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    background: #eff6ff;
    color: #1d4ed8;
}