:root { --t-blue: #4a8df8; --t-yellow: #ffdd2d; --bg: #f2f3f5; }
* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, sans-serif; }

body { display: flex; justify-content: center; width: 100%; }
.app-container { width: 100%; max-width: 430px; background: #fff; min-height: 100vh; position: relative; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal-content { background: white; width: 90%; padding: 20px; border-radius: 20px; max-height: 80vh; display: flex; flex-direction: column; }
.scroll-form { overflow-y: auto; margin: 15px 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid label { font-size: 12px; color: #666; }
.form-grid input { width: 100%; padding: 8px; margin-top: 4px; border: 1px solid #ddd; border-radius: 8px; }
#predict-btn { background: var(--t-blue); color: #fff; border: none; padding: 15px; border-radius: 12px; font-weight: bold; }

/* Header */
.app-header { padding: 10px 15px; border-bottom: 1px solid #eee; position: sticky; top: 0; background: #fff; z-index: 50; }
.header-main { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.address-box { text-align: center; }
.addr-title { font-size: 12px; color: #999; display: block; }
.addr-current { font-size: 14px; font-weight: 600; }
.nav-icon { width: 24px; }
.search-input { background: #f0f1f3; border-radius: 12px; display: flex; padding: 10px; align-items: center; }
.search-input img { width: 18px; opacity: 0.5; margin-right: 8px; }
.search-input input { border: none; background: none; outline: none; width: 100%; }

/* Stats Bar */
.stats-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 15px; background: #f9f9f9; }
.stat-card { background: #fff; padding: 10px; border-radius: 12px; min-width: 150px; border: 1px solid #eee; }
.stat-label { font-size: 10px; color: #999; text-transform: uppercase; }
.stat-value { font-size: 14px; font-weight: 700; display: block; margin-top: 2px; }

/* Grid */
.main-content { padding: 12px; padding-bottom: 100px; display: flex; flex-direction: column; justify-content: center;}
.section-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; }
.confidence { font-size: 12px; color: #2ecc71; font-weight: bold; }
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; justify-items: center; }
.product-card { border-radius: 16px; border: 1px solid #f0f0f0; display: flex; flex-direction: column; width: 90%; }
.p-img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #f8f8f8; border-radius: 12px; }
.p-price { font-size: 18px; font-weight: 800; margin: 10px 0 4px; }
.p-name { font-size: 13px; color: #444; height: 34px; overflow: hidden; line-height: 1.2; }
.p-btn { margin-top: 10px; background: #f0f1f3; border: none; border-radius: 10px; padding: 8px; color: var(--t-blue); font-weight: bold; cursor: pointer; }

.quantity-controls { display: none; flex-direction: row; align-items: center; justify-content: center; margin-top: 10px; }
.qty-btn { width: 30px; height: 30px; border: none; border-radius: 50%; background: var(--t-blue); color: white; font-size: 18px; cursor: pointer; margin: 0 5px; }
.qty-display { font-weight: bold; min-width: 20px; text-align: center; }

/* Bottom Nav */
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 430px; max-width: 100vw; background: #fff; display: flex; padding: 10px 0 25px; border-top: 1px solid #eee; z-index: 50; }
.nav-tab { flex: 1; display: flex; flex-direction: column; align-items: center; font-size: 11px; color: #999; position: relative; }
.nav-tab.active { color: var(--t-blue); }
.nav-tab img { width: 24px; margin-bottom: 4px; }
.cart-counter { position: absolute; top: -5px; right: 20%; background: #eb3b5a; color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 10px; border: 2px solid #fff; }


.balance-section {
    padding: 0 16px;
    margin: 12px 0 16px 0;
}

.balance-card {
    background-color: #f2f2f7;
    border-radius: 14px;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.balance-label {
    font-size: 15px;
    color: #8e8e93;
    font-weight: 500;
}

.balance-amount {
    font-size: 19px;
    font-weight: 700;
    color: #34C759; /* зелёный цвет баланса */
}

/* Mobile optimization */
/* @media (max-width: 480px) {
    .app-container { width: 100%; }
    .bottom-nav { width: 100%; }
    .main-content { padding: 12px;}
    .product-grid { grid-template-columns: 1fr; gap: 10px; }
    .product-card { padding: 8px;  width: 90%;}
    .p-price { font-size: 16px; }
    .p-name { font-size: 12px; }
    .app-header { padding: 8px 12px; }
    .search-input { padding: 8px; }
    .search-input input { font-size: 14px; }
    .balance-section { padding: 0 12px; }
    .balance-card { padding: 12px 16px; }
    .balance-label { font-size: 13px; }
    .balance-amount { font-size: 17px; }
    .stats-scroll { padding: 12px; gap: 8px; }
    .stat-card { min-width: 120px; padding: 8px; }
    .stat-label { font-size: 9px; }
    .stat-value { font-size: 13px; }
    .nav-tab { font-size: 10px; }
    .nav-tab img { width: 20px; margin-bottom: 2px; }
    .nav-icon { width: 20px; }
    .addr-title { font-size: 11px; }
    .addr-current { font-size: 13px; }
} */

#segment-name {
    font-size: 16px;  /* размер шрифта */
    font-weight: 600;  /* жирность */
    color: #000;       /* цвет */
    line-height: 1.3;  /* высота строки */
}
.body { display: flex; flex-direction: column; justify-content: center; width: 100%; background: var(--bg); }