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

:root {
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --bg: #f8f9fb;
    --surface: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-xl: 0 20px 60px rgba(15,23,42,0.08);
}

.platform-card--base {
    --p-primary: #002ef4;
    --p-primary-dark: #0026d4;
    --p-primary-light: #eff6ff;
    --p-ring: 0 0 0 4px rgba(0,46,244,0.1), var(--shadow-md);
    --p-shadow-lg: 0 8px 32px rgba(0,46,244,0.18);
    --p-shadow-hover: 0 12px 32px rgba(0,46,244,0.28);
}
.platform-card--robinhood {
    --p-primary: #06D6A0;
    --p-primary-dark: #05b88a;
    --p-primary-light: #e6faf4;
    --p-ring: 0 0 0 4px rgba(6,214,160,0.12), var(--shadow-md);
    --p-shadow-lg: 0 8px 32px rgba(6,214,160,0.2);
    --p-shadow-hover: 0 12px 32px rgba(6,214,160,0.32);
}
.platform-card--bnb {
    --p-primary: #F3BA2F;
    --p-primary-dark: #d8a326;
    --p-primary-light: #fef6e1;
    --p-ring: 0 0 0 4px rgba(243,186,47,0.15), var(--shadow-md);
    --p-shadow-lg: 0 8px 32px rgba(243,186,47,0.22);
    --p-shadow-hover: 0 12px 32px rgba(243,186,47,0.38);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

#bgCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ========= HEADER ========= */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    background: transparent;
    position: relative;
    z-index: 10;
}

.logo { display: flex; align-items: center; }
.logo-mark {
    position: relative;
    width: 36px;
    height: 36px;
    cursor: pointer;
}
.logo-square {
    width: 36px; height: 36px;
    background: var(--p-primary, #002ef4);
    border-radius: 8px;
    position: absolute; top:0; left:0;
}
.logo-square--grad {
    background: linear-gradient(135deg,#002ef4 0%,#06D6A0 50%,#F3BA2F 100%);
}
.logo-text {
    position: absolute;
    top: 0; left: 40px;
    height: 36px;
    display: flex;
    align-items: center;
    font-size: 22px;
    font-weight: 800;
    white-space: nowrap;
    font-family: 'DM Sans', sans-serif;
    letter-spacing: -0.5px;
}

.badge-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}
.badge-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34,197,94,0.15);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(34,197,94,0.15); }
    50% { box-shadow: 0 0 0 6px rgba(34,197,94,0.08); }
}

/* ========= HERO ========= */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 60px 24px 80px;
    position: relative;
    z-index: 1;
}

.hero-block {
    text-align: center;
    margin-bottom: 56px;
}

.hero-block h1 {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -1.2px;
}
.hero-grad {
    background: linear-gradient(90deg,#002ef4 0%,#06D6A0 50%,#F3BA2F 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto;
}

/* ========= PLATFORMS GRID ========= */
.platforms-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

.platform-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 24px;
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.platform-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--p-primary);
    opacity: 0.9;
}
.platform-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 70px rgba(15,23,42,0.12);
    border-color: rgba(148,163,184,0.4);
}

/* --- card head --- */
.platform-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.platform-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: var(--p-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(148,163,184,0.15);
    overflow: hidden;
}
.platform-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}
/* BNB-лого — жёлтый кружок на белом поле; подрезаем поля зумом, чтобы монета
   заполняла плитку так же, как lime/blue у соседей (иначе выглядит мельче). */
.platform-card--bnb .platform-icon img { transform: scale(1.3); }
.platform-icon-fallback {
    border-radius: 10px;
}
.platform-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.platform-sub {
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 500;
}
.chip {
    margin-left: auto;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    font-family: 'DM Sans', sans-serif;
}
.chip--base      { background: #eff6ff; color: #002ef4; }
.chip--robinhood { background: #e6faf4; color: #059675; }
.chip--bnb       { background: #fef6e1; color: #b58900; }

.platform-hint {
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-muted);
    margin-bottom: 18px;
    /* Резерв под 2 строки: у BNB подсказка переносится, у Base/Robinhood — нет.
       Без фикс. высоты инпут и «Connect Wallet» у BNB уезжали ниже соседних. */
    min-height: 38px;
}

/* --- search --- */
.search-wrapper {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    padding: 6px 6px 6px 16px;
    gap: 6px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 10px;
}
.search-wrapper:focus-within {
    border-color: var(--p-primary);
    box-shadow: var(--p-ring);
}
.search-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--text-primary);
    background: transparent;
    font-family: inherit;
    caret-color: var(--p-primary);
    min-width: 0;
}
.search-wrapper input::placeholder { color: var(--text-muted); }

