/* Telegram WebApp friendly base styles */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-muted: #F5F5F5;
  --text: #111111;
  --muted: #8d939b;
  --primary: #9afd2d;
  --primary2: #8ee82a;
  --primary-ink: #1d1f1a;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.app {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.phone { background:#fff; border-radius:28px; box-shadow:0 30px 80px rgba(0,0,0,.45); overflow:hidden; }
.app-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 16px;
  color: #111111;
    position: relative;
}
.logo {
  display:flex; align-items:center; gap:10px; color:#111111; text-decoration:none; font-weight:800;
}
.logo-mark { width:28px; height:28px; border-radius:9px; background: var(--primary); box-shadow: 0 8px 18px rgba(180,255,90,.35); }
.actions { display:flex; align-items:center; gap:8px; }
.icon-btn { width:36px; height:36px; display:flex; align-items:center; justify-content:center; background: var(--surface-muted); border-radius:12px; box-shadow: 0 6px 18px rgba(0,0,0,.10); color:#1f2937; text-decoration:none; position:relative; transition: transform .12s ease, box-shadow .12s ease; }
.icon-btn:hover { box-shadow: 0 10px 22px rgba(0,0,0,.28); }
.icon-btn .dot { position:absolute; right:6px; top:6px; width:8px; height:8px; background:#ff4d4f; border-radius:50%; box-shadow:0 0 0 2px #fff; }
.lang-btn { display:flex; align-items:center; gap:6px; padding: 8px 10px; height:36px; border-radius:12px; background: var(--surface-muted); color:#1f2937; text-decoration:none; font-weight:700; transition: transform .12s ease, box-shadow .12s ease; }
.lang-btn:hover {; box-shadow: 0 10px 22px rgba(0,0,0,.28); }
.lang-dropdown { position:absolute; right:16px; top:56px; background:var(--surface-muted); z-index: 100; border-radius:12px; box-shadow:0 18px 34px rgba(0,0,0,.2); padding:6px; display:none; }
.lang-dropdown a { display:block; padding:8px 10px; border-radius:8px; color:#111; text-decoration:none; }
.lang-dropdown a:hover { background:#f3f5f6; }
.header-spacer { height: 12px; }
.screen {
  flex: 1 1 auto;
  padding: 16px;
}
.card {
    background: var(--surface-muted);
  border-radius: 22px;
  padding: 16px;
}
.balance-card { position: relative; overflow: hidden; background: var(--surface-muted); }
.balance-card .label { color:#9aa0a6; font-size:12px; }
.balance-card .label .vip {
    background: var(--primary);
    color: #fff;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.balance-card .value { font-size: 44px; font-weight: 800; letter-spacing: .3px; }
.currency-toggle { display:flex; gap:8px; align-items:center; }
.currency-toggle .pill { background:var(--surface-muted); color:#6b7280; padding:4px 10px; border-radius:10px; font-size:11px; font-weight:800; cursor:pointer; }
.currency-toggle .pill--active { background: var(--primary); color: #fff; }
.chip { background: var(--surface-muted); color:#6b7280; padding:6px 10px; border-radius: 10px; font-size:11px; font-weight:700; }
.action-grid { display:grid; grid-template-columns: repeat(5,1fr); gap: 10px; margin-top: 14px; }
.action-btn { display:flex; flex-direction:column; align-items:center; gap:8px; background:transparent; border:0; cursor:pointer; }
.action-btn .icon-box { width:46px; height:46px; border-radius:12px; display:flex; align-items:center; justify-content:center;

    background: linear-gradient(160deg, var(--primary) 0%, var(--primary2) 100%); color:#FFF; box-shadow: inset 0 -2px 0 rgba(0,0,0,.05); transition: transform .12s ease; }

.action-btn:hover .icon-box { opacity: 0.7;}
.action-btn span { font-size:11px; color:#6b7280; font-weight:700; }
a.action-btn{
    text-decoration: none;
}
.row { display:flex; align-items:center; gap:8px; }
.row-between { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.muted { color: var(--muted); font-size: 12px; }
.title { font-weight: 700; font-size: 16px; }
.h1 { font-weight: 800; font-size: 34px; }
.toolbar { display:grid; grid-template-columns: repeat(5,1fr); gap: 10px; margin-top: 12px; }
.btn { background: var(--surface-muted); border: 0; padding: 12px 0; border-radius: 12px; font-weight: 600; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.btn:hover {  opacity: 0.8; }
.btn-primary { background: linear-gradient(160deg, var(--primary) 0%, var(--primary2) 100%);color: #fff; }
.input { width:100%; border: 0; background: var(--surface); padding: 12px; border-radius: 12px; font-size: 14px; }
.search .input { width:100%; border: 0; background: var(--surface-muted); padding: 12px; border-radius: 12px; font-size: 14px; }

.search { position:relative; }
.search .magnifier { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:#9aa0a6; }
.search .input { padding-left:40px; }
.list { display:grid; gap: 10px; margin-top: 14px; }
.item { cursor: pointer; color: #111; background: var(--surface-muted); border-radius: 16px; padding: 12px; display:flex; align-items:center; justify-content:space-between; transition: transform .12s ease, box-shadow .12s ease; }
a.item { text-decoration: none; color: #111; cursor: pointer; background: var(--surface-muted); border-radius: 16px; padding: 12px; display:flex; align-items:center; justify-content:space-between; transition: transform .12s ease, box-shadow .12s ease; }
.item:hover { opacity: 0.8;}
.item .left { display:flex; align-items:center; gap:12px; }
.badge { background: linear-gradient(160deg, var(--primary) 0%, var(--primary2) 100%); color: var(--primary-ink); padding: 6px 10px; border-radius: 10px; font-weight:800; font-size:12px; }
.price-green { color:#5f9f0c; font-weight:800; }
/* Bottom navigation with icons */
.navbar { position: sticky; bottom: 0; left: 0; right: 0; background: var(--surface); border-top-left-radius: 16px; border-top-right-radius: 16px; box-shadow: 0 -10px 30px rgba(0,0,0,0.2); }
.navbar .inner { max-width: 420px; margin: 0 auto; display:grid; grid-template-columns: repeat(5,1fr); gap: 8px; padding: 12px 16px 15px; }
.nav-item { display:flex; flex-direction:column; align-items:center; gap:6px; color:#9aa0a6; font-size:11px; text-decoration:none; transition: color .12s ease, transform .12s ease; }
.nav-item:hover { color:#111;}
.nav-item svg { width:22px; height:22px; }
.nav-item--active { color: #111; }
.btn-padding{
    padding: 12px 12px;
}
/* Modals */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); display:flex; align-items:flex-end; justify-content:center; z-index: 30; opacity:0; visibility:hidden; pointer-events:none; transition: opacity .25s ease, visibility 0s linear .25s; }
.modal-backdrop.is-open { opacity:1; visibility:visible; pointer-events:auto; transition: opacity .25s ease; }
.modal { width:100%; max-width: 420px; background: var(--surface); border-top-left-radius: 20px; border-top-right-radius: 20px; padding: 16px; box-shadow: 0 -20px 50px rgba(0,0,0,.35); transform: translateY(24px); opacity:0; transition: transform .3s cubic-bezier(.22,.61,.36,1), opacity .3s ease; }
.modal-backdrop.is-open .modal { transform: translateY(0); opacity:1; }
.modal .title { font-size:18px; font-weight:800; }
.modal .row { justify-content: space-between; }
.modal .input { background: var(--surface-muted); text-align: center; }
.modal label.muted { text-align: center; display: block; margin-bottom: 5px; margin-top: 12px; }
.modal .actions { justify-content: flex-end; }
.modal .btn-primary { width: 100%; padding: 14px 0; border-radius: 14px; font-weight:800; }



.commission-info {
    background: #FFF8E1;
    border: 1px solid #FFE082;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.commission-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 700;
    color: #E65100;
}

.commission-details {
    display: grid;
    gap: 8px;
}

.commission-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.commission-item.total {
    border-top: 1px solid #FFE082;
    padding-top: 8px;
    margin-top: 8px;
    font-weight: 700;
}

.commission-label {
    font-size: 14px;
    color: #666;
}

.commission-value {
    font-size: 14px;
    font-weight: 600;
    color: #111;
}

.commission-item.total .commission-label {
    color: #E65100;
}

.commission-item.total .commission-value {
    color: #E65100;
    font-size: 16px;
}

.commission-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 12px;
    color: #4CAF50;
}




/* VIP Page Styles */
.vip-header {
    text-align: center;
    padding: 32px 0;
    background:  var(--surface-muted);
    border-radius: 20px;
    margin-bottom: 24px;
    color: var(--text);
}
.vip-header-active{
    background: linear-gradient(135deg, var(--primary) 0%, #b4ff5a 100%);
    color: var(--primary-ink) !important;
}
.vip-icon {
    margin-bottom: 16px;
}

.vip-header h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 8px 0;
}

.vip-header p {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
    color: var(--muted);
}

.vip-benefits {
    margin-bottom: 32px;
}

.vip-benefits h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #111;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.benefit-item {
    background: var(--surface-muted);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}


.benefit-icon {
    margin-bottom: 12px;
}

.benefit-item h3 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #111;
}

.benefit-item p {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}

.pricing-plans {
    margin-bottom: 32px;
}

.pricing-plans h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #111;
}

.plans-grid {
    display: grid;
    gap: 16px;
}

.plan-card {
    background: var(--surface-muted);
    border-radius: 20px;
    padding: 20px;
    position: relative;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}


.plan-card.popular {
    background: linear-gradient(135deg, #007BFF 0%, #0056CC 100%);
    background: linear-gradient(135deg, #6e90ff 0%, #ff6ed1 100%);
    color: white;
}

.popular-badge {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary2) 100%);
    color: #111;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.plan-header {
    text-align: center;
    margin-bottom: 20px;
}

.plan-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.price {
    font-size: 32px;
    font-weight: 800;
}

.period {
    font-size: 14px;
    opacity: 0.8;
}

.savings {
    font-size: 12px;
    color: #4CAF50;
    font-weight: 600;
}

.plan-card.popular .savings {
    color: var(--primary);
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.plan-features li {
    padding: 6px 0;
    font-size: 14px;
    color: #666;
}

.plan-card.popular .plan-features li {
    color: rgba(255, 255, 255, 0.9);
}

.plan-btn {
    width: 100%;
    padding: 14px 0;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    background: transparent;
    color: #111;
}

.plan-btn:hover {
   opacity: 0.8;
}

.plan-btn.primary {
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary2) 100%);
    color: #FFF;
}

.faq-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #111;
}

.faq-list {
    display: grid;
    gap: 12px;
}

.faq-item {
    background: var(--surface-muted);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.16);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    cursor: pointer;
}

.faq-question h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: #111;
}

.faq-answer {
    padding: 0 16px 16px 16px;
    display: none;
}

.faq-answer p {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
    line-height: 1.4;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}





/* Referral Program Styles */
.referral-header {
    display: flex;
    align-items: center;
    padding: 32px 20px;
    background:  var(--surface-muted);
    border-radius: 20px;
    margin-bottom: 24px;
    color: var(--text);
}
.referral-icon{
    margin-right: 10px;
}

.referral-header h1 {
    font-size: 19px;
    font-weight: 800;
    margin: 0 0 3px 0;
}

.referral-header p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
    color: var(--muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--surface-muted);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.stat-icon {
    margin-bottom: 8px;
}

.stat-content h3 {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 4px 0;
    color: #111;
}

.stat-content p {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}

.referral-link-card {
    background: var(--surface-muted);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 24px;
}

.referral-link-card h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #111;
}

.link-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
    border: 2px solid #E0E0E0;
}

.link-text {
    flex: 1;
    font-size: 14px;
    color: #666;
    word-break: break-all;
}

.copy-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary2) 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.12s ease;
}

.copy-btn:hover {
    opacity: 0.8;
}

.referral-rules {
    margin-bottom: 24px;
}

.referral-rules h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #111;
}

.rules-grid {
    display: grid;
    gap: 16px;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface-muted);
    border-radius: 16px;
    padding: 20px;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.rule-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary2) 100%);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.rule-content h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #111;
}

.rule-content p {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
    line-height: 1.4;
}
