/* ============================================================
   ExamFiles Bot — Referral Web App
   Design inspired by SBI Bank India UI
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* -- Design Tokens ------------------------------------------ */
:root {
    --navy:          #00205b;
    --navy-dark:     #001238;
    --blue:          #0066b3;
    --blue-light:    #1a8cdb;
    --blue-pale:     #e3f2fd;
    --saffron:       #ff6f00;
    --saffron-light: #ff9800;
    --gold:          #ffc107;
    --success:       #2e7d32;
    --success-pale:  #e8f5e9;
    --error:         #c62828;
    --bg:            #f5f7fa;
    --card:          #ffffff;
    --text:          #1a1a2e;
    --text-secondary:#5c6370;
    --border:        #e2e8f0;
    --shadow-sm:     0 1px 3px rgba(0,32,91,.06);
    --shadow:        0 4px 16px rgba(0,32,91,.08);
    --shadow-lg:     0 12px 40px rgba(0,32,91,.12);
    --shadow-float:  0 8px 30px rgba(0,32,91,.18);
    --radius:        14px;
    --radius-sm:     10px;
    --radius-xs:     6px;
    --transition:    .25s cubic-bezier(.4,0,.2,1);
}

/* -- Reset & Base ------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

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

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--saffron); }
img { max-width: 100%; display: block; }

/* -- Top Ribbon (SBI-style) --------------------------------- */
.top-ribbon {
    background: var(--navy-dark);
    color: rgba(255,255,255,.7);
    font-size: .72rem;
    padding: 6px 16px;
    text-align: center;
    letter-spacing: .3px;
}
.top-ribbon strong { color: var(--gold); font-weight: 600; }

/* -- Header ------------------------------------------------- */
.header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0,32,91,.25);
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}

.header-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--saffron);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(255,111,0,.4);
}

.header-nav {
    display: flex;
    gap: 6px;
}

.header-nav a {
    color: rgba(255,255,255,.85);
    font-size: .82rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    transition: var(--transition);
}

.header-nav a:hover,
.header-nav a.active {
    background: rgba(255,255,255,.15);
    color: #fff;
}

/* -- Hero Section ------------------------------------------- */
.hero {
    background: linear-gradient(165deg, var(--navy) 0%, #003d82 50%, var(--blue) 100%);
    padding: 48px 20px 56px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,111,0,.12) 0%, transparent 70%);
    top: -150px;
    right: -100px;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,193,7,.08) 0%, transparent 70%);
    bottom: -100px;
    left: -80px;
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.15);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: .78rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--gold);
}

.hero h1 {
    font-size: clamp(1.6rem, 5vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 14px;
    letter-spacing: -.02em;
}

.hero h1 .highlight {
    background: linear-gradient(90deg, var(--saffron), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1rem;
    color: rgba(255,255,255,.8);
    max-width: 520px;
    margin: 0 auto 24px;
    line-height: 1.65;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.hero-stat {
    text-align: center;
}

.hero-stat .number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gold);
    display: block;
    line-height: 1;
}

.hero-stat .label {
    font-size: .72rem;
    color: rgba(255,255,255,.6);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: 4px;
}

/* -- CTA Buttons -------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 10px;
    font-size: .92rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--saffron) 0%, var(--saffron-light) 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(255,111,0,.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255,111,0,.45);
    color: #fff;
}

.btn-outline {
    background: rgba(255,255,255,.1);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,.3);
    backdrop-filter: blur(4px);
}

.btn-outline:hover {
    background: rgba(255,255,255,.2);
    color: #fff;
}

.btn-blue {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,102,179,.3);
}

.btn-blue:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,102,179,.4);
    color: #fff;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* -- Section Layout ----------------------------------------- */
.section {
    max-width: 960px;
    margin: 0 auto;
    padding: 48px 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 36px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: .92rem;
    max-width: 480px;
    margin: 0 auto;
}

.section-label {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--saffron);
    margin-bottom: 8px;
}

