:root {
    --bg: #09090b;
    --surface: #121216;
    --surface-2: #18181d;
    --surface-3: #202028;
    --border: rgba(255, 255, 255, 0.08);
    --border-gold: rgba(212, 160, 23, 0.45);
    --text: #f4f4f5;
    --muted: #a1a1aa;
    --gold: #d4a017;
    --gold-2: #f0c040;
    --green: #22c55e;
    --red: #ef4444;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: Inter, "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

button, input { font: inherit; }

.page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

.page--center {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(9, 9, 11, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.topbar__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.brand__logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2a2a32, #141418);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--gold-2);
}

.brand__title {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand__meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.82rem;
    margin-top: 0.15rem;
    flex-wrap: wrap;
}

.brand__ip {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0;
    font-weight: 600;
}

.brand__ip:hover { color: var(--gold-2); }

.brand__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
}

.brand__online { color: #86efac; font-weight: 600; }

.topbar__nav {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-btn {
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
    transition: 0.15s ease;
}

.nav-btn:hover {
    background: var(--surface-3);
    border-color: rgba(255, 255, 255, 0.14);
}

.nav-btn--gold {
    border-color: var(--border-gold);
    background: rgba(212, 160, 23, 0.08);
    color: var(--gold-2);
}

/* Banner */
.banner {
    position: relative;
    margin: 1rem 0 1.25rem;
    border-radius: calc(var(--radius) + 4px);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    min-height: 220px;
}

.banner__track { position: relative; min-height: 220px; }

.banner__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.banner__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.35) 55%, rgba(0,0,0,0.55) 100%);
}

.banner__slide--active { opacity: 1; z-index: 1; }

.banner__content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    max-width: 620px;
}

.banner__tag {
    display: inline-flex;
    width: fit-content;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border-gold);
    color: var(--gold-2);
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
    background: rgba(0, 0, 0, 0.25);
}

.banner__title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    line-height: 1.1;
    margin-bottom: 0.65rem;
    letter-spacing: -0.02em;
}

.banner__subtitle {
    color: #d4d4d8;
    max-width: 46ch;
}

.banner__dots {
    position: absolute;
    left: 50%;
    bottom: 0.85rem;
    transform: translateX(-50%);
    display: flex;
    gap: 0.45rem;
    z-index: 2;
}

.banner__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.banner__dot--active {
    background: var(--gold-2);
    box-shadow: 0 0 10px rgba(240, 192, 64, 0.8);
}

/* Player panel */
.player-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.player-panel--3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.promo-row {
    display: flex;
    gap: 0.5rem;
}

.promo-row input { flex: 1; }

.promo-row .btn { white-space: nowrap; padding: 0.55rem 0.85rem; }

.promo-status {
    margin-top: 0.45rem;
    font-size: 0.82rem;
    min-height: 1.1rem;
}

.promo-status--ok { color: #86efac; }
.promo-status--error { color: #fca5a5; }
.promo-status--loading { color: var(--muted); }

.field {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
}

.field label {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    margin-bottom: 0.35rem;
}

.field input {
    width: 100%;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1rem;
    outline: none;
}

.field input::placeholder { color: #71717a; }

.alert {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
}

.alert--error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.alert--success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #86efac;
}

/* Categories */
.categories {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin: 1.25rem 0;
}

.category-btn {
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
}

.category-btn:hover,
.category-btn--active {
    border-color: var(--border-gold);
    background: rgba(212, 160, 23, 0.1);
    color: var(--gold-2);
}

/* Products */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.85rem;
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.14);
}

.product-card__image-wrap {
    height: 140px;
    background: #0f0f12;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-card__head {
    display: flex;
    gap: 0.85rem;
    padding: 1rem;
    align-items: flex-start;
}

.product-card__icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.product-card__icon--vip { background: linear-gradient(135deg, #3f2a07, #7c5c10); }
.product-card__icon--premium { background: linear-gradient(135deg, #312e81, #5b21b6); }
.product-card__icon--key { background: linear-gradient(135deg, #164e63, #0891b2); }
.product-card__icon--coins { background: linear-gradient(135deg, #713f12, #ca8a04); }

.product-card__title-wrap { min-width: 0; flex: 1; }

.product-card__title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-card h2 {
    font-size: 1.05rem;
    line-height: 1.2;
}

.product-card__info {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.75rem;
    cursor: help;
    flex-shrink: 0;
}

.product-card p {
    color: var(--muted);
    font-size: 0.86rem;
    margin-top: 0.35rem;
}

.product-card__badge {
    display: inline-block;
    margin-top: 0.45rem;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    background: rgba(212, 160, 23, 0.15);
    color: var(--gold-2);
    font-size: 0.72rem;
    font-weight: 700;
}

.product-card__footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem 1rem;
    border-top: 1px solid var(--border);
}

.product-card__price-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.product-card__price {
    font-size: 1.25rem;
    font-weight: 800;
    white-space: nowrap;
}

.product-card__old-price {
    color: var(--muted);
    text-decoration: line-through;
    font-size: 0.85rem;
}

.product-card__actions {
    display: flex;
    gap: 0.45rem;
}

.btn {
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.15s ease;
}

.btn--ghost {
    padding: 0.5rem 0.8rem;
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    font-size: 0.82rem;
}

.btn--ghost:hover { background: var(--surface-3); }

.btn--gold {
    padding: 0.55rem 0.95rem;
    background: linear-gradient(180deg, #f0c040, #c89412);
    color: #1a1200;
    font-size: 0.86rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn--gold:hover { filter: brightness(1.05); }

.btn--gold:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn--danger {
    padding: 0.55rem 0.95rem;
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
    font-size: 0.86rem;
}

.btn--danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.hidden-form { display: none; }

/* Footer help */
.shop-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.help h2 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.help__steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.help__step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}

.help__step span {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(212, 160, 23, 0.15);
    color: var(--gold-2);
    font-weight: 800;
    margin-bottom: 0.55rem;
}

.help__step p { color: var(--muted); font-size: 0.92rem; }

.help__note {
    color: #71717a;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.shop-footer__links {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.shop-footer__links a {
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.86rem;
    color: var(--muted);
}

.shop-footer__links a:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
}

/* Success page */
.status-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    max-width: 480px;
    box-shadow: var(--shadow);
}

.status-card__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(34, 197, 94, 0.15);
    color: var(--green);
    font-size: 2rem;
    font-weight: 800;
}

.status-card p { color: var(--muted); margin-bottom: 0.75rem; }

.status-card .btn--gold {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 100;
}

.modal--open { display: flex; }

.modal__box {
    width: min(480px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.modal__box h3 { margin-bottom: 0.5rem; }
.modal__box p { color: var(--muted); margin-bottom: 1rem; }

.modal__close {
    width: 100%;
    padding: 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: #fff;
    cursor: pointer;
}

@media (max-width: 860px) {
    .help__steps { grid-template-columns: 1fr; }
    .player-panel--3 { grid-template-columns: 1fr; }
    .profile-grid, .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .player-panel { grid-template-columns: 1fr; }
    .topbar__inner { align-items: flex-start; flex-direction: column; }
    .topbar__nav { width: 100%; }
    .banner__content { padding: 1.25rem; }
    .product-card__footer { flex-direction: column; align-items: stretch; }
    .product-card__actions { width: 100%; }
    .product-card__actions .btn { flex: 1; }
}

/* Auth */
.page--auth {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 2rem;
}

.auth-card {
    width: min(520px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.auth-card h1, .auth-card h2 {
    margin-bottom: 1rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.auth-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.auth-form input,
.auth-form select {
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: #fff;
}

.auth-form input:focus,
.auth-form select:focus {
    outline: none;
    border-color: var(--border-gold);
}

.auth-switch {
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.auth-switch a { color: var(--gold-2); }

.checkbox-label {
    flex-direction: row !important;
    align-items: center;
    gap: 0.55rem !important;
    color: var(--text) !important;
}

.profile-grid, .admin-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 1rem;
    align-items: start;
}

.profile-email {
    color: var(--muted);
    margin-bottom: 1rem;
}

.profile-shop-link {
    display: inline-block;
    margin-top: 0.75rem;
    text-align: center;
}

.profile-security {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.profile-security h2 {
    font-size: 1.05rem;
    margin-bottom: 0.45rem;
}

.profile-security__hint {
    color: var(--muted);
    font-size: 0.88rem;
    margin-bottom: 0.85rem;
}

.profile-security__form {
    margin: 0;
}

.empty-state { color: var(--muted); }

.orders-list, .promo-admin-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.order-item, .promo-admin-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
}

.order-item__meta {
    color: var(--muted);
    font-size: 0.82rem;
    margin-top: 0.2rem;
}

.order-item__right {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.order-item__price { font-weight: 800; color: var(--gold-2); }
.order-item__discount { color: #86efac; font-size: 0.82rem; }
.order-item__status { font-size: 0.82rem; color: var(--muted); }
.order-item__status--delivered { color: #86efac; }
.order-item__status--paid { color: #93c5fd; }

.help__note code {
    background: var(--surface-2);
    padding: 0.15rem 0.35rem;
    border-radius: 6px;
    font-size: 0.82rem;
}
