/* ── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --bg: #0f0f0f;
    --card: #1a1a1a;
    --card-hover: #222222;
    --accent: #6c5ce7;
    --accent-rgb: 108, 92, 231;
    --text: #f0f0f0;
    --text-secondary: #999;
    --border: #2a2a2a;
    --radius: 14px;
    --transition: 0.3s ease;
}
html { font-size: 16px; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ── Gradient background ────────────────────────────────── */
#gradient-bg {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(var(--accent-rgb), 0.32) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 20% 20%, rgba(var(--accent-rgb), 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 50% 35% at 80% 10%, rgba(var(--accent-rgb), 0.14) 0%, transparent 50%);
}

/* ── App container ───────────────────────────────────── */
#app {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px 100px;
    min-height: 100vh;
}

/* ── Header ──────────────────────────────────────────── */
#header { padding: 20px 0 8px; text-align: center; }
#shop-name { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }

/* ══════════════════════════════════════════════════════════
   SEARCH BAR
   ══════════════════════════════════════════════════════════ */
#search-wrap {
    position: relative;
    margin-bottom: 14px;
}
#search-wrap.hidden { display: none; }
.search-icon {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    color: var(--text-secondary);
    pointer-events: none;
}
#search-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition), background var(--transition);
}
#search-input::placeholder { color: var(--text-secondary); }
#search-input:focus {
    border-color: rgba(var(--accent-rgb), 0.4);
    background: rgba(255,255,255,0.08);
}

/* ══════════════════════════════════════════════════════════
   BREADCRUMB — pill/chip style navigation
   ══════════════════════════════════════════════════════════ */
#breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0 14px;
    overflow-x: auto;
    white-space: nowrap;
}
#breadcrumb::-webkit-scrollbar { display: none; }
#breadcrumb.hidden { display: none; }

.bc-back {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 12px;
    background: rgba(255,255,255,0.07); cursor: pointer; flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.08);
    transition: background var(--transition);
}
.bc-back:hover { background: rgba(255,255,255,0.12); }
.bc-back:active { transform: scale(0.95); }
.bc-back svg { width: 16px; height: 16px; stroke: var(--text); stroke-width: 2.5; }

#bc-trail {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bc-item {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.06);
    transition: all var(--transition);
}
.bc-item:hover {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
}
.bc-item.active {
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--text);
    border-color: rgba(var(--accent-rgb), 0.25);
    font-weight: 600;
}

.bc-sep {
    color: rgba(255,255,255,0.2);
    flex-shrink: 0;
    font-size: 0.75rem;
}

/* ── Loading ─────────────────────────────────────────── */
.loading { display: flex; justify-content: center; padding: 60px 0; }
.spinner {
    width: 28px; height: 28px;
    border: 2px solid rgba(255,255,255,0.1); border-top-color: var(--accent);
    border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Section titles ──────────────────────────────────── */
.section-title { font-size: 1rem; font-weight: 600; margin: 20px 0 12px; color: rgba(255,255,255,0.85); }

/* ── Category grid (home) ────────────────────────────── */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat-card {
    background: rgba(255,255,255,0.05); border-radius: 14px;
    padding: 12px 6px 10px; cursor: pointer; text-align: center;
    border: 1px solid rgba(255,255,255,0.06);
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.cat-card:hover {
    background: rgba(255,255,255,0.10); transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35); border-color: rgba(var(--accent-rgb), 0.15);
}
.cat-card:active { transform: scale(0.96); }
.cat-logo-wrap { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; margin-bottom: 2px; }
.cat-logo { width: 100%; height: 100%; background-size: contain; background-position: center; background-repeat: no-repeat; border-radius: 12px; }
.cat-logo-placeholder { width: 56px; height: 56px; border-radius: 12px; background: rgba(255,255,255,0.08); }
.cat-name { font-size: 0.78rem; font-weight: 600; line-height: 1.2; }
.cat-count { font-size: 0.68rem; color: var(--text-secondary); }

/* ══════════════════════════════════════════════════════════
   POPULAR SECTION — vertical list
   ══════════════════════════════════════════════════════════ */
.popular-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.popular-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.06);
    transition: background var(--transition), transform 0.15s ease;
}
.popular-item:hover {
    background: rgba(255,255,255,0.08);
    transform: translateX(2px);
}
.popular-item:active { transform: scale(0.98); }
.popular-item-img {
    width: 40px; height: 40px;
    border-radius: 10px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    background-color: rgba(var(--accent-rgb), 0.08);
}
.popular-item-info { flex: 1; min-width: 0; }
.popular-item-name {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.popular-item-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.popular-item-price {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}
.popular-item-arrow {
    width: 20px; height: 20px;
    flex-shrink: 0;
    color: var(--text-secondary);
}
.popular-item-arrow svg { width: 100%; height: 100%; }

/* ══════════════════════════════════════════════════════════
   CATEGORY PAGE — Item cards grid
   ══════════════════════════════════════════════════════════ */

/* ── Category header ─────────────────────────────────── */
.cat-header { display: flex; align-items: center; gap: 12px; padding: 4px 0 14px; flex-wrap: wrap; }
.cat-header-logo { width: 34px; height: 34px; background-size: contain; background-position: center; background-repeat: no-repeat; flex-shrink: 0; border-radius: 8px; }
.cat-header-info { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.cat-header-name { font-size: 1.1rem; font-weight: 700; }
.cat-header-count { font-size: 0.72rem; color: var(--text-secondary); }
/* ── Sort dropdown ── */
.sort-wrap { flex-shrink: 0; }
.sort-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 28px 6px 10px;
    font-size: 0.72rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' fill='none' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: border-color var(--transition);
}
.sort-select:focus { border-color: var(--accent); }
.sort-select option { background: var(--card); color: var(--text); }

/* ── Region filter tabs ──────────────────────────────── */
.region-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.region-tabs::-webkit-scrollbar { display: none; }
.region-tab {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background: var(--card);
    border: 1px solid var(--border);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    user-select: none;
    -webkit-user-select: none;
}
.region-tab:hover {
    background: var(--card-hover);
    border-color: rgba(var(--accent-rgb), 0.3);
}
.region-tab.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* ── Items grid (2 columns) ──────────────────────────── */
.items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.item-card {
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.06);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 36px rgba(0,0,0,0.5);
    border-color: rgba(var(--accent-rgb), 0.3);
}
.item-card:active { transform: scale(0.97); }

/* Image area */
.item-card-img {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.06), rgba(0,0,0,0.4));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.item-card-img::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}
/* Real product image — contain so the full image is always visible */
.item-card-img img.item-photo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0; left: 0;
    z-index: 0;
}
/* Logo fallback — div with background-image, never shows broken X */
.item-card-img .item-logo-bg {
    width: 100%;
    height: 100%;
    background-size: 40%;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}
.item-card-img .item-img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1), rgba(var(--accent-rgb), 0.03));
}

/* Delivery badge (top-right corner of image) */
.item-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.item-badge.auto_id {
    background: rgba(0, 200, 83, 0.2);
    color: #66ffb2;
    border: 1px solid rgba(0, 200, 83, 0.25);
}
.item-badge.auto_voucher {
    background: rgba(108, 92, 231, 0.2);
    color: #b4a0ff;
    border: 1px solid rgba(108, 92, 231, 0.25);
}

/* Region flag badge (top-left corner) */
.region-flag {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    font-size: 1.1rem;
    line-height: 1;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}
.region-flag-detail {
    font-size: 1.4rem;
    top: 12px;
    left: 12px;
}

/* Info area at bottom of card */
.item-card-info {
    padding: 10px 11px 12px;
}
.item-card-name {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}
.item-card:hover .item-card-name { color: var(--accent); }

.item-card-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.3;
    margin-top: 2px;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.item-card-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent);
}
.item-card-price.dynamic {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.item-card-arrow {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.item-card-arrow svg {
    width: 10px;
    height: 10px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2.5;
}

/* ══════════════════════════════════════════════════════════
   PRODUCT DETAIL PAGE
   ══════════════════════════════════════════════════════════ */

.product-detail { animation: fadeIn 0.2s ease; }
.detail-img {
    width: 100%; aspect-ratio: 3/4; border-radius: var(--radius); overflow: hidden;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.06), rgba(0,0,0,0.3));
    margin-bottom: 16px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,0.06);
    position: relative;
}
.detail-img img.detail-photo { width: 100%; height: 100%; object-fit: contain; position: absolute; top: 0; left: 0; z-index: 0; }
.detail-img .detail-logo-bg {
    width: 100%; height: 100%;
    background-size: 30%; background-position: center; background-repeat: no-repeat;
}
.detail-img-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1), rgba(var(--accent-rgb), 0.03));
}

