/* ================================
   REFERRAL PAGE - MOBILE FIRST
   ================================ */

/* Live Earnings Ticker */
.earnings-ticker {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, var(--primary-blue) 0%, #1E40AF 100%);
    color: white;
    height: 40px;
    z-index: 101;
    overflow: hidden;
    display: flex;
    align-items: center;
    font-size: 0.8125rem;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ticker-track {
    display: flex;
    animation: scrollTicker 40s linear infinite;
}

@keyframes scrollTicker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.ticker-content {
    display: flex;
    padding-right: 2rem;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    margin-right: 2rem;
    opacity: 0.95;
    font-weight: 500;
}

.ticker-item .amount {
    color: #FCD34D;
    font-weight: 700;
    margin: 0 0.25rem;
}



.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
}

.referral-header .logo {
    height: 32px;
    width: auto;
}

.header-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Main Content */
.referral-main {
    padding-top: 40px; /* Just earnings bar height */
    min-height: 100vh;
    background: var(--bg-white);
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 2rem 1rem;
    background: #EFF6FF;
    overflow: hidden;
}


.hero-content {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: auto;
    margin: 0 auto 1.5rem;
}

.hero-illustration {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
    max-height: 320px;
    object-fit: contain;
}

/* Hero Text */
.hero-title {
    font-family: var(--font-heading);
    font-size: 1.875rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.amount-highlight {
    color: var(--primary-green);
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-medium);
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Reward Strips Container */
.reward-strips-container {
    margin: 0 -1rem 1.5rem -1rem;
    position: relative;
}

/* Primary Reward Strip */
.reward-strip {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.primary-strip {
    background: linear-gradient(90deg, #10B981 0%, #0EA55F 100%);
    position: relative;
}

.primary-strip::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shine-sweep 3s infinite;
}

@keyframes shine-sweep {
    0% { left: -100%; }
    100% { left: 200%; }
}

.strip-content {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    text-align: center;
}


.strip-amount-wrapper {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.strip-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    font-family: var(--font-heading);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.strip-per-friend {
    font-size: 0.875rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.05em;
    align-self: center;
}

.strip-condition {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.3;
    flex-basis: 100%;
}

/* Strip Separator */
.strip-separator {
    position: relative;
    padding: 0.75rem 0;
    text-align: center;
    background: transparent;
}

.strip-separator::before,
.strip-separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #E5E7EB, transparent);
}

.strip-separator::before {
    left: 0;
}

.strip-separator::after {
    right: 0;
}

.separator-text {
    display: inline-block;
    padding: 0 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: lowercase;
    letter-spacing: 0.1em;
    font-style: italic;
}

/* Secondary Strip */
.secondary-strip {
    background: #F3F4F6;
}

.secondary-strip .strip-content {
    padding: 0.75rem 1.5rem;
    gap: 0.5rem;
}

.strip-amount-secondary {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.strip-condition-secondary {
    font-size: 0.75rem;
    color: var(--text-medium);
    line-height: 1.3;
}

/* Eligibility Notice */
.eligibility-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #FEF3C7;
    color: #92400E;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-top: 0.75rem;
    border-top: 1px solid #FDE68A;
}

.eligibility-notice svg {
    flex-shrink: 0;
    stroke: #F59E0B;
    width: 14px;
    height: 14px;
}


/* CTA Button */
.cta-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    font-size: 1.0625rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: var(--font-primary);
}

.cta-button.primary {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.cta-button.primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}


/* How It Works Section */
.how-it-works {
    padding: 2rem 1rem;
    background: white;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.steps-container {
    max-width: 400px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    position: relative;
    transition: all var(--transition-normal);
    align-items: flex-start;
}

.step::after {
    content: '';
    position: absolute;
    left: 1.75rem;
    bottom: -1rem;
    width: 2px;
    height: 1rem;
    background: var(--border-light);
}

.step:last-child::after {
    display: none;
}

.step-number {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: var(--primary-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 700;
    font-family: var(--font-heading);
    flex-shrink: 0;
}

.step-main {
    flex: 1;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.step-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: white;
    border: 2px solid var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.step-content p {
    font-size: 0.875rem;
    color: var(--text-medium);
    line-height: 1.4;
}

/* Referral Code Section */
.referral-code-section {
    padding: 2rem 1rem;
    background: linear-gradient(to bottom, white, var(--bg-light));
}

.code-container {
    max-width: 400px;
    margin: 0 auto;
}

.code-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-medium);
    margin-bottom: 0.5rem;
    text-align: center;
}

.code-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border: 2px dashed var(--primary-blue);
    border-radius: var(--radius-lg);
    margin-bottom: 0.5rem;
}

.code-box.prominent {
    padding: 1.25rem;
    border-width: 3px;
    border-color: var(--primary-green);
    background: linear-gradient(to right, #F0FDF4, #FFFFFF);
    animation: subtle-pulse 3s ease-in-out infinite;
}

@keyframes subtle-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.code-text {
    flex: 1;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: var(--primary-blue);
    text-align: center;
    letter-spacing: 0.1em;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 80px;
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    background: var(--success-green);
}

.copy-btn.copied .copy-icon {
    display: none;
}

.copy-btn.copied .check-icon {
    display: block !important;
}

.copy-btn.copied .copy-text {
    content: "Copied!";
}

.code-hint {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Share Options - Removed (No longer needed) */

/* FAQ Section */
.faq-section {
    padding: 2rem 1rem;
    background: white;
}

.faq-container {
    max-width: 600px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    margin-bottom: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9375rem;
    list-style: none;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-item .chevron {
    transition: transform var(--transition-fast);
    color: var(--text-medium);
}

.faq-item[open] .chevron {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1rem 1rem 1rem;
    font-size: 0.875rem;
    color: var(--text-medium);
    line-height: 1.5;
}

/* Terms Section */
.terms-section {
    padding: 2rem 1rem;
    background: white;
}

.terms-container {
    max-width: 600px;
    margin: 0 auto;
}

.terms-content-open {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Reward Highlight in Terms */
.reward-highlight {
    background: white;
    border: 2px solid var(--primary-green);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.reward-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.reward-structure {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.reward-tier {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    text-align: center;
}

.reward-tier.premium {
    background: linear-gradient(to bottom, #F0FDF4, #E6F7F0);
    border: 1px solid var(--primary-green);
}

.reward-tier .reward-amount {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.reward-tier .reward-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-medium);
    line-height: 1.3;
}

.terms-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.terms-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.875rem;
    color: var(--text-dark);
    line-height: 1.5;
}

.terms-list li::before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: var(--primary-blue);
    font-weight: bold;
}

.terms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-dark);
    background: var(--bg-light);
    list-style: none;
}

.terms-header::-webkit-details-marker {
    display: none;
}

.terms-accordion .chevron {
    transition: transform var(--transition-fast);
}

.terms-accordion[open] .chevron {
    transform: rotate(180deg);
}

.terms-content {
    padding: 1.5rem;
    background: white;
}

.terms-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-family: var(--font-heading);
}

.terms-company {
    font-size: 0.875rem;
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.terms-content h5 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    font-family: var(--font-heading);
}

.terms-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
}

.terms-content li {
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.8125rem;
    color: var(--text-medium);
    line-height: 1.5;
}

.terms-content li {
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-dark);
    line-height: 1.5;
}

