/* ==========================================================================
   Referral.css - Share & Earn page
   All rules are scoped under .re-app so nothing leaks into the rest of the site.
   ========================================================================== */

.re-app {
    --re-bg: #0a0a0b;
    --re-panel: #141416;
    --re-panel-2: #1b1b1e;
    --re-border: #2a2a2e;
    --re-text: #f4f4f5;
    --re-muted: #8a8a93;
    --re-gold: #f5b301;
    --re-gold-soft: #ffd45e;
    --re-green: #22c55e;
    --re-radius: 14px;

    --re-verdant: #3f7d4a;
    --re-abyssal: #2b6485;
    --re-celestial: #6b3f9e;

    position: relative;
    margin: -20px -15px 0;
    padding: 24px 20px 60px;
    background: var(--re-bg);
    color: var(--re-text);
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.re-app *,
.re-app *:before,
.re-app *:after {
    box-sizing: border-box;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.re-hero {
    padding: 34px 20px 30px;
    text-align: center;
}

.re-eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid rgba(245, 179, 1, .35);
    background: rgba(245, 179, 1, .1);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--re-gold-soft);
}

.re-headline {
    margin: 0;
    font-size: 40px;
    font-weight: 800;
    line-height: 1.14;
    letter-spacing: -.015em;
    color: #fff;
}

.re-rule {
    max-width: 520px;
    margin: 14px auto 0;
    font-size: 15px;
    line-height: 1.6;
    color: #a9a9b3;
}

/* ==========================================================================
   Share card
   ========================================================================== */

.re-share {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 24px;
    border-radius: var(--re-radius);
    border: 1px solid var(--re-border);
    background: var(--re-panel);
}

.re-qr {
    flex: 0 0 auto;
    text-align: center;
}

.re-qr-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 142px;
    height: 142px;
    padding: 8px;
    border-radius: 10px;
    background: #fff;
}

.re-qr-box img,
.re-qr-box canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.re-qr-fallback {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .1em;
    color: #0a0a0b;
    word-break: break-all;
}

.re-qr-caption {
    display: block;
    margin-top: 9px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--re-muted);
}

.re-share-fields {
    flex: 1 1 auto;
    min-width: 0;
}

.re-share-fields .re-section-title {
    display: block;
    margin-bottom: 12px;
}

.re-field {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 11px 14px;
    border-radius: 9px;
    border: 1px solid var(--re-border);
    background: var(--re-panel-2);
}

.re-field-label {
    flex: 0 0 46px;
    font-size: 12px;
    font-weight: 600;
    color: var(--re-muted);
}

.re-field-value {
    flex: 1 1 auto;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--re-text);
}

.re-field-code {
    letter-spacing: .1em;
    color: var(--re-gold-soft);
}

.re-copy {
    flex: 0 0 auto;
    padding: 4px 7px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    opacity: .6;
    transition: opacity .15s ease, background .15s ease;
}

.re-copy:hover {
    background: rgba(255, 255, 255, .07);
    opacity: 1;
}

.re-copy-icon {
    font-size: 14px;
}

.re-share-btn {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 13px 18px;
    border: 0;
    border-radius: 9px;
    background: #fff;
    color: #0a0a0b;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}

.re-share-btn:hover {
    background: var(--re-gold-soft);
    transform: translateY(-1px);
}

.re-share-arrow {
    margin-left: 4px;
}

.re-share-note {
    min-height: 16px;
    margin: 8px 0 0;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    color: var(--re-green);
}

/* ==========================================================================
   Section headings
   ========================================================================== */

.re-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 34px 0 14px;
}

.re-section-title {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--re-muted);
}

.re-section-note {
    font-size: 12px;
    font-weight: 600;
    color: var(--re-gold-soft);
}

/* ==========================================================================
   Pack sets
   ========================================================================== */

.re-sets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.re-set {
    position: relative;
    padding: 26px 20px 20px;
    border-radius: var(--re-radius);
    text-align: center;
    overflow: hidden;
}

/* Diagonal stripe treatment, matching the pack cards on the Card Game page */
.re-set:before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: repeating-linear-gradient(
        135deg,
        rgba(255, 255, 255, .05) 0px,
        rgba(255, 255, 255, .05) 10px,
        rgba(255, 255, 255, 0) 10px,
        rgba(255, 255, 255, 0) 20px
    );
    pointer-events: none;
}

.re-set > * {
    position: relative;
}

