/* ============================================
   Referral Program — supplemental styles
   Layered on top of /css/style.css.
   Uses the same gold-on-black palette and Exo 2 font
   for full visual consistency with the main site.
   ============================================ */

/* Page padding to clear fixed navbar on referral pages */
.referral-page {
    padding-top: 100px;
    min-height: calc(100vh - 80px);
    position: relative;
}

.referral-page::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 400px;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(218, 165, 32, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(184, 137, 26, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.page-header {
    text-align: center;
    padding: 4rem 2rem 3rem;
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: 4rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.page-header p {
    font-size: 1.2rem;
    color: var(--text-gray);
    max-width: 700px;
    margin: 0 auto;
}

.eyebrow {
    display: inline-block;
    color: var(--primary-gold);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding: 0.4rem 1rem;
    border: 1px solid rgba(218, 165, 32, 0.3);
    border-radius: 4px;
    background: rgba(218, 165, 32, 0.05);
}

/* Three-step "How it works" grid - reuses feature-card pattern */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.step-card {
    background: rgba(26, 20, 0, 0.5);
    border: 1px solid rgba(218, 165, 32, 0.2);
    border-radius: 15px;
    padding: 2.5rem 2rem;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.step-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-gold);
    box-shadow: var(--shadow-gold);
}

.step-number {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-gold);
    border-radius: 50%;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-white);
}

.step-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-white);
}

.step-card p {
    color: var(--text-gray);
    line-height: 1.6;
}

/* Stat cards (dashboard) */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 0 2rem;
}

.stat-card {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(218, 165, 32, 0.2);
    border-radius: 15px;
    padding: 1.75rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--primary-gold);
    box-shadow: var(--shadow-gold);
}

.stat-card-label {
    color: var(--text-gray);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.stat-card-value {
    font-size: 3rem;
    font-weight: 900;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-card-value.muted {
    background: none;
    -webkit-text-fill-color: var(--text-white);
    color: var(--text-white);
}

.stat-card-value.warn {
    background: none;
    -webkit-text-fill-color: #f59e0b;
    color: #f59e0b;
}

/* Generic content card */
.section-card {
    background: rgba(26, 20, 0, 0.5);
    border: 1px solid rgba(218, 165, 32, 0.2);
    border-radius: 15px;
    padding: 2.5rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
    position: relative;
    z-index: 1;
}

.section-card-header {
    margin-bottom: 1.5rem;
}

.section-card-eyebrow {
    color: var(--primary-gold);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-card h2,
.section-card h3 {
    color: var(--text-white);
    font-weight: 700;
}

.section-card h2 { font-size: 1.75rem; }
.section-card h3 { font-size: 1.4rem; }

/* Code/value display box (for referral link, code) */
.value-display {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(218, 165, 32, 0.3);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    word-break: break-all;
    flex-wrap: wrap;
}

.value-display .value {
    color: var(--primary-gold);
    flex: 1;
    min-width: 0;
    word-break: break-all;
}

.value-display .label {
    color: var(--text-gray);
    font-family: 'Exo 2', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Notices */
.notice {
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-gold);
    background: rgba(218, 165, 32, 0.08);
    color: var(--text-gray);
    margin: 1rem 0;
}

.notice strong { color: var(--text-white); }

.notice-success {
    border-left-color: #4ade80;
    background: rgba(74, 222, 128, 0.08);
}

.notice-error {
    border-left-color: #f87171;
    background: rgba(248, 113, 113, 0.08);
}

.notice-warn {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}

/* Tables */
.referral-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.referral-table th {
    text-align: left;
    padding: 0.75rem 0.6rem;
    color: var(--primary-gold);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    border-bottom: 1px solid rgba(218, 165, 32, 0.3);
    font-weight: 700;
}

.referral-table td {
    padding: 0.75rem 0.6rem;
    border-bottom: 1px solid rgba(218, 165, 32, 0.08);
    color: var(--text-gray);
}

.referral-table td strong {
    color: var(--text-white);
}

/* Status pills */
.pill {
    display: inline-block;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    border: 1px solid;
}

.pill-success {
    color: #4ade80;
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
}

.pill-pending {
    color: #f59e0b;
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-field { margin-bottom: 1rem; }

.form-field label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(218, 165, 32, 0.3);
    border-radius: 8px;
    color: var(--text-white);
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.15);
}

.form-field input::placeholder {
    color: rgba(176, 176, 176, 0.5);
}

/* Small button variants */
.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-danger {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
    border: 2px solid #f87171;
}
.btn-danger:hover {
    background: #f87171;
    color: var(--text-white);
    transform: translateY(-2px);
}

/* Auth gate (sign-in card) */
.auth-gate {
    max-width: 500px;
    margin: 4rem auto;
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(26, 20, 0, 0.5);
    border: 1px solid rgba(218, 165, 32, 0.2);
    border-radius: 15px;
    position: relative;
    z-index: 1;
}

.auth-gate i {
    font-size: 4rem;
    color: var(--primary-gold);
    margin-bottom: 1.5rem;
}

.auth-gate h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.auth-gate p {
    color: var(--text-gray);
    margin-bottom: 2rem;
}

/* Leaderboard rank styling */
.rank {
    font-weight: 900;
    font-size: 1.1rem;
}
.rank-1 { color: var(--primary-gold); }
.rank-2 { color: #c0c0c0; }
.rank-3 { color: #cd7f32; }

/* Action row utility */
.action-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(218, 165, 32, 0.2);
    border-top-color: var(--primary-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Mobile */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2.5rem;
    }
    .page-header {
        padding: 3rem 1rem 2rem;
    }
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 1rem;
        gap: 1rem;
    }
    .section-card {
        padding: 1.5rem;
        margin: 0 1rem 1.5rem;
        border-radius: 12px;
    }
    .stat-card-value { font-size: 2.2rem; }
    .steps-grid { padding: 0 1rem 3rem; gap: 1.5rem; }
    .referral-page { padding-top: 80px; }
    .auth-gate { margin: 2rem 1rem; padding: 2rem 1.5rem; }
    .referral-table { font-size: 0.85rem; }
    .referral-table th, .referral-table td { padding: 0.5rem 0.4rem; }
    .value-display { padding: 0.85rem 1rem; flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .value-display .btn { width: 100%; justify-content: center; }
}
