/* ==================== Шрифт ==================== */
@font-face {
    font-family: 'Gagarin Star Mix';
    src: url('/donate/assets/fonts/gagarin-star-mix.woff2') format('woff2'),
         url('/donate/assets/fonts/gagarin-star-mix.woff') format('woff'),
         url('/donate/assets/fonts/gagarin-star-mix.ttf') format('truetype'),
         url('/donate/assets/fonts/gagarin-star-mix.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Minecraft';
    src: url('/donate/assets/fonts/minecraft.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ==================== Переменные ==================== */
:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    --bg-card-hover: #1a1a1a;
    --bg-input: #0d0d0d;

    --accent: #ffffff;
    --accent-dim: #cccccc;
    --accent-muted: #888888;

    --success: #00e676;
    --danger: #ff4757;
    --warning: #ffa502;
    --gold: #ffd700;

    --text-primary: #ffffff;
    --text-secondary: #b8b8b8;
    --text-dim: #777777;

    --border: #222222;
    --border-hover: #444444;
    --border-active: #ffffff;

    --shadow: 0 8px 32px rgba(0, 0, 0, 0.9);
    --shadow-glow: 0 0 30px rgba(255, 255, 255, 0.08);

    --radius: 4px;
    --radius-sm: 2px;
}

/* ==================== Reset ==================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background: #000;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.35) 100%);
    pointer-events: none;
    z-index: -1;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.7;
}

/* ==================== Контейнер ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== Хедер ==================== */
.site-header {
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 18px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* ==================== Логотип ==================== */
.logo {
    display: flex;
    align-items: center;
    font-family: 'Gagarin Star Mix', 'Russo One', sans-serif;
    font-size: 1.8em;
    font-weight: 400;
    color: #000000;
    letter-spacing: 2px;
    text-transform: uppercase;
    -webkit-text-stroke: 2px #ffffff;
    paint-order: stroke fill;
    text-shadow:
        -1px -1px 0 #fff,
         1px -1px 0 #fff,
        -1px  1px 0 #fff,
         1px  1px 0 #fff,
         0 0 8px rgba(255, 255, 255, 0.4);
    transition: all 0.3s;
}

.logo:hover {
    opacity: 1;
    text-shadow:
        -1px -1px 0 #fff,
         1px -1px 0 #fff,
        -1px  1px 0 #fff,
         1px  1px 0 #fff,
         0 0 16px rgba(255, 255, 255, 0.9);
}

/* ==================== Навигация ==================== */
.header-nav {
    display: flex;
    gap: 4px;
    align-items: center;
}

.header-nav a {
    padding: 10px 18px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9em;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.header-nav a:hover {
    color: var(--text-primary);
    opacity: 1;
    border-color: var(--border-hover);
}

.header-nav a.active {
    color: var(--text-primary);
    border-color: var(--border-active);
    background: rgba(255, 255, 255, 0.03);
}

.header-nav a.nav-external {
    color: var(--text-dim);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.header-nav a.nav-external:hover {
    color: var(--text-primary);
    opacity: 1;
}

/* ==================== Hero ==================== */
.hero {
    text-align: center;
    padding: 100px 20px 70px;
    position: relative;
    overflow: hidden;
    background-image: url('/donate/assets/img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.55) 0%,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(0, 0, 0, 0.95) 100%
    );
    pointer-events: none;
    z-index: 0;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-family: 'Gagarin Star Mix', 'Russo One', sans-serif;
    font-size: clamp(2em, 5vw, 3.5em);
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 22px;
    color: #ffffff;
    line-height: 1.25;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.hero h1.hero-brand {
    color: #000000;
    -webkit-text-stroke: 2px #ffffff;
    paint-order: stroke fill;
    text-shadow:
        -1px -1px 0 #fff,
         1px -1px 0 #fff,
        -1px  1px 0 #fff,
         1px  1px 0 #fff,
         0 0 12px rgba(255, 255, 255, 0.35);
    letter-spacing: 3px;
}

.hero p {
    color: #d0d0d0;
    font-size: 1.15em;
    max-width: 650px;
    margin: 0 auto;
    letter-spacing: 0.3px;
    line-height: 1.65;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
}

/* ==================== Server badge ==================== */
.server-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-hover);
    font-size: 0.8em;
    color: #ffffff;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.server-badge .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    min-width: 8px;
    background: #00e676;
    border-radius: 50%;
    box-shadow: 0 0 12px #00e676, 0 0 4px #00e676;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 12px #00e676, 0 0 4px #00e676;
    }
    50% {
        opacity: 0.75;
        box-shadow: 0 0 6px #00e676;
    }
}

/* ==================== Кнопки в hero сервера ==================== */
.server-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

.btn-back,
.btn-map {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid #444;
    color: #999;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: all 0.25s;
}

.btn-back:hover {
    border-color: #ffffff;
    color: #ffffff;
}

.btn-map {
    border-color: #ffffff;
    color: #ffffff;
}

.btn-map:hover {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.2);
}

/* ==================== Алерты ==================== */
.alert {
    padding: 16px 22px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    font-size: 0.95em;
    border: 1px solid var(--border);
    background: var(--bg-card);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alert-success {
    border-left: 3px solid #ffffff;
    color: #ffffff;
}

.alert-error {
    border-left: 3px solid #666666;
    color: #cccccc;
}

/* ==================== Секция товаров ==================== */
.products-section {
    padding: 40px 0 100px;
    background: #000;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 15px;
}

.products-header h2 {
    font-family: 'Gagarin Star Mix', 'Russo One', sans-serif;
    font-size: 1.6em;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.products-count {
    color: var(--text-dim);
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ==================== Сетка товаров/серверов ==================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0;
    background: transparent;
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}

.products-grid > * {
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.products-grid:has(> :only-child) {
    grid-template-columns: minmax(300px, 420px);
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
}

/* ==================== Карточка товара ==================== */
.product-card {
    background: var(--bg-card);
    padding: 32px 28px;
    position: relative;
    overflow: hidden;
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffffff;
    transition: width 0.4s ease;
}

.product-card:hover {
    background: var(--bg-card-hover);
}

.product-card:hover::before {
    width: 100%;
}

.product-icon {
    width: 56px;
    height: 56px;
    border: 2px solid var(--border-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    margin-bottom: 22px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #000;
}

.product-card:hover .product-icon {
    border-color: #ffffff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.product-card h3 {
    font-size: 1.15em;
    font-weight: 700;
    margin-bottom: 10px;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.product-card .description {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 24px;
    flex-grow: 1;
    line-height: 1.6;
}

/* Цена */
.product-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.product-price .amount {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 1.6em;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
}

.product-price .currency {
    font-size: 0.9em;
    color: var(--text-dim);
    font-weight: 500;
    letter-spacing: 1px;
}

.product-price .price-prefix {
    font-family: 'Inter', sans-serif;
    font-size: 0.75em;
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-right: 2px;
    align-self: center;
}

.product-price .price-text {
    font-family: 'Inter', sans-serif;
    font-size: 1em;
    font-weight: 600;
    color: #ffd700;
    letter-spacing: 0.3px;
    text-transform: none;
}

/* Кнопка «Купить» */
.buy-btn {
    width: 100%;
    padding: 14px 24px;
    background: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
    font-size: 0.9em;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: inherit;
    margin-top: auto;
}

.buy-btn:hover {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.2);
}

.buy-btn:active {
    transform: scale(0.98);
}

.product-card .buy-btn[data-has-variants="1"] {
    background: transparent;
    color: #ffffff;
}

.product-card .buy-btn[data-has-variants="1"]::after {
    content: ' ▸';
    font-size: 0.9em;
}

/* Бейдж на карточке */
.badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 12px;
    background: #ffffff;
    color: #000000;
    font-size: 0.7em;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Глобальный товар */
.product-global {
    border-color: rgba(255, 215, 0, 0.2);
}

.product-global:hover {
    border-color: #ffd700;
}

.product-global .product-icon {
    border-color: rgba(255, 215, 0, 0.5);
}

.product-global .badge {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
}

/* ==================== Витринный товар (AP Prime) ==================== */
.product-featured {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 32px;
    align-items: center;
    padding: 36px 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    position: relative;
    margin-bottom: 24px;
    overflow: hidden;
}

.product-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #ffd700, #ff8c00, transparent 80%);
}

.product-featured-icon {
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6em;
    border: 2px solid #ffd700;
    background: #000;
    flex-shrink: 0;
}

.product-featured-body {
    min-width: 0;
}

.badge-featured {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    font-size: 0.7em;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.product-featured-body h3 {
    font-size: 1.6em;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 10px;
}

.product-featured-body .description {
    color: var(--text-secondary);
    font-size: 0.95em;
    line-height: 1.65;
    max-width: 640px;
}

.product-featured-cta {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    min-width: 220px;
    flex-shrink: 0;
}

.product-featured-cta .product-price {
    border-top: none;
    padding-top: 0;
    margin-bottom: 0;
    justify-content: flex-end;
}

.product-featured-cta .buy-btn {
    margin-top: 0;
}

/* ==================== Карточка сервера (главная) ==================== */
.server-card {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    border-color: var(--border);
    transition: border-color 0.2s;
}

.server-card::before {
    display: none;
}

.server-card:hover,
.server-card:focus,
.server-card:focus-visible {
    background: var(--bg-card);
    border-color: var(--border-hover);
    outline: none;
    box-shadow: none;
    text-decoration: none;
    color: inherit;
    opacity: 1;
}

.server-card-banner {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #0a0a0a;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    transition: transform .5s cubic-bezier(0.4, 0, 0.2, 1);
}

.server-card-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.15) 0%,
        rgba(0, 0, 0, 0.35) 45%,
        var(--bg-card) 100%
    );
    pointer-events: none;
}

.server-card-banner:not([style*="background-image"]) {
    background: linear-gradient(135deg, #0a0a0a 0%, #151515 50%, #0a0a0a 100%);
}

.server-card:hover .server-card-banner {
    transform: scale(1.03);
}

.server-card-body {
    padding: 24px 28px 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.server-card-body h3 {
    font-size: 1.25em;
    font-weight: 700;
    margin-bottom: 10px;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.server-card-body .description {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 24px;
    flex-grow: 1;
    line-height: 1.6;
}

.server-card-body .product-price {
    margin-bottom: 18px;
}

.server-card-body .buy-btn {
    margin-top: auto;
}

/* ==================== Последние покупки ==================== */
.recent-section {
    padding: 20px 0 40px;
    background: #000;
    border-bottom: 1px solid var(--border);
}

.recent-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.recent-item {
    background: var(--bg-card);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: background 0.2s;
}

.recent-item:hover {
    background: var(--bg-card-hover);
}

.recent-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border: 2px solid var(--border-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Gagarin Star Mix', 'Russo One', sans-serif;
    font-size: 1.1em;
    color: #ffffff;
    background: #000;
    letter-spacing: 1px;
}

.recent-info {
    flex-grow: 1;
    min-width: 0;
}

.recent-name {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95em;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-product {
    color: var(--text-dim);
    font-size: 0.8em;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-time {
    color: var(--text-dim);
    font-size: 0.75em;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.recent-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-dim);
    border: 1px solid var(--border);
    background: var(--bg-card);
    letter-spacing: 0.5px;
}

/* ==================== Модальное окно ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-hover);
    padding: 0;
    max-width: 1000px;
    width: 100%;
    max-height: calc(100vh - 40px);
    position: relative;
    animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    min-height: 0;
    max-height: calc(100vh - 40px);
}

.modal-side {
    padding: 40px 32px 40px 40px;
    overflow-y: auto;
    border-right: 1px solid var(--border);
    background: #080808;
}

.modal-side-title {
    font-family: 'Gagarin Star Mix', 'Russo One', sans-serif;
    font-size: 1.1em;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: #fff;
}

.modal-full-description {
    font-size: .92em;
    line-height: 1.7;
    color: #b8b8b8;
}

.modal-full-description p {
    margin: 0 0 12px;
}

.modal-full-description p:last-child {
    margin-bottom: 0;
}

.modal-full-description ul {
    margin: 0 0 12px;
    padding-left: 20px;
}

.modal-full-description li {
    margin-bottom: 6px;
}

.modal-side.is-empty {
    display: none;
}

.modal-grid:has(.modal-side.is-empty) {
    grid-template-columns: 1fr;
}

.modal-main {
    padding: 32px 40px 32px;
    overflow-y: auto;
    min-height: 0;
}

.modal-main-title {
    font-family: 'Gagarin Star Mix', 'Russo One', sans-serif;
    font-size: 1.3em;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.modal .product-name {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 24px;
    font-size: 0.95em;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* Скроллбары — общие для описания и модалки */
.modal-full-description::-webkit-scrollbar,
.modal-side::-webkit-scrollbar,
.modal-main::-webkit-scrollbar {
    width: 6px;
}

.modal-full-description::-webkit-scrollbar-track,
.modal-side::-webkit-scrollbar-track,
.modal-main::-webkit-scrollbar-track {
    background: #000;
}

.modal-full-description::-webkit-scrollbar-thumb,
.modal-side::-webkit-scrollbar-thumb,
.modal-main::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

.modal-full-description::-webkit-scrollbar-thumb:hover,
.modal-side::-webkit-scrollbar-thumb:hover,
.modal-main::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.97) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ==================== Форма в модалке ==================== */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.85em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.form-group input {
    width: 100%;
    padding: 15px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border-hover);
    color: var(--text-primary);
    font-size: 1em;
    transition: all 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.form-group input::placeholder {
    color: var(--text-dim);
}

.form-hint {
    font-size: 0.8em;
    color: var(--text-dim);
    margin-top: 8px;
    letter-spacing: 0.3px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.btn {
    padding: 15px 24px;
    border: 1px solid;
    font-size: 0.9em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    flex: 1;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.btn-primary:hover {
    background: transparent;
    color: #ffffff;
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.2);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-hover);
}

.btn-secondary:hover {
    color: #ffffff;
    border-color: #ffffff;
}

/* ==================== Монеты ==================== */
.coins-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}

.coins-row input[type="range"] {
    flex-grow: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: #333;
    outline: none;
    cursor: pointer;
}

.coins-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #ffffff;
    cursor: pointer;
    border-radius: 0;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.coins-row input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #ffffff;
    cursor: pointer;
    border: none;
    border-radius: 0;
}

.coins-row input[type="number"] {
    width: 130px;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-hover);
    color: #fff;
    font-size: 1em;
    text-align: right;
    font-family: inherit;
}

.coins-row input[type="number"]:focus {
    outline: none;
    border-color: #fff;
}

.coins-summary {
    margin-top: 14px;
    padding: 12px 16px;
    background: var(--bg-input);
    border-left: 3px solid #ffd700;
    font-size: 0.95em;
    color: #ccc;
}

.coins-summary strong {
    color: #ffd700;
    font-size: 1.15em;
    letter-spacing: 0.5px;
}

/* ==================== Градиент ника ==================== */
.gradient-pickers {
    display: flex;
    gap: 16px;
    margin-top: 10px;
}

.color-picker {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.color-picker input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 60px;
    border: 2px solid var(--border-hover);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: border-color 0.2s;
}

.color-picker input[type="color"]:hover {
    border-color: #fff;
}

.color-picker input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker input[type="color"]::-webkit-color-swatch {
    border: none;
}

.color-picker input[type="color"]::-moz-color-swatch {
    border: none;
}

.color-picker span {
    font-size: 0.8em;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.gradient-preview-box {
    margin-top: 20px;
    padding: 24px 20px;
    background: #0a0a0a;
    border: 1px solid var(--border);
    text-align: center;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.preview-label {
    display: block;
    font-size: 0.75em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'Inter', sans-serif;   /* оставляем обычный для подписи */
}

.gradient-preview {
    font-family: 'Minecraft', 'Courier New', monospace;
    font-size: 32px;                 /* кратно 4/8 — сохраняет чёткость пикселей */
    letter-spacing: 1px;
    line-height: 1.4;
    font-weight: 400;
    display: inline-block;

    /* Пиксель-эффект: отключаем сглаживание во всех браузерах */
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;
    font-smooth: never;
    text-rendering: geometricPrecision;

    /* Градиент как в игре */
    background: linear-gradient(90deg, #ff0055, #00d4ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;

    /* Лёгкая тень в стиле Minecraft (справа-снизу) */
    filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.55));

    transition: background 0.2s;
    padding: 6px 4px;
}

/* ==================== Варианты товара (в модалке) ==================== */
.variant-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.variant-option {
    display: block;
    position: relative;
    padding: 18px 110px 18px 22px;
    background: #0d0d0d;
    border: 1px solid #2a2a2a;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    user-select: none;
    min-height: 60px;
}

.variant-option input[type="radio"] {
    display: none !important;
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
}

.variant-option:hover {
    border-color: #555;
    background: #151515;
}

.variant-option:has(input[type="radio"]:checked) {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
    box-shadow:
        0 0 0 1px #ffffff inset,
        0 0 20px rgba(255, 255, 255, 0.15);
}

.variant-label {
    display: inline-block;
    color: #b8b8b8;
    font-weight: 700;
    font-size: 0.9em;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.2s;
    line-height: 1.4;
    vertical-align: middle;
}

.variant-option:has(input[type="radio"]:checked) .variant-label {
    color: #ffffff;
}

.variant-price {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffd700;
    font-weight: 700;
    font-size: 1.05em;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: color 0.2s;
}

.variant-option:has(input[type="radio"]:checked) .variant-price {
    color: #ffffff;
}

/* ==================== Заглушка «Оплата недоступна» ==================== */
.payments-notice {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.payments-notice.active {
    opacity: 1;
    pointer-events: auto;
}

.payments-notice-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-hover);
    padding: 40px 32px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.payments-notice-icon {
    font-size: 3em;
    margin-bottom: 16px;
    opacity: 0.9;
}

.payments-notice-content h3 {
    font-family: 'Gagarin Star Mix', 'Russo One', sans-serif;
    font-size: 1.2em;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 14px;
    font-weight: 400;
    color: #ffffff;
}

.payments-notice-content p {
    color: var(--text-secondary);
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 12px;
}

.payments-notice-contact {
    margin-top: 20px !important;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.9em !important;
}

.payments-notice-contact a {
    color: #2AABEE;
    font-weight: 600;
    border-bottom: 1px dashed rgba(42, 171, 238, 0.5);
}

.payments-notice-contact a:hover {
    opacity: 1;
    border-bottom-color: #2AABEE;
}

.payments-notice-close {
    margin-top: 24px;
    width: 100%;
}

/* ==================== Футер ==================== */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 40px 0 30px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85em;
    letter-spacing: 0.5px;
    background: #000;
}

.site-footer a {
    color: var(--text-secondary);
}

.site-footer a:hover {
    color: #ffffff;
    opacity: 1;
}

.tg-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    transition: color 0.2s;
    text-decoration: none;
}

.tg-link:hover {
    color: #2AABEE;
    opacity: 1;
}

/* ==================== Медиазапросы (по убыванию) ==================== */
@media (max-width: 900px) {
    .modal {
        max-width: 560px;
    }
    .modal-grid {
        grid-template-columns: 1fr;
        max-height: none;
    }
    .modal-side {
        padding: 32px 24px 24px;
        border-right: none;
        border-bottom: 1px solid var(--border);
        max-height: 40vh;
    }
    .modal-main {
        padding: 28px 24px 24px;
    }

    .product-featured {
        grid-template-columns: auto 1fr;
        padding: 28px 24px;
        gap: 20px;
    }
    .product-featured-cta {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .header-inner {
        flex-wrap: wrap;
    }
    .header-nav {
        width: 100%;
        justify-content: center;
    }
    .logo {
        font-size: 1.4em;
        letter-spacing: 1px;
        -webkit-text-stroke: 1.5px #ffffff;
    }
    .hero {
        padding: 60px 20px 40px;
        background-attachment: scroll;
    }
    .hero p {
        font-size: 1em;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
    .recent-list {
        grid-template-columns: 1fr;
    }

    .modal-actions {
        flex-direction: column;
    }

    .product-featured {
        grid-template-columns: 1fr;
        padding: 24px 20px;
    }
    .product-featured-icon {
        width: 64px;
        height: 64px;
        font-size: 2em;
    }
    .product-featured-body h3 {
        font-size: 1.25em;
    }
    .product-featured-cta {
        flex-direction: column;
        align-items: stretch;
        grid-column: auto;
    }
    .product-featured-cta .product-price {
        justify-content: flex-start;
    }
}