.re-set-verdant   { background: linear-gradient(165deg, #4a8f57 0%, #2b5a34 100%); }
.re-set-abyssal   { background: linear-gradient(165deg, #35789c 0%, #1d4459 100%); }
.re-set-celestial { background: linear-gradient(165deg, #7d4bb5 0%, #472768 100%); }

.re-set-icon {
    font-size: 42px;
    line-height: 1;
}

.re-set-name {
    margin: 14px 0 4px;
    font-size: 21px;
    font-weight: 700;
    color: #fff;
}

.re-set-tagline {
    margin: 0 0 18px;
    font-size: 13px;
    color: rgba(255, 255, 255, .76);
}

.re-set-rule {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .3);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.re-set-rule-from {
    color: rgba(255, 255, 255, .8);
}

.re-set-rule-arrow {
    color: rgba(255, 255, 255, .5);
}

.re-set-rule-to {
    color: #fff;
}

/* ==========================================================================
   Totals
   ========================================================================== */

.re-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin-top: 16px;
    border-radius: var(--re-radius);
    border: 1px solid var(--re-border);
    background: var(--re-border);
    overflow: hidden;
}

.re-stat {
    padding: 20px 16px;
    text-align: center;
    background: var(--re-panel);
}

.re-stat-value {
    display: block;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--re-text);
}

.re-stat-gold {
    color: var(--re-gold-soft);
}

.re-stat-label {
    display: block;
    margin-top: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--re-muted);
}

/* ==========================================================================
   Friends table
   ========================================================================== */

.re-friends {
    border-radius: var(--re-radius);
    border: 1px solid var(--re-border);
    background: var(--re-panel);
    overflow: hidden;
}

.re-table {
    width: 100%;
    border-collapse: collapse;
}

.re-table thead th {
    padding: 12px 16px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--re-muted);
    background: var(--re-panel-2);
    border-bottom: 1px solid var(--re-border);
}

.re-table tbody td {
    padding: 14px 16px;
    font-size: 13px;
    border-bottom: 1px solid #202024;
    vertical-align: middle;
}

.re-table tbody tr:last-child td {
    border-bottom: 0;
}

.re-table tbody tr:hover td {
    background: rgba(255, 255, 255, .022);
}

.re-col-friend { text-align: left; }
.re-col-set    { width: 132px; text-align: center; }
.re-col-earned { width: 78px; text-align: center; }

.re-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-right: 11px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    color: #d8d8de;
    background: #2c2c33;
    vertical-align: middle;
}

.re-friend-text {
    display: inline-block;
    vertical-align: middle;
}

.re-friend-name {
    display: block;
    font-weight: 700;
    color: var(--re-text);
}

.re-friend-joined {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: var(--re-muted);
}

/* Mini progress bars ---------------------------------------------------- */

.re-mini-bar {
    height: 5px;
    margin: 0 auto;
    border-radius: 3px;
    background: #2c2c30;
    overflow: hidden;
}

.re-mini-fill {
    height: 100%;
    border-radius: 3px;
    transition: width .6s ease;
}

.re-fill-verdant   { background: linear-gradient(90deg, #3f7d4a, #67c47a); }
.re-fill-abyssal   { background: linear-gradient(90deg, #2b6485, #57a8d4); }
.re-fill-celestial { background: linear-gradient(90deg, #6b3f9e, #a97ae0); }

.re-mini-label {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--re-muted);
}

.re-earned-tag {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(34, 197, 94, .14);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    color: #4ade80;
}

.re-earned-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 800;
    color: var(--re-gold-soft);
    background: rgba(245, 179, 1, .12);
}

.re-empty {
    margin: 0;
    padding: 30px 16px;
    text-align: center;
    color: var(--re-muted);
}

/* ==========================================================================
   How it works
   ========================================================================== */

.re-how {
    padding: 24px 26px;
    border-radius: var(--re-radius);
    border: 1px solid var(--re-border);
    background: var(--re-panel);
}

.re-how-list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: re-step;
}

.re-how-list li {
    position: relative;
    padding: 0 0 18px 42px;
    counter-increment: re-step;
}

.re-how-list li:last-child {
    padding-bottom: 0;
}

.re-how-list li:before {
    content: counter(re-step);
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
    color: #0a0a0b;
    background: linear-gradient(160deg, var(--re-gold-soft), var(--re-gold));
}

.re-how-list h3 {
    margin: 3px 0 5px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--re-text);
}

.re-how-list p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #9a9aa4;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
    .re-sets {
        grid-template-columns: 1fr;
    }

    .re-share {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .re-qr-box {
        margin: 0 auto;
    }
}

@media (max-width: 767px) {
    .re-app {
        padding: 16px 14px 40px;
    }

    .re-hero {
        padding: 22px 6px 24px;
    }

    .re-headline {
        font-size: 28px;
    }

    .re-stats {
        grid-template-columns: 1fr;
    }

    /* Collapse the per-set columns; keep name and total */
    .re-col-set {
        display: none;
    }
}