/* -- How It Works ------------------------------------------- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.step-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--navy), var(--blue));
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 auto 16px;
    box-shadow: 0 4px 12px rgba(0,32,91,.2);
}

.step-card h3 {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.step-card p {
    font-size: .85rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* -- Earnings Tiers ----------------------------------------- */
.tiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.tier-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.tier-card:hover {
    border-color: var(--blue);
    box-shadow: var(--shadow);
}

.tier-card .tier-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.tier-card h4 {
    font-size: .92rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}

.tier-card .tier-amount {
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--saffron), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tier-card p {
    font-size: .8rem;
    color: var(--text-secondary);
    margin-top: 6px;
    line-height: 1.5;
}

/* -- Withdrawal Testimonials (Floating Cards) --------------- */
.testimonials-section {
    background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy) 100%);
    padding: 48px 0;
    overflow: hidden;
    position: relative;
}

.testimonials-section .section-header h2 {
    color: #fff;
}

.testimonials-section .section-header p {
    color: rgba(255,255,255,.6);
}

.testimonials-section .section-label {
    color: var(--gold);
}

.testimonials-section .section-header {
    padding: 0 20px;
}

.scroll-container {
    position: relative;
    height: 520px;
    overflow: hidden;
}

.scroll-container::before,
.scroll-container::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 80px;
    z-index: 2;
    pointer-events: none;
}

.scroll-container::before {
    top: 0;
    background: linear-gradient(180deg, var(--navy-dark) 0%, transparent 100%);
}

.scroll-container::after {
    bottom: 0;
    background: linear-gradient(0deg, var(--navy) 0%, transparent 100%);
}

.scroll-track {
    display: flex;
    gap: 16px;
    padding: 0 20px;
}

.scroll-column {
    flex: 1;
    min-width: 280px;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.scroll-column .scroll-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.scroll-column:nth-child(odd) .scroll-inner {
    animation-name: scrollUp;
}

.scroll-column:nth-child(even) .scroll-inner {
    animation-name: scrollDown;
}

@keyframes scrollUp {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

@keyframes scrollDown {
    0%   { transform: translateY(-50%); }
    100% { transform: translateY(0); }
}

/* -- Withdrawal Card ---------------------------------------- */
.withdrawal-card {
    background: rgba(255,255,255,.06);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius);
    padding: 16px 18px;
    transition: var(--transition);
    flex-shrink: 0;
}

.withdrawal-card:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.2);
    transform: scale(1.02);
}

.wc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.wc-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wc-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .82rem;
    color: #fff;
    flex-shrink: 0;
}

.wc-name {
    font-size: .88rem;
    font-weight: 600;
    color: rgba(255,255,255,.95);
}

.wc-city {
    font-size: .72rem;
    color: rgba(255,255,255,.4);
}

.wc-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .68rem;
    font-weight: 600;
    color: #66bb6a;
    background: rgba(46,125,50,.15);
    padding: 4px 10px;
    border-radius: 50px;
}

.wc-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,.06);
}

.wc-amount {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--gold);
}

.wc-method {
    text-align: right;
}

.wc-method-name {
    font-size: .72rem;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.wc-method-id {
    font-size: .78rem;
    color: rgba(255,255,255,.7);
    font-family: 'SF Mono', 'Fira Code', monospace;
    letter-spacing: .3px;
}

/* -- Payment Methods Bar ------------------------------------ */
.payment-methods {
    background: var(--card);
    border-top: 3px solid var(--saffron);
    padding: 32px 20px;
}

.payment-methods-inner {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.payment-methods h3 {
    font-size: .92rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 20px;
}

.payment-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.payment-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--navy);
    border: 1px solid var(--border);
}

.payment-chip .chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* -- Trust Bar ---------------------------------------------- */
.trust-bar {
    background: var(--blue-pale);
    padding: 20px;
    text-align: center;
}

