:root {
    --bg-main: #0A0A0A;
    --bg-card: #141414;
    --bg-input: #1A1A1A;
    --accent: #10B981;
    --accent-hover: #059669;
    --text-main: #FAFAFA;
    --text-muted: #A3A3A3;
    --border: #262626;
    --border-hover: #404040;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Vazirmatn', system-ui, sans-serif; background: var(--bg-main); color: var(--text-main); line-height: 1.7; -webkit-font-smoothing: antialiased; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.container { max-width: 1100px; margin: auto; padding: 60px 20px; animation: fadeIn 0.6s ease-out; }
.header { text-align: center; margin-bottom: 50px; }
.header h1 { font-size: 2.8rem; font-weight: 800; margin-bottom: 12px; letter-spacing: -1px; color: #fff; }
.header h1 span { color: var(--accent); }
.header p { color: var(--text-muted); font-size: 1.1rem; font-weight: 400; }

.main-wrapper { display: flex; flex-direction: column; gap: 30px; }
.content-section { flex: 1; }
.section-title { font-size: 1.15rem; color: var(--text-main); margin-bottom: 20px; margin-top: 35px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ''; display: inline-block; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; }
.section-title:first-child { margin-top: 0; }

.grid-locations { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.loc-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px 20px; text-align: center; cursor: pointer; transition: all 0.25s ease; position: relative; overflow: hidden; }
.loc-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.loc-card.active { border-color: var(--accent); background: #141f1a; }
.flag { font-size: 2.8rem; margin-bottom: 12px; display: block; line-height: 1; margin-right: auto; margin-left: auto }
.loc-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.loc-price { color: var(--text-muted); font-size: 0.95rem; font-weight: 500; }
.loc-card.active .loc-price { color: var(--accent); }

.counter-wrapper { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; display: inline-flex; align-items: center; gap: 20px; }
.counter { display: flex; align-items: center; gap: 15px; background: var(--bg-input); padding: 6px; border-radius: var(--radius-sm); }
.counter button { width: 40px; height: 40px; border: none; border-radius: 6px; background: var(--border); color: #fff; font-size: 1.2rem; cursor: pointer; transition: background 0.2s, color 0.2s, opacity 0.2s; font-family: inherit; }
.counter button:hover:not(:disabled) { background: var(--text-main); color: var(--bg-main); }
#users { font-size: 1.2rem; font-weight: 700; min-width: 30px; text-align: center; }

.platform-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.platform-btn { background: var(--bg-card); border: 1px solid var(--border); padding: 20px 15px; border-radius: var(--radius-md); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--text-muted); font-family: inherit; font-size: 1rem; font-weight: 500; transition: all 0.25s ease; }
.platform-btn svg, .platform-btn img { width: 32px; height: 32px; fill: currentColor; transition: transform 0.2s; }
.platform-btn:hover { border-color: var(--border-hover); color: var(--text-main); }
.platform-btn:hover svg, .platform-btn:hover img { transform: scale(1.1); }
.platform-btn.active { border-color: var(--accent); color: var(--accent); }

.checkout-section { background: var(--bg-card); padding: 30px; border-radius: var(--radius-lg); border: 1px solid var(--border); height: fit-content; width: 100%; }
.checkout-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--border); }

.promo-box { display: flex; gap: 10px; margin-bottom: 20px; }
.promo-box input { margin-top: 0; padding: 12px; font-size: 0.9rem; }
.promo-box button { width: auto; margin-top: 0; padding: 0 20px; font-size: 0.9rem; }
.promo-box button.primary {width: 50%}

.price-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; color: var(--text-muted); font-size: 1rem; }
.price-row.total { border-top: 1px dashed var(--border); padding-top: 20px; margin-top: 20px; color: var(--text-main); font-size: 1.2rem; font-weight: 800; }
.total-val { font-size: 1.6rem; color: var(--accent); }
.discount-badge { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid #ef4444; padding: 4px 10px; border-radius: 20px; font-size: 0.85rem; font-weight: 700; }

button.primary { width: 100%; padding: 16px; border: none; border-radius: var(--radius-md); cursor: pointer; background: var(--accent); color: #000; font-family: inherit; font-weight: 800; font-size: 1.1rem; transition: all 0.2s; }
button.primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2); }
button.primary:active { transform: translateY(0); }

.modal { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.9); z-index: 100; opacity: 0; transition: opacity 0.3s ease; }
.modal.show { display: flex; align-items: center; justify-content: center; opacity: 1; }
.modalBox { background: var(--bg-card); width: 100%; max-width: 420px; padding: 35px; border-radius: var(--radius-lg); border: 1px solid var(--border); position: relative; transform: translateY(20px); transition: transform 0.3s ease; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5); }
.modal.show .modalBox { transform: translateY(0); }
.modalBox h3 { margin-top: 0; font-size: 1.5rem; margin-bottom: 8px; }
.modal-close { position: absolute; top: 20px; left: 20px; background: var(--bg-input); border: 1px solid var(--border); color: var(--text-muted); width: 32px; height: 32px; border-radius: 50%; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.modal-close:hover { background: #ef4444; color: #fff; border-color: #ef4444; }

input { padding: 16px; width: 100%; height: 60px; margin-top: 20px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--bg-input); color: #fff; font-family: inherit; font-size: 1rem; box-sizing: border-box; text-align: left; direction: ltr; transition: border-color 0.2s; }
input:focus { outline: none; border-color: var(--accent); }
input::placeholder { color: #52525B; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 992px) { .main-wrapper { flex-direction: row; } .checkout-section { width: 360px; position: sticky; top: 30px; } }