/* Detail delivery badge */
.detail-delivery {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.detail-delivery.auto_id {
    background: rgba(0, 200, 83, 0.12);
    color: #66ffb2;
}
.detail-delivery.auto_voucher {
    background: rgba(108, 92, 231, 0.12);
    color: #b4a0ff;
}

.detail-cat { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 4px; }
.detail-name { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; line-height: 1.25; }
.detail-price { font-size: 1.7rem; font-weight: 700; color: var(--accent); margin-bottom: 12px; }
.detail-price.dynamic { font-size: 1rem; color: var(--text-secondary); font-weight: 500; }
.detail-desc {
    font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6;
    padding: 12px 14px; border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

/* ── Sticky bottom button ────────────────────────────── */
#sticky-btn {
    position: fixed; bottom: 0; left: 0; right: 0;
    padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: linear-gradient(transparent, var(--bg) 30%); z-index: 100;
}
#sticky-btn.hidden { display: none; }
.btn-primary {
    display: block; width: 100%; max-width: 480px; margin: 0 auto; padding: 14px;
    background: var(--accent); color: #fff; border: none; border-radius: var(--radius);
    font-size: 1rem; font-weight: 600; cursor: pointer; font-family: inherit;
    transition: filter var(--transition), transform 0.15s ease;
    box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.3);
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: none;
    transform: none;
    box-shadow: none;
}

/* ── Empty / Error states ────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
.empty-state .emoji-big { font-size: 3rem; margin-bottom: 12px; }
.error-state { text-align: center; padding: 60px 20px; color: #e74c3c; }

/* ══════════════════════════════════════════════════════════
   STEAM TOP-UP FORM
   ══════════════════════════════════════════════════════════ */
.steam-form {
    animation: fadeIn 0.25s ease;
    padding: 4px 0;
}
.steam-form-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}
.steam-form-logo {
    width: 44px; height: 44px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}
.steam-form-title {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
}
.steam-form-group {
    margin-bottom: 20px;
}
.steam-form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin-bottom: 8px;
    display: block;
}

/* Input wrap with icon */
.steam-input-wrap {
    position: relative;
}
.steam-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    pointer-events: none;
    z-index: 1;
}
.steam-form-input {
    width: 100%;
    padding: 15px 14px;
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition), background var(--transition);
}
.steam-form-input.has-icon {
    padding-left: 42px;
}
.steam-form-input::placeholder { color: var(--text-secondary); }
.steam-form-input:focus {
    border-color: rgba(var(--accent-rgb), 0.5);
    background: rgba(255,255,255,0.08);
}
.steam-form-input.error {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.06);
}
.steam-form-input.valid {
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.06);
}
.steam-form-hint {
    font-size: 0.72rem;
    color: #e74c3c;
    margin-top: 4px;
    display: none;
}
.steam-form-hint.visible { display: block; }

/* "Где взять логин?" button */
.steam-login-help-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent);
    transition: background var(--transition);
}
.steam-login-help-btn:hover {
    background: rgba(var(--accent-rgb), 0.25);
}

/* Login tooltip popup */
.steam-login-tooltip {
    margin-top: 10px;
    padding: 14px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    animation: fadeIn 0.2s ease;
}
.steam-login-tooltip.hidden { display: none; }
.steam-tooltip-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}
.steam-tooltip-close:hover { color: var(--text); }
.steam-tooltip-img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 10px;
}
.steam-tooltip-text {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.5;
}
.steam-tooltip-text a {
    color: var(--accent);
    text-decoration: underline;
    font-weight: 600;
}

/* Currency chips — accent-tinted */
.steam-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.steam-chip {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid rgba(var(--accent-rgb), 0.15);
    background: rgba(var(--accent-rgb), 0.06);
    color: rgba(255,255,255,0.65);
    transition: background var(--transition), border-color var(--transition), color var(--transition);
    user-select: none;
    -webkit-user-select: none;
}
.steam-chip:hover {
    background: rgba(var(--accent-rgb), 0.12);
    color: rgba(255,255,255,0.85);
}
.steam-chip.active {
    background: rgba(var(--accent-rgb), 0.22);
    color: var(--text);
    border-color: rgba(var(--accent-rgb), 0.5);
}
/* Prevent flag emoji from pixelating on state changes */
.steam-chip-flag {
    display: inline-block;
    font-style: normal;
    -webkit-font-smoothing: auto;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: auto;
}

/* Amount preset chips — accent-tinted */
.steam-amount-chips {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}
.steam-amount-chip {
    padding: 12px 4px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid rgba(var(--accent-rgb), 0.15);
    background: rgba(var(--accent-rgb), 0.06);
    color: rgba(255,255,255,0.65);
    transition: all var(--transition);
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
}
.steam-amount-chip:hover {
    background: rgba(var(--accent-rgb), 0.12);
    color: rgba(255,255,255,0.85);
}
.steam-amount-chip.active {
    background: rgba(var(--accent-rgb), 0.22);
    color: var(--text);
    border-color: rgba(var(--accent-rgb), 0.5);
}

/* Sublabel (min/max hint) */
.steam-form-sublabel {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* FAQ accordion */
.steam-faq {
    margin-top: 12px;
    padding-bottom: 8px;
}
.steam-faq-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}
.steam-faq-subtitle {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 12px 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.steam-faq-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    margin-bottom: 8px;
    overflow: hidden;
}
.steam-faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 14px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: background var(--transition);
}
.steam-faq-q:hover { background: rgba(255,255,255,0.04); }
.steam-faq-q span:first-child {
    font-size: 0.84rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    line-height: 1.3;
}
.steam-faq-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: transform var(--transition), background var(--transition), color var(--transition);
}
.steam-faq-item.open .steam-faq-icon {
    transform: rotate(45deg);
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent);
}
.steam-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 14px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.55;
}
.steam-faq-a b {
    color: rgba(255,255,255,0.8);
}
.steam-faq-item.open .steam-faq-a {
    max-height: 600px;
    padding: 4px 14px 14px;
}

/* ══════════════════════════════════════════════════════════
   TELEGRAM TOP-UP FORM
   ══════════════════════════════════════════════════════════ */
.tg-form {
    animation: fadeIn 0.25s ease;
    padding: 4px 0;
}

/* Username input with avatar */
.tg-username-wrap {
    position: relative;
}
.tg-username-input {
    padding-right: 14px !important;
    transition: padding-right 0.3s ease, border-color var(--transition), background var(--transition);
}
.tg-username-wrap.has-avatar .tg-username-input {
    padding-right: 56px !important;
}
.tg-avatar-slot {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}
.tg-avatar-slot.has-photo {
    opacity: 1;
}
.tg-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.tg-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--accent-rgb), 0.25);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 50%;
}

/* Username status text */
.tg-username-status {
    font-size: 0.75rem;
    margin-top: 4px;
    min-height: 1em;
    transition: color 0.2s ease;
}
.tg-username-status:empty { margin-top: 0; }
.tg-username-status.checking {
    color: var(--text-secondary);
    animation: tg-checking-pulse 1.5s ease-in-out infinite;
}
@keyframes tg-checking-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
.tg-username-status.found {
    color: #66ffb2;
    font-weight: 500;
}
.tg-username-status.not-found {
    color: #e74c3c;
}

/* Tab switcher */
.tg-tabs {
    display: flex;
    gap: 8px;
}
.tg-tab {
    flex: 1;
    text-align: center;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid rgba(var(--accent-rgb), 0.15);
    background: rgba(var(--accent-rgb), 0.06);
    color: rgba(255,255,255,0.6);
    transition: background var(--transition), border-color var(--transition), color var(--transition);
    user-select: none;
    -webkit-user-select: none;
}
.tg-tab:hover {
    background: rgba(var(--accent-rgb), 0.12);
    color: rgba(255,255,255,0.85);
}
.tg-tab.active {
    background: rgba(var(--accent-rgb), 0.22);
    color: var(--text);
    border-color: rgba(var(--accent-rgb), 0.5);
}

/* Stars price display */
.tg-stars-price {
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    text-align: center;
}
.tg-stars-price:empty { display: none; }