.terms-link {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.view-detailed-terms {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.view-detailed-terms:hover {
    text-decoration: underline;
}

.terms-operated-by {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-style: italic;
}

.terms-disclaimer {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
    padding: 1rem;
    background: #FEF3C7;
    border-left: 4px solid #F59E0B;
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

.terms-footer {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}


/* Legal Footer */
.legal-footer {
    background: #F8FAFC;
    border-top: 2px solid var(--border-light);
    padding: 2rem 1rem;
    margin-top: 3rem;
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
}

.legal-accordion {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.legal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    background: white;
    border-radius: var(--radius-lg);
    list-style: none;
}

.legal-header::-webkit-details-marker {
    display: none;
}

.legal-accordion .chevron {
    transition: transform var(--transition-fast);
    color: var(--text-medium);
    flex-shrink: 0;
}

.legal-accordion[open] .chevron {
    transform: rotate(180deg);
}

.legal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    font-family: var(--font-heading);
}

.legal-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    background: white;
}

.legal-footer h3 {
    font-size: 1.125rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.legal-intro {
    font-size: 0.875rem;
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.legal-section {
    margin-bottom: 2rem;
}

.legal-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
    border-left: 3px solid var(--primary-blue);
}

.legal-section ul {
    list-style: none;
    padding: 0;
}

.legal-section li {
    font-size: 0.8125rem;
    color: var(--text-medium);
    line-height: 1.6;
    padding: 0.375rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.legal-section li::before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: var(--primary-blue);
}

.legal-disclaimer {
    background: #FEF3C7;
    border-left: 4px solid #F59E0B;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin: 2rem 0;
}

.legal-disclaimer h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #92400E;
    margin-bottom: 0.5rem;
}

.legal-disclaimer p {
    font-size: 0.8125rem;
    color: #92400E;
    line-height: 1.6;
}

.legal-contact {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    margin-top: 2rem;
}

.legal-contact p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.legal-contact p:last-child {
    margin-bottom: 0;
}

/* Responsive Adjustments for Larger Phones */
@media (min-width: 375px) {
    .hero-title {
        font-size: 2.125rem;
    }
    
    .hero-visual {
        max-width: 450px;
    }
    
    .hero-illustration {
        max-height: 280px;
    }
    
    .strip-amount {
        font-size: 2.75rem;
    }
    
    .strip-amount-secondary {
        font-size: 1.5rem;
    }
}

/* Tablet Adjustments */
@media (min-width: 768px) {
    .referral-main {
        padding-top: 70px;
    }
    
    .hero-section {
        padding: 3rem 2rem;
    }
    
    .hero-content {
        max-width: 500px;
    }
    
    .hero-visual {
        max-width: 600px;
        margin: 0 auto 2rem;
    }
    
    .hero-illustration {
        max-height: 380px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .reward-strips-container {
        max-width: 600px;
        margin: 0 auto 2rem;
        border-radius: var(--radius-xl);
        overflow: hidden;
    }
    
    .strip-amount {
        font-size: 3rem;
    }
    
    .strip-per-friend {
        font-size: 1rem;
    }
    
    .strip-amount-secondary {
        font-size: 1.75rem;
    }
    
    .eligibility-notice {
        font-size: 0.875rem;
    }
    
    .how-it-works {
        padding: 3rem 2rem;
    }
    
    .section-title {
        font-size: 1.875rem;
        margin-bottom: 2rem;
    }
    
    .steps-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        max-width: 700px;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        align-items: center;
    }
    
    .step::after {
        display: none;
    }
    
    .step-number {
        margin-bottom: 0.75rem;
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .step-main {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .step-icon {
        margin-bottom: 0.5rem;
    }
}


/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

/* Prevent text selection on buttons */
button {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Safe area insets for modern phones */
@supports (padding: max(0px)) {
    .referral-header {
        padding-top: max(0.75rem, env(safe-area-inset-top));
    }
    
    .terms-section {
        padding-bottom: max(100px, calc(80px + env(safe-area-inset-bottom)));
    }
}