/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --red:    #ff0000;
    --red-d:  #cc0000;
    --dark:   #0f0f0f;
    --dark2:  #1a1a1a;
    --dark3:  #242424;
    --border: #333;
    --text:   #e8e8e8;
    --muted:  #888;
    --white:  #fff;
    --green:  #22c55e;
    --yellow: #f59e0b;
    --radius: 12px;
    --shadow: 0 2px 16px rgba(0,0,0,.5);
}
body { background: var(--dark); color: var(--text); font-family: 'Segoe UI', system-ui, sans-serif; font-size: 15px; line-height: 1.6; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ===== LAYOUT ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem; }

/* ===== NAVBAR ===== */
.navbar {
    background: var(--dark2);
    border-bottom: 1px solid var(--border);
    padding: .75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky; top: 0; z-index: 100;
}
.nav-brand { font-size: 1.3rem; font-weight: 700; color: var(--white); }
.nav-brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 1rem; }
.nav-links a { color: var(--text); font-size: .9rem; }
.coin-badge { background: var(--dark3); border: 1px solid var(--border); padding: .25rem .75rem; border-radius: 20px; font-size: .85rem; color: var(--yellow); }

/* ===== CARD ===== */
.card { background: var(--dark2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--red); color: var(--white);
    border: none; border-radius: 8px;
    padding: .55rem 1.2rem; font-size: .9rem; font-weight: 600;
    cursor: pointer; transition: background .2s;
    text-decoration: none;
}
.btn:hover { background: var(--red-d); text-decoration: none; color: var(--white); }
.btn-lg { padding: .75rem 1.8rem; font-size: 1rem; }
.btn-sm { padding: .35rem .8rem; font-size: .8rem; }
.btn-block { width: 100%; }
.btn-outline { background: transparent; border: 1px solid var(--red); color: var(--red); }
.btn-outline:hover { background: var(--red); color: var(--white); }
.btn-success { background: var(--green); }
.btn-success:hover { background: #16a34a; }
.btn-group { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ===== ALERTS ===== */
.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; }
.alert-success { background: #14532d; border: 1px solid var(--green); color: #86efac; }
.alert-error   { background: #450a0a; border: 1px solid var(--red); color: #fca5a5; }
.alert-info    { background: #1e3a5f; border: 1px solid #3b82f6; color: #93c5fd; }

/* ===== FORMS ===== */
.form { display: flex; flex-direction: column; gap: .9rem; }
.form label { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; color: var(--muted); }
.form input, .form select, .form textarea {
    background: var(--dark3); border: 1px solid var(--border);
    color: var(--text); border-radius: 8px; padding: .6rem .9rem;
    font-size: .95rem; width: 100%;
}
.form input:focus, .form select:focus { outline: none; border-color: var(--red); }
.form-inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.form-inline label { flex: 1; min-width: 160px; }
.compact { flex-direction: row; align-items: center; gap: .5rem; flex-wrap: wrap; }
.file-label { flex-direction: row !important; align-items: center; gap: .5rem; }

/* ===== MUTED / SMALL ===== */
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.text-center { text-align: center; }
.accent { color: var(--red); }

/* ===== SECTION TITLES ===== */
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: .5rem; }
.section-lead  { margin-bottom: 1.5rem; }

/* ===== HERO ===== */
.yt-hero { text-align: center; padding: 3rem 1rem 2rem; }
.yt-hero-badge { display: inline-block; background: var(--red); color: var(--white); font-size: .75rem; font-weight: 700; padding: .25rem .75rem; border-radius: 20px; margin-bottom: .75rem; letter-spacing: .05em; }
.yt-hero h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.2; margin-bottom: .75rem; }
.yt-hero-sub { color: var(--muted); max-width: 560px; margin: 0 auto; }

/* ===== CHANNEL LOOKUP ===== */
.yt-tool-section { margin-bottom: 2rem; }
.yt-tool-card { max-width: 700px; margin: 0 auto; }
.tool-heading { font-size: 1.2rem; margin-bottom: .5rem; }
.yt-lookup-form { margin-top: 1rem; }
.yt-input-row { display: flex; gap: .5rem; }
.yt-input-row input {
    flex: 1; background: var(--dark3); border: 1px solid var(--border);
    color: var(--text); border-radius: 8px; padding: .65rem 1rem; font-size: .95rem;
}
.yt-input-row input:focus { outline: none; border-color: var(--red); }
.input-hint { margin-top: .4rem; }

/* ===== CHANNEL INFO CARD ===== */
.yt-channel-result { margin-bottom: 2rem; }
.channel-info-card {
    display: flex; align-items: center; gap: 1.2rem;
    margin-bottom: 2rem;
}
.channel-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.channel-name { font-size: 1.3rem; font-weight: 700; margin-bottom: .4rem; }
.channel-stats { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.stat-pill { background: var(--dark3); border: 1px solid var(--border); padding: .2rem .7rem; border-radius: 20px; font-size: .82rem; }
.channel-desc { margin-top: .4rem; }

/* ===== SERVICES GRID ===== */
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.service-card { display: flex; flex-direction: column; gap: .6rem; }
.service-icon { font-size: 2rem; }
.service-name { font-size: 1.05rem; font-weight: 700; }
.service-desc { }
.packages-list { display: flex; flex-direction: column; gap: .4rem; margin-top: .5rem; }
.package-row { display: flex; align-items: center; gap: .5rem; padding: .4rem .6rem; background: var(--dark3); border-radius: 8px; }
.pkg-qty { flex: 1; font-size: .88rem; font-weight: 600; }
.pkg-coins { font-size: .82rem; color: var(--yellow); white-space: nowrap; }

/* ===== CTA BOX ===== */
.cta-box { text-align: center; padding: 2rem; margin-bottom: 2rem; }
.cta-box h3 { font-size: 1.3rem; margin-bottom: .75rem; }
.cta-box ol { text-align: left; display: inline-block; margin: .75rem 0 1.25rem; }
.cta-box ol li { margin-bottom: .3rem; }
.cta-box .btn { margin: .3rem; }

/* ===== HOW IT WORKS ===== */
.how-section { margin-bottom: 3rem; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-top: 1rem; }
.step-card { text-align: center; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: var(--red); color: var(--white); border-radius: 50%; font-weight: 700; font-size: 1.1rem; margin-bottom: .5rem; }
.step-card h3 { margin-bottom: .3rem; }

/* ===== AUTH ===== */
.auth-wrap { display: flex; justify-content: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { margin-bottom: .25rem; }
.auth-card .form { margin-top: 1.2rem; }

/* ===== DASHBOARD ===== */
.dash-layout { display: flex; gap: 1.5rem; align-items: flex-start; }
.dash-sidebar { width: 220px; flex-shrink: 0; position: sticky; top: 70px; }
.user-info-box { background: var(--dark2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: .75rem; display: flex; align-items: center; gap: .75rem; }
.user-avatar { font-size: 2rem; }
.coin-big { color: var(--yellow); font-weight: 700; font-size: .95rem; }
.dash-nav { background: var(--dark2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.dash-nav a { display: block; padding: .65rem 1rem; color: var(--text); font-size: .9rem; border-bottom: 1px solid var(--border); transition: background .15s; }
.dash-nav a:last-child { border-bottom: none; }
.dash-nav a:hover, .dash-nav a.active { background: var(--dark3); color: var(--white); text-decoration: none; }
.dash-main { flex: 1; min-width: 0; }
.dash-main h1 { font-size: 1.4rem; margin-bottom: 1rem; }
.dash-main h2 { font-size: 1.1rem; margin: 1.2rem 0 .6rem; }

/* ===== STATS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { text-align: center; }
.stat-val { font-size: 1.5rem; font-weight: 700; color: var(--white); }
.stat-label { font-size: .8rem; color: var(--muted); margin-top: .2rem; }

/* ===== QUICK ACTIONS ===== */
.qa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }
.qa-card { text-align: center; padding: 1rem; font-weight: 600; font-size: .9rem; color: var(--text); transition: background .15s; }
.qa-card:hover { background: var(--dark3); text-decoration: none; color: var(--white); }

/* ===== EARN ===== */
.earn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.earn-card { text-align: center; }
.earn-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.earn-card h2 { font-size: 1.05rem; margin-bottom: .4rem; }
.earn-card .btn { margin-top: .75rem; }
.ad-placeholder { background: var(--dark3); border: 2px dashed var(--border); border-radius: 10px; padding: 2rem; margin-bottom: 1rem; }
.ad-timer-bar { background: var(--border); border-radius: 4px; height: 6px; margin: .75rem 0; overflow: hidden; }
#ad-progress { height: 100%; background: var(--red); width: 0; transition: width 1s linear; }
.cooldown-box { background: var(--dark3); border-radius: 8px; padding: 1rem; }

/* ===== TASKS ===== */
.task-list { display: flex; flex-direction: column; gap: .75rem; }
.task-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.task-row > div:first-child { flex: 1; min-width: 200px; }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { padding: .6rem .8rem; border-bottom: 1px solid var(--border); text-align: left; }
.table th { color: var(--muted); font-weight: 600; background: var(--dark3); }
.table tr:hover td { background: var(--dark3); }

/* ===== BADGES ===== */
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.badge-pending    { background: #451a03; color: var(--yellow); }
.badge-approved, .badge-completed { background: #14532d; color: #86efac; }
.badge-rejected, .badge-cancelled { background: #450a0a; color: #fca5a5; }
.badge-processing { background: #1e3a5f; color: #93c5fd; }
.badge-active     { background: #14532d; color: #86efac; }

/* ===== REFERRAL ===== */
.referral-card { max-width: 500px; }
.ref-link-box { display: flex; gap: .5rem; margin: 1rem 0; }
.ref-link-box input { flex: 1; background: var(--dark3); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: .6rem .9rem; font-size: .85rem; }

/* ===== FOOTER ===== */
.site-footer { text-align: center; padding: 2rem 1rem; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--border); margin-top: 3rem; }

/* ===== PILL GRID ===== */
.pill-grid { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.platform-pill { background: var(--dark3); border: 1px solid var(--border); padding: .3rem .9rem; border-radius: 20px; font-size: .85rem; }

/* ===== YT LOOKUP DASH ===== */
.yt-lookup-dash { margin-bottom: 1.5rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .dash-layout { flex-direction: column; }
    .dash-sidebar { width: 100%; position: static; }
    .dash-nav { display: flex; flex-wrap: wrap; }
    .dash-nav a { border-bottom: none; border-right: 1px solid var(--border); flex: 1; text-align: center; font-size: .8rem; padding: .5rem; }
    .channel-info-card { flex-direction: column; text-align: center; }
    .yt-input-row { flex-direction: column; }
    .form-inline { flex-direction: column; }
}

/* ===== TASKS PAGE ===== */
.tasks-page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.25rem; flex-wrap: wrap; gap: .75rem;
}
.tasks-page-header h1 { margin-bottom: .1rem; }
.tasks-header-balance {
    display: flex; flex-direction: column; align-items: flex-end;
    background: var(--dark2); border: 1px solid var(--border);
    border-radius: 10px; padding: .5rem 1rem;
}
.balance-amount { font-size: 1.1rem; font-weight: 700; color: var(--yellow); }

/* Tab switcher */
.tasks-tabs {
    display: flex; gap: .4rem; margin-bottom: 1.5rem;
    background: var(--dark2); border: 1px solid var(--border);
    border-radius: 10px; padding: .3rem;
}
.ttab {
    flex: 1; background: transparent; border: none; color: var(--muted);
    padding: .55rem .75rem; border-radius: 8px; font-size: .88rem;
    font-weight: 600; cursor: pointer; transition: all .15s;
    display: flex; align-items: center; justify-content: center; gap: .4rem;
}
.ttab:hover { color: var(--white); background: var(--dark3); }
.ttab.active { background: var(--red); color: var(--white); }
.ttab-count {
    background: rgba(255,255,255,.15); border-radius: 20px;
    padding: .05rem .45rem; font-size: .75rem;
}
.ttab.active .ttab-count { background: rgba(255,255,255,.25); }
.ttab-panel { display: none; }
.ttab-panel.active { display: block; }

/* No channel box */
.no-channel-box {
    text-align: center; padding: 3rem 1.5rem;
    background: var(--dark2); border: 2px dashed var(--border);
    border-radius: var(--radius);
}
.no-channel-icon { font-size: 3rem; margin-bottom: .75rem; }
.no-channel-box h3 { margin-bottom: .5rem; }
.no-channel-box p { color: var(--muted); margin-bottom: 1.25rem; }

/* Create task layout */
.create-task-wrapper { display: grid; grid-template-columns: 1fr 300px; gap: 1.25rem; align-items: start; }
.create-task-form-col { display: flex; flex-direction: column; gap: 1rem; }

/* Channel badge */
.channel-badge-box {
    display: flex; align-items: center; gap: .75rem;
    background: linear-gradient(135deg, #1a1a1a, #242424);
    border: 1px solid #ff000033; border-radius: 10px;
    padding: .75rem 1rem;
}
.ch-badge-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--red); }
.ch-badge-info { flex: 1; display: flex; flex-direction: column; }
.ch-badge-label { font-size: .72rem; color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.ch-badge-name { font-size: .95rem; font-weight: 700; color: var(--white); }
.ch-badge-yt { font-size: 1.2rem; color: var(--red); }

/* Form steps */
.form-step {
    background: var(--dark2); border: 1px solid var(--border);
    border-radius: 10px; padding: 1rem 1.1rem;
}
.step-label {
    display: flex; align-items: center; gap: .6rem;
    font-size: .9rem; font-weight: 700; color: var(--white); margin-bottom: .85rem;
}
.step-num-badge {
    width: 22px; height: 22px; background: var(--red); color: var(--white);
    border-radius: 50%; font-size: .75rem; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* Service type cards */
.stype-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
.stype-card {
    background: var(--dark3); border: 1.5px solid var(--border);
    border-radius: 10px; padding: .65rem .4rem;
    display: flex; flex-direction: column; align-items: center; gap: .25rem;
    cursor: pointer; transition: all .15s; text-align: center;
}
.stype-card:hover { border-color: var(--red); transform: translateY(-1px); }
.stype-card.active { border-color: var(--red); background: #ff000015; }
.stype-icon { font-size: 1.4rem; }
.stype-name { font-size: .78rem; font-weight: 700; color: var(--white); }
.stype-rate { font-size: .7rem; color: var(--yellow); }

/* Link input */
.link-input-wrap {
    display: flex; align-items: center; gap: .6rem;
    background: var(--dark3); border: 1px solid var(--border);
    border-radius: 8px; padding: 0 .9rem;
    transition: border-color .15s;
}
.link-input-wrap:focus-within { border-color: var(--red); }
.link-hint-text { font-size: .82rem; color: var(--muted); margin-top: .35rem; }
.link-error-box {
    display: flex; align-items: flex-start; gap: .5rem;
    background: #450a0a; border: 1px solid #f87171;
    border-radius: 8px; padding: .6rem .85rem;
    font-size: .85rem; color: #fca5a5; margin-top: .5rem;
}
.link-error-icon { flex-shrink: 0; }
.link-input-icon { font-size: 1rem; color: var(--muted); flex-shrink: 0; }
.link-input-wrap input {
    flex: 1; background: transparent; border: none;
    color: var(--text); padding: .65rem 0; font-size: .9rem; outline: none;
}

/* Qty + calc */
.qty-calc-grid { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: center; }
.qty-input-box {
    display: flex; align-items: center; gap: 0;
    background: var(--dark3); border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.qty-btn {
    background: var(--dark3); border: none; color: var(--text);
    width: 36px; height: 42px; font-size: 1.2rem; cursor: pointer;
    transition: background .15s;
}
.qty-btn:hover { background: var(--border); }
.qty-input-box input {
    width: 70px; background: transparent; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border);
    color: var(--white); text-align: center; font-size: 1rem; font-weight: 700;
    padding: .5rem 0; outline: none;
}
.calc-box {
    background: var(--dark3); border: 1px solid var(--border);
    border-radius: 8px; padding: .65rem .9rem;
    display: flex; flex-direction: column; gap: .3rem;
}
.calc-row { display: flex; justify-content: space-between; align-items: center; font-size: .88rem; }
.calc-val { font-weight: 700; color: var(--white); }
.total-coins { font-size: 1rem; }
.calc-divider { height: 1px; background: var(--border); margin: .2rem 0; }

/* Submit btn */
.task-submit-btn { margin-top: .25rem; gap: .5rem; }
.task-submit-btn:disabled { cursor: not-allowed; }

/* Info panel */
.create-task-info-col { display: flex; flex-direction: column; gap: 1rem; }
.info-panel h3, .rates-panel h3 { font-size: .95rem; margin-bottom: .85rem; }
.info-steps { display: flex; flex-direction: column; gap: .75rem; }
.info-step { display: flex; gap: .65rem; align-items: flex-start; }
.info-step-num {
    width: 22px; height: 22px; background: var(--dark3); border: 1px solid var(--border);
    border-radius: 50%; font-size: .75rem; font-weight: 700; color: var(--red);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: .1rem;
}
.info-step strong { font-size: .88rem; display: block; margin-bottom: .1rem; }
.rates-list { display: flex; flex-direction: column; gap: .4rem; }
.rate-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: .35rem .5rem; background: var(--dark3); border-radius: 6px; font-size: .85rem;
}
.rate-coins { color: var(--yellow); font-weight: 700; font-size: .8rem; }

/* Open tasks grid */
.earn-tasks-header { margin-bottom: 1rem; }
.earn-tasks-header h2 { font-size: 1.1rem; margin-bottom: .2rem; }
.open-tasks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.open-task-card { display: flex; flex-direction: column; gap: .6rem; padding: 1.1rem; }
.otc-header { display: flex; justify-content: space-between; align-items: center; }
.otc-type-badge {
    display: inline-flex; align-items: center; gap: .3rem;
    border: 1px solid var(--border); border-radius: 6px;
    padding: .2rem .6rem; font-size: .8rem; font-weight: 700;
}
.otc-reward { font-size: 1rem; font-weight: 800; color: var(--yellow); }
.otc-channel { font-size: .82rem; display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.otc-link {
    display: flex; align-items: center; gap: .4rem;
    font-size: .8rem; color: var(--muted); word-break: break-all;
    background: var(--dark3); border-radius: 6px; padding: .35rem .6rem;
}
.otc-link:hover { color: var(--red); text-decoration: none; }
.otc-link-icon { flex-shrink: 0; }
.otc-progress { display: flex; flex-direction: column; gap: .25rem; }
.otc-progress-bar { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.otc-progress-fill { height: 100%; background: var(--red); border-radius: 3px; transition: width .3s; }
.otc-form { display: flex; flex-direction: column; gap: .5rem; margin-top: .25rem; }
.proof-upload-label { cursor: pointer; }
.proof-upload-label input[type=file] { display: none; }
.proof-upload-btn {
    display: block; text-align: center;
    background: var(--dark3); border: 1.5px dashed var(--border);
    border-radius: 8px; padding: .55rem; font-size: .85rem; color: var(--muted);
    transition: border-color .15s;
}
.proof-upload-label:hover .proof-upload-btn { border-color: var(--red); color: var(--white); }

/* My tasks list */
.my-tasks-list { display: flex; flex-direction: column; gap: .75rem; }
.my-task-card { padding: 1.1rem; }
.mtc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.mtc-left { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.mtc-stats { display: flex; gap: 1.5rem; margin-top: .5rem; flex-wrap: wrap; }
.mtc-stat { display: flex; flex-direction: column; }
.mtc-stat-val { font-size: 1rem; font-weight: 700; color: var(--white); }

/* Empty state */
.empty-state {
    text-align: center; padding: 3rem 1rem;
    color: var(--muted);
}
.empty-icon { font-size: 3rem; margin-bottom: .75rem; }
.empty-state p { margin-bottom: .5rem; }
.empty-state .btn { margin-top: .75rem; }

/* Responsive tasks */
@media (max-width: 900px) {
    .create-task-wrapper { grid-template-columns: 1fr; }
    .create-task-info-col { flex-direction: row; }
    .info-panel, .rates-panel { flex: 1; }
}
@media (max-width: 600px) {
    .stype-grid { grid-template-columns: repeat(3, 1fr); }
    .tasks-tabs { flex-wrap: wrap; }
    .ttab { font-size: .78rem; padding: .45rem .5rem; }
    .create-task-info-col { flex-direction: column; }
    .qty-calc-grid { grid-template-columns: 1fr; }
}