/* Star icon (webp) */
.tg-star-inline {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.1em;
    object-fit: contain;
}
.tg-star-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}
.tg-tab .tg-star-inline {
    width: 1.1em;
    height: 1.1em;
    vertical-align: -0.15em;
}
.steam-form-sublabel .tg-star-inline {
    width: 0.9em;
    height: 0.9em;
}
.tg-stars-price .tg-star-inline {
    width: 1.1em;
    height: 1.1em;
    vertical-align: -0.15em;
}

/* Premium warning note */
.tg-premium-note {
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 193, 7, 0.08);
    border: 1px solid rgba(255, 193, 7, 0.2);
    font-size: 0.78rem;
    color: rgba(255, 193, 7, 0.9);
    line-height: 1.4;
    margin-bottom: 14px;
}

/* Section toggle animation */
.tg-section {
    animation: fadeIn 0.2s ease;
}

/* Premium plan cards — standard item-card with selection */
.tg-plan-card.tg-selected {
    border-color: rgba(var(--accent-rgb), 0.6) !important;
    box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.25);
    transform: translateY(-3px);
}
.tg-plan-card.tg-selected .item-card-name {
    color: var(--accent);
}
.tg-plan-card.tg-selected .item-card-arrow {
    background: rgba(var(--accent-rgb), 0.35);
}

/* Sticker container inside plan card image */
.tg-plan-sticker {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.tg-plan-sticker svg {
    width: 70% !important;
    height: 70% !important;
}

/* Emoji fallback (shown until lottie loads) */
.tg-plan-emoji {
    font-size: 3.5rem;
    line-height: 1;
    animation: tg-emoji-float 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.3));
}
.tg-plan-card:nth-child(2) .tg-plan-emoji { animation-delay: -1s; }
.tg-plan-card:nth-child(3) .tg-plan-emoji { animation-delay: -2s; }
@keyframes tg-emoji-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.08); }
}

/* ── Orders Button on Home ────────────────────────────── */
.orders-btn-wrap {
    margin: 16px 0 8px;
}
.btn-orders {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.02em;
}
.btn-orders:hover {
    background: var(--card-hover);
    border-color: var(--accent);
}

/* ── Orders List ──────────────────────────────────────── */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.order-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    transition: var(--transition);
    cursor: pointer;
}
.order-card:hover {
    border-color: var(--accent);
}
.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.order-card-uid {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-family: monospace;
}
.order-card-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}
.order-card-status.delivered {
    background: rgba(0, 184, 148, 0.15);
    color: #00b894;
}
.order-card-status.pending {
    background: rgba(253, 203, 110, 0.15);
    color: #fdcb6e;
}
.order-card-status.cancelled {
    background: rgba(214, 48, 49, 0.15);
    color: #d63031;
}
.order-card-body {
    margin-bottom: 4px;
}
.order-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.order-card-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.order-card-date {
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.order-card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}
.order-card-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.order-detail-row {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.order-detail-label {
    color: var(--text);
}
.order-detail-code {
    background: rgba(255,255,255,0.08);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.82rem;
    word-break: break-all;
}
.order-card.expanded {
    border-color: var(--accent);
}

/* ── Order Review ─────────────────────────────────────── */
.order-card-review {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.order-review-stars {
    color: #fdcb6e;
    font-size: 1rem;
    margin-bottom: 4px;
    letter-spacing: 2px;
}
.order-review-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
.order-card-review-prompt {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.btn-review {
    width: 100%;
    padding: 8px 16px;
    border: 1px dashed var(--accent);
    border-radius: 10px;
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}
.btn-review:hover {
    background: rgba(var(--accent-rgb), 0.15);
}

/* ── Review Form ──────────────────────────────────────── */
.review-form {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.review-form-order {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-family: monospace;
}
.review-form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.review-stars-select {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.review-star {
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    user-select: none;
}
.review-star.active,
.review-star:hover {
    color: #fdcb6e;
    transform: scale(1.15);
}
.review-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    color: var(--text);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    resize: vertical;
    margin-bottom: 16px;
    box-sizing: border-box;
    transition: var(--transition);
}
.review-textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.review-submit {
    width: 100%;
}
.review-submit.success {
    background: #00b894 !important;
    border-color: #00b894 !important;
}

/* ── Animations ──────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.25s ease; }

/* ── Responsive ──────────────────────────────────────── */
@media (min-width: 600px) {
    #app { max-width: 600px; }
    .items-grid { grid-template-columns: repeat(3, 1fr); }
}
