/* ============================================================================
   EARNINGS / AFFILIATE PAGE
   ============================================================================ */

/* body background убран — canvas matrix-earnings-bg рисует фон */
.earnings-page { color: #e2e8f0; }
.earnings-page main { background: transparent; }

/* Секции поверх canvas */
.earn-hero,
.earn-section,
.earn-cta-section {
    position: relative;
    background: rgba(15, 20, 25, 0.85);
}
.earn-section--dark {
    background: rgba(10, 14, 20, 0.90);
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Frosted glass — как блок корпоративных тарифов на pricing */
.earn-section:not(.earn-section--dark),
.earn-cta-section {
    background: rgba(15, 20, 25, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* ── Hero ── */
.earn-hero {
    padding: 100px 0 80px;
    text-align: center;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0,217,126,0.10) 0%, transparent 70%);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.earn-hero__badge {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 20px;
    background: rgba(0,217,126,0.12);
    color: #00d97e;
    border: 1px solid rgba(0,217,126,0.30);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: 0.04em;
}
.earn-hero__title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    color: #fff;
    margin: 0 0 20px;
    line-height: 1.15;
}
.earn-hero__sub {
    font-size: 18px;
    color: #94a3b8;
    max-width: 640px;
    margin: 0 auto 36px;
    line-height: 1.6;
}
.earn-hero__sub strong { color: #00d97e; }
.earn-hero__cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }

.btn-lg { padding: 16px 36px; font-size: 16px; font-weight: 700; border-radius: 12px; text-decoration: none; transition: all 0.3s ease; display: inline-block; }
.btn-primary.btn-lg { background: linear-gradient(135deg, #00d97e, #00b368); color: #0f172a; box-shadow: 0 4px 20px rgba(0,217,126,0.35); }
.btn-primary.btn-lg:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,217,126,0.50); }
.btn-secondary.btn-lg { background: rgba(255,255,255,0.08); color: #e2e8f0; border: 2px solid rgba(255,255,255,0.20); }
.btn-secondary.btn-lg:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.35); transform: translateY(-2px); }

.earn-hero__stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}
.earn-hero__stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.earn-hero__stat-val   { font-size: 32px; font-weight: 800; color: #00d97e; line-height: 1; }
.earn-hero__stat-label { font-size: 13px; color: #64748b; }

/* ── Sections ── */
.earn-section { padding: 80px 0; }
.earn-section--dark { background: rgba(0,0,0,0.35); border-top: 1px solid rgba(255,255,255,0.06); border-bottom: 1px solid rgba(255,255,255,0.06); }
.earn-section__title { font-size: clamp(24px, 3vw, 36px); font-weight: 700; color: #fff; text-align: center; margin: 0 0 12px; }
.earn-section__sub   { font-size: 16px; color: #64748b; text-align: center; margin: 0 0 48px; }

/* ── Steps ── */
.earn-steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
    justify-content: center;
    flex-wrap: wrap;
}
.earn-step {
    flex: 1;
    min-width: 220px;
    max-width: 300px;
    text-align: center;
    padding: 32px 24px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
}
.earn-step__arrow { font-size: 28px; color: #00d97e; align-self: center; padding: 0 8px; flex-shrink: 0; }
.earn-step__num  { font-size: 48px; font-weight: 800; color: rgba(0,217,126,0.15); line-height: 1; margin-bottom: 8px; }
.earn-step__icon { font-size: 40px; margin-bottom: 16px; }
.earn-step h3    { font-size: 18px; font-weight: 700; color: #fff; margin: 0 0 12px; }
.earn-step p     { font-size: 14px; color: #94a3b8; line-height: 1.6; margin: 0; }

/* ── Tiers ── */
.earn-tiers {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}
.earn-tier {
    background: rgba(255,255,255,0.03);
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    overflow: hidden;
    overflow: hidden; transition: transform 0.2s, box-shadow 0.2s;
}
.earn-tier:hover { transform: translateY(-4px); }

.earn-tier--basic   { border-color: rgba(107,114,128,0.40); }
.earn-tier--silver  { border-color: rgba(148,163,184,0.40); }
.earn-tier--gold    { border-color: rgba(245,158,11,0.40); }
.earn-tier--platinum{ border-color: rgba(6,182,212,0.40); }
.earn-tier--diamond { border-color: rgba(168,85,247,0.40); box-shadow: 0 0 24px rgba(168,85,247,0.15); }

.earn-tier__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
/* ── Emoji size boost (1.5x) ── */
.earn-tier__emoji { font-size: 48px; flex-shrink: 0; }
.earn-tier__name  { font-size: 16px; font-weight: 700; color: #fff; }
.earn-tier__req   { font-size: 11px; color: #64748b; margin-top: 2px; }
.earn-tier__pct   { margin-left: auto; font-size: 22px; font-weight: 800; flex-shrink: 0; line-height: 1; }
.tier-pill { font-weight: 700; font-size: 1.2em; }
.earn-tier-scale__segment span { font-size: 16px; font-weight: 700; color: var(--color); }

.earn-tier--basic   .earn-tier__pct { color: #6b7280; }
.earn-tier--silver  .earn-tier__pct { color: #94a3b8; }
.earn-tier--gold    .earn-tier__pct { color: #f59e0b; }
.earn-tier--platinum.earn-tier__pct { color: #06b6d4; }
.earn-tier--platinum .earn-tier__pct { color: #06b6d4; }
.earn-tier--diamond .earn-tier__pct { color: #a855f7; }

.earn-tier__body { padding: 16px 20px 20px; }
.earn-tier__body p  { font-size: 13px; color: #94a3b8; line-height: 1.6; margin: 0 0 12px; }
.earn-tier__body ul { list-style: none; padding: 0; margin: 0; }
.earn-tier__body li { font-size: 13px; color: #64748b; padding: 3px 0; }

/* Tier scale */
.earn-tier-scale { margin-top: 8px; }
.earn-tier-scale__track { display: flex; border-radius: 8px; overflow: hidden; height: 48px; }
.earn-tier-scale__segment {
    flex: 1;
    background: color-mix(in srgb, var(--color) 20%, transparent);
    border-right: 1px solid rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}
.earn-tier-scale__segment:last-child { border-right: none; }
.earn-tier-scale__segment span { font-size: 13px; font-weight: 700; color: var(--color); }
.earn-tier-scale__segment small { font-size: 10px; color: rgba(255,255,255,0.40); }

/* ── Calc table — styled like fp-table-wrap (RUSVPN vs competitors) ── */
.earn-calc-table-wrap {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--primary, #00d97e);
    margin-bottom: 16px;
    background: rgba(10, 14, 20, 0.75);
}
.earn-calc-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }

.earn-calc-table th,
.earn-calc-table td {
    padding: 14px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 217, 126, 0.4);
    border-right: 1px solid rgba(0, 217, 126, 0.24);
}
.earn-calc-table th:last-child,
.earn-calc-table td:last-child { border-right: none; }

.earn-calc-table th:first-child,
.earn-calc-table td:first-child { text-align: left; }

.earn-calc-table thead th {
    background: rgba(0, 217, 126, 0.06);
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Highlight the "our" column (commission %) */
.earn-calc-table thead th:nth-child(2) {
    color: #00d97e !important;
    background: rgba(0, 217, 126, 0.10) !important;
}
.earn-calc-table tbody td:nth-child(2) {
    background: rgba(0, 217, 126, 0.05);
    color: #00d97e;
    font-weight: 700;
}

.earn-calc-table tbody td { color: #a0aab8; }
.earn-calc-table tbody tr:hover td { background: rgba(255,255,255,0.03); }
.earn-calc-table tbody tr:last-child td { border-bottom: none; }

/* Diamond highlight row */
.earn-calc-table__highlight td {
    background: rgba(168, 85, 247, 0.08) !important;
    color: #e2e8f0;
    font-weight: 600;
}
.earn-calc-table__highlight td:nth-child(2) {
    background: rgba(168, 85, 247, 0.12) !important;
    color: #a855f7 !important;
}

.tier-pill { font-weight: 700; }
.earn-calc-note { font-size: 13px; color: #475569; text-align: center; margin: 0; }

/* ── Payout ── */
.earn-payout-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}
.earn-payout-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 28px 24px;
    text-align: center;
}
.earn-payout-card__icon { font-size: 40px; margin-bottom: 16px; }
.earn-payout-card h3 { font-size: 16px; font-weight: 700; color: #fff; margin: 0 0 10px; }
.earn-payout-card p  { font-size: 14px; color: #94a3b8; line-height: 1.6; margin: 0; }
.earn-payout-card strong { color: #00d97e; }

.earn-payout-steps {
    background: rgba(0,217,126,0.05);
    border: 1px solid rgba(0,217,126,0.20);
    border-radius: 16px;
    padding: 32px 40px;
    max-width: 700px;
    margin: 0 auto;
}
.earn-payout-steps h3 { font-size: 18px; font-weight: 700; color: #fff; margin: 0 0 20px; }
.earn-payout-steps ol { padding-left: 20px; margin: 0; }
.earn-payout-steps li { font-size: 15px; color: #94a3b8; padding: 6px 0; line-height: 1.6; }
.earn-payout-steps strong { color: #e2e8f0; }

/* ── Rules ── */
.earn-rules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.earn-rule {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 28px 32px;
}
.earn-rule--ok   { border-color: rgba(0,217,126,0.25); }
.earn-rule--no   { border-color: rgba(239,68,68,0.25); }
.earn-rule--info { border-color: rgba(59,130,246,0.25); }
.earn-rule--faq  { border-color: rgba(245,158,11,0.25); }
.earn-rule h3 { font-size: 17px; font-weight: 700; color: #fff; margin: 0 0 16px; }
.earn-rule ul { list-style: none; padding: 0; margin: 0; }
.earn-rule li { font-size: 14px; color: #94a3b8; padding: 5px 0; line-height: 1.5; border-bottom: 1px solid rgba(255,255,255,0.04); }
.earn-rule li:last-child { border-bottom: none; }
.earn-rule--faq li strong { color: #e2e8f0; }

/* ── Audience ── */
.earn-audience-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.earn-audience-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 28px 24px;
    transition: border-color 0.2s, transform 0.2s;
}
.earn-audience-card:hover { border-color: rgba(0,217,126,0.30); transform: translateY(-3px); }
.earn-audience-card__icon { font-size: 40px; margin-bottom: 16px; }
.earn-audience-card h3 { font-size: 16px; font-weight: 700; color: #fff; margin: 0 0 10px; }
.earn-audience-card p  { font-size: 14px; color: #94a3b8; line-height: 1.6; margin: 0; }

/* ── CTA ── */
.earn-cta-section { padding: 80px 0; }
.earn-cta-box {
    background: linear-gradient(135deg, rgba(0,217,126,0.08) 0%, rgba(0,179,104,0.04) 100%);
    border: 2px solid rgba(0,217,126,0.25);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}
.earn-cta-box h2 { font-size: 32px; font-weight: 800; color: #fff; margin: 0 0 16px; }
.earn-cta-box p  { font-size: 16px; color: #94a3b8; margin: 0 0 32px; }
.earn-cta-box__btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 24px; }
.earn-cta-box__note { font-size: 14px; color: #475569; margin: 0; }
.earn-cta-box__note a { color: #00d97e; text-decoration: none; }
.earn-cta-box__note a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 1100px) {
    .earn-tiers { grid-template-columns: repeat(3, 1fr); }
    .earn-payout-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .earn-tiers { grid-template-columns: repeat(2, 1fr); }
    .earn-audience-grid { grid-template-columns: repeat(2, 1fr); }
    .earn-rules-grid { grid-template-columns: 1fr; }
    .earn-steps { flex-direction: column; align-items: center; }
    .earn-step__arrow { transform: rotate(90deg); }
}
@media (max-width: 640px) {
    .earn-hero { padding: 60px 0 48px; }
    .earn-tiers { grid-template-columns: 1fr; }
    .earn-payout-grid { grid-template-columns: 1fr; }
    .earn-audience-grid { grid-template-columns: 1fr; }
    .earn-hero__stats { gap: 24px; }
    .earn-payout-steps { padding: 24px 20px; }
    .earn-cta-box { padding: 40px 24px; }
    .earn-tier-scale__track { height: 36px; }
    .earn-tier-scale__segment span { font-size: 11px; }
}