.trust-bar-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    font-weight: 500;
    color: var(--navy);
}

.trust-item .trust-icon {
    font-size: 1.1rem;
}

/* -- Footer ------------------------------------------------- */
.footer {
    background: var(--navy-dark);
    color: rgba(255,255,255,.5);
    text-align: center;
    padding: 28px 20px;
    font-size: .78rem;
    line-height: 1.8;
}

.footer a {
    color: var(--gold);
}

/* -- CTA Bottom --------------------------------------------- */
.cta-section {
    background: linear-gradient(135deg, var(--saffron) 0%, #e65100 100%);
    padding: 48px 20px;
    text-align: center;
    color: #fff;
}

.cta-section h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.cta-section p {
    font-size: .92rem;
    opacity: .9;
    max-width: 440px;
    margin: 0 auto 24px;
}

.cta-section .btn {
    background: #fff;
    color: var(--saffron);
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
}

.cta-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

/* ============================================================
   DASHBOARD PAGE
   ============================================================ */

.dash-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    gap: 16px;
    color: var(--text-secondary);
}

.dash-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dashboard Grid */
.dash-grid {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dash-profile {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
    border-radius: var(--radius);
    padding: 24px;
    color: #fff;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.dash-profile h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.dash-profile .dash-plan {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 50px;
    background: rgba(255,255,255,.15);
    margin-top: 6px;
}

/* Stats Cards */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.dash-stat-card {
    background: var(--card);
    border-radius: var(--radius-sm);
    padding: 18px 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.dash-stat-card .stat-label {
    font-size: .72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
}

.dash-stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy);
    margin-top: 4px;
}

.dash-stat-card .stat-value.gold {
    color: var(--saffron);
}

.dash-stat-card .stat-value.green {
    color: var(--success);
}

/* Referral Link Card */
.dash-ref-link {
    background: var(--card);
    border-radius: var(--radius-sm);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.dash-ref-link h3 {
    font-size: .92rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 12px;
}

.ref-link-box {
    display: flex;
    gap: 8px;
}

.ref-link-box input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: .82rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--text);
    background: var(--bg);
    outline: none;
}

.ref-link-box input:focus {
    border-color: var(--blue);
}

.ref-link-box button {
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-xs);
    background: var(--blue);
    color: #fff;
    font-weight: 600;
    font-size: .82rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-family: inherit;
}

.ref-link-box button:hover {
    background: var(--navy);
}

.ref-link-box button.copied {
    background: var(--success);
}

/* Withdraw Info Card */
.dash-withdraw {
    background: var(--card);
    border-radius: var(--radius-sm);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.dash-withdraw h3 {
    font-size: .92rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}

.dash-withdraw p {
    font-size: .82rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.withdraw-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: .85rem;
}

.withdraw-detail:last-child {
    border-bottom: none;
}

.withdraw-detail .wd-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.withdraw-detail .wd-value {
    font-weight: 600;
    color: var(--navy);
}

/* -- Live Counter ------------------------------------------- */
.live-counter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: rgba(255,255,255,.7);
    margin-top: 8px;
}

.live-dot {
    width: 7px;
    height: 7px;
    background: #66bb6a;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}

/* -- Responsive --------------------------------------------- */
@media (max-width: 600px) {
    .header-nav { display: none; }
    .scroll-track { flex-direction: column; align-items: center; }
    .scroll-column { max-width: 100%; width: 100%; }
    .scroll-container { height: 440px; }
    .hero-stats { gap: 16px; }
    .hero-stat .number { font-size: 1.3rem; }
    .steps-grid { grid-template-columns: 1fr; }
    .tiers-grid { grid-template-columns: repeat(2, 1fr); }
    .trust-bar-inner { gap: 16px; }
    .payment-logos { gap: 10px; }
}

@media (min-width: 601px) and (max-width: 768px) {
    .scroll-track { justify-content: center; }
}