.btn-check {
    background: var(--p-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
    font-family: inherit;
    flex-shrink: 0;
}
.btn-check:hover { background: var(--p-primary-dark); transform: translateY(-1px); }
.btn-check:active { transform: translateY(0); }
.btn-check:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* --- status --- */
.status-message {
    display: none;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
    text-align: left;
    line-height: 1.4;
}
.status-message.success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.status-message.error   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.status-message.loading {
    background: var(--p-primary-light);
    color: var(--p-primary);
    border: 1px solid color-mix(in srgb, var(--p-primary) 25%, #fff);
}

/* --- action buttons --- */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 4px;
}
.btn-claim {
    display: none;
    width: 100%;
    background: var(--p-primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    font-family: inherit;
    box-shadow: var(--p-shadow-lg);
}
.btn-claim:hover {
    background: var(--p-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--p-shadow-hover);
}
.btn-connect {
    width: 100%;
    background: var(--p-primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    font-family: inherit;
    box-shadow: var(--p-shadow-lg);
}
.btn-connect:hover { background: var(--p-primary-dark); transform: translateY(-2px); }
.btn-reset {
    display: none;
    width: 100%;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    color: var(--text-primary);
}
.btn-reset:hover {
    border-color: var(--p-primary);
    color: var(--p-primary);
    background: var(--p-primary-light);
}

/* --- tiers --- */
.section-divider { margin-top: 28px; padding-top: 22px; border-top: 1px dashed var(--border); }
.section-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 14px;
}
.tiers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    text-align: left;
}
.tier-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: border-color 0.2s, background 0.2s;
}
.tier-card:hover {
    border-color: color-mix(in srgb, var(--p-primary) 30%, var(--border));
    background: color-mix(in srgb, var(--p-primary-light) 50%, var(--surface));
}
.tier-icon {
    width: 30px; height: 30px;
    background: var(--p-primary-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--p-primary);
}
.tier-num { font-size: 13px; font-weight: 700; line-height: 1; }
.tier-info { flex: 1; min-width: 0; }
.tier-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1px;
    line-height: 1.3;
}
.tier-desc {
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.35;
}
.tier-card--wide {
    grid-column: 1 / -1;
    width: calc(50% - 4px);
    margin: 0 auto;
}

/* ========= FOOTER ========= */
footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 32px 24px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 40px;
}
.social-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 12px;
}
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s, transform 0.15s;
    width: 36px; height: 36px;
    border-radius: 10px;
}
.social-link:hover { color: var(--text-primary); transform: translateY(-1px); background: var(--bg); }

/* ========= ANIMATIONS ========= */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero-block            { animation: fadeUp 0.5s ease-out both; }
.platform-card:nth-child(1) { animation: fadeUp 0.5s ease-out 0.15s both; }
.platform-card:nth-child(2) { animation: fadeUp 0.5s ease-out 0.25s both; }
.platform-card:nth-child(3) { animation: fadeUp 0.5s ease-out 0.35s both; }

/* ========= RESPONSIVE ========= */
/* Три карточки: либо 3 в ряд, либо 1 в столбец — без «осиротевшей» третьей.
   Прежний 2-колоночный промежуток (721–1080px) орфанил BNB во втором ряду и
   растягивал её на 560px, шире соседних. Одиночный столбец ограничиваем по
   ширине и центрируем, чтобы карточки не растягивались на всю ширину планшета. */
@media (max-width: 940px) {
    .platforms-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
    }
    .platform-card:nth-child(3) { grid-column: auto; max-width: none; margin: 0; width: auto; }
}
@media (max-width: 720px) {
    header { padding: 14px 18px; }
    .logo-square, .logo-mark { width: 30px; height: 30px; }
    .logo-text { font-size: 19px; left: 34px; height: 30px; }
    .badge-live { font-size: 12px; padding: 6px 11px; }

    .container { padding: 28px 16px 50px; }
    .hero-block { margin-bottom: 36px; }
    .hero-block h1 { font-size: 28px; letter-spacing: -0.6px; }
    .subtitle { font-size: 15px; }

    .platforms-grid { grid-template-columns: 1fr; gap: 16px; }
    .platform-card:nth-child(3) { max-width: none; }
    .platform-card { padding: 22px 18px 18px; border-radius: 20px; }

    .tiers-grid { grid-template-columns: 1fr; gap: 6px; }
    .tier-card { padding: 9px 11px; border-radius: 10px; border: none; background: var(--bg); }
    .tier-card--wide { width: 100%; grid-column: auto; margin: 0; }

    .search-wrapper { padding: 5px 5px 5px 14px; border-radius: 12px; }
    .search-wrapper input { font-size: 15px; }
    .btn-check { padding: 10px 16px; font-size: 13px; border-radius: 9px; }

    .btn-claim, .btn-connect { padding: 13px 18px; font-size: 14px; border-radius: 11px; }
    .btn-reset { padding: 11px 18px; font-size: 13.5px; border-radius: 11px; }

    footer { margin-top: 24px; padding: 24px 18px; }
}
@media (max-width: 380px) {
    .hero-block h1 { font-size: 24px; }
    .subtitle { font-size: 14px; }
    .chip { font-size: 11.5px; padding: 5px 10px; }
}
