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

:root {
    --bg: #03050e;
    --surface: rgba(10,14,30,0.85);
    --surface-2: rgba(255,255,255,0.04);
    --border: rgba(255,255,255,0.08);
    --border-glow: rgba(99,102,241,0.5);
    --cyan: #00f5d4;
    --purple: #6366f1;
    --pink: #f472b6;
    --gold: #fbbf24;
    --red: #ef4444;
    --orange: #f97316;
    --green: #10b981;
    --text: #f1f5f9;
    --muted: #64748b;
    --r: 20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Cairo', 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    overflow-x: hidden;
    padding: 20px;
    position: relative;
}

/* ── Animated mesh background ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(99,102,241,0.18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(0,245,212,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 60% 40%, rgba(244,114,182,0.08) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
    animation: meshShift 20s ease-in-out infinite alternate;
}

@keyframes meshShift {
    0%   { opacity: 1; transform: scale(1); }
    100% { opacity: 0.8; transform: scale(1.06); }
}

/* Moving grid lines */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(99,102,241,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,102,241,0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
    animation: gridMove 30s linear infinite;
}

@keyframes gridMove {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* ── Layout ── */
.container { width: 100%; max-width: 480px; z-index: 10; position: relative; }

/* ── Logo row ── */
.logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.logo-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--purple), var(--cyan));
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    box-shadow: 0 0 24px rgba(99,102,241,0.5);
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 0 24px rgba(99,102,241,0.5); }
    50%       { box-shadow: 0 0 40px rgba(0,245,212,0.6); }
}

.logo-text { line-height: 1.2; }
.logo-text strong { font-size: 18px; font-weight: 900; letter-spacing: -0.3px; }
.logo-text span   { font-size: 12px; color: var(--muted); display: block; }

/* ── Main card ── */
.glass-card {
    background: var(--surface);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 32px 28px;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.03) inset,
        0 40px 80px rgba(0,0,0,0.6);
    position: relative;
    overflow: hidden;
}

/* Shimmer top border */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--purple), var(--cyan), transparent);
    animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
    0%   { opacity: 0.4; left: 10%; right: 50%; }
    50%  { opacity: 1;   left: 10%; right: 10%; }
    100% { opacity: 0.4; left: 50%; right: 10%; }
}

/* ── Step Progress ── */
.progress-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    margin-bottom: 32px;
    position: relative;
}

.progress-line {
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 2px;
    background: var(--border);
    transform: translateY(-50%);
    z-index: 0;
}

.progress-line-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--purple), var(--cyan));
    transition: width 0.5s cubic-bezier(.4,0,.2,1);
    width: 0%;
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(0,245,212,0.6);
}

.step-node {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: #080d1f;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800;
    color: var(--muted);
    z-index: 2;
    position: relative;
    transition: all 0.35s ease;
    flex-shrink: 0;
}

.step-node.active {
    border-color: var(--cyan);
    background: linear-gradient(135deg, var(--purple), var(--cyan));
    color: #000;
    box-shadow: 0 0 20px rgba(0,245,212,0.5);
    transform: scale(1.1);
}

.step-node.done {
    border-color: var(--purple);
    background: var(--purple);
    color: #fff;
}

.step-node.done::after {
    content: '✓';
    position: absolute;
    font-size: 14px;
    font-weight: 900;
}

.step-node.done span { display: none; }

/* ── Step content ── */
.step-content { display: none; animation: slideUp 0.4s ease; }
.step-content.active { display: block; }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ── Reward badge ── */
.reward-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(0,245,212,0.15));
    border: 1px solid rgba(99,102,241,0.35);
    font-size: 13px;
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 14px;
}

.step-title {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.4px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.step-desc {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

/* ── UUID Input ── */
.input-wrap { margin-bottom: 20px; }

.input-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.input-field {
    width: 100%;
    padding: 15px 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-size: 14px;
    font-family: 'Inter', monospace;
    direction: ltr;
    text-align: center;
    letter-spacing: 0.5px;
    transition: all 0.25s;
}

.input-field::placeholder { color: rgba(255,255,255,0.2); }

.input-field:focus {
    outline: none;
    border-color: var(--purple);
    background: rgba(99,102,241,0.07);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

/* ── Buttons ── */
.btn-primary {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1 0%, #00f5d4 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.2px;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-primary:hover:not(:disabled)::after { opacity: 1; }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(99,102,241,0.4); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-primary:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: rgba(255,255,255,0.1);
    color: var(--muted);
    box-shadow: none;
}

.btn-secondary {
    width: 100%;
    padding: 14px 24px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s;
    margin-top: 10px;
}

.btn-secondary:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); }

/* ── Timer badge ── */
.timer-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 12px;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.25);
    color: #f87171;
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.timer-badge::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--red);
    border-radius: 4px 0 0 4px;
    animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.timer-badge.ready {
    background: rgba(16,185,129,0.1);
    border-color: rgba(16,185,129,0.3);
    color: var(--green);
}

.timer-badge.ready::before { background: var(--green); animation: none; }

/* ── Ad Box ── */
.ad-box {
    border-radius: 16px;
    overflow: hidden;
    margin: 20px 0;
    min-height: 240px;
    background: rgba(0,0,0,0.3);
    border: 1px dashed rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.ad-box-label {
    font-size: 11px;
    color: rgba(255,255,255,0.2);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ── Info card (steps info) ── */
.info-card {
    background: rgba(99,102,241,0.07);
    border: 1px solid rgba(99,102,241,0.18);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #a5b4fc;
    line-height: 1.7;
    text-align: right;
}

.info-card li { list-style: none; margin-bottom: 5px; }
.info-card li::before { content: '◆ '; color: var(--cyan); font-size: 10px; }

/* ── Success box ── */
.success-box {
    display: none;
    text-align: center;
    padding: 28px 20px;
    animation: successPop 0.5s cubic-bezier(.17,.67,.35,1.3);
}

@keyframes successPop {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}

.success-emoji { font-size: 64px; margin-bottom: 16px; animation: bounce 1s ease-in-out infinite; }
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

.success-title {
    font-size: 26px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.success-uuid {
    font-size: 12px;
    font-family: 'Inter', monospace;
    color: var(--cyan);
    background: rgba(0,245,212,0.08);
    border: 1px solid rgba(0,245,212,0.2);
    border-radius: 10px;
    padding: 10px 16px;
    word-break: break-all;
    direction: ltr;
    margin-top: 12px;
}

/* ── Blocker overlays ── */
.blocker-overlay {
    position: fixed; inset: 0;
    background: rgba(3,5,14,0.97);
    backdrop-filter: blur(30px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.blocker-overlay.show {
    display: flex;
    animation: overlayIn 0.3s ease;
}

@keyframes overlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.blocker-card {
    max-width: 440px;
    width: 100%;
    background: rgba(12,8,20,0.9);
    border: 1px solid rgba(239,68,68,0.35);
    border-radius: 28px;
    padding: 44px 32px;
    text-align: center;
    box-shadow: 0 0 80px rgba(239,68,68,0.2), 0 0 0 1px rgba(239,68,68,0.1) inset;
    animation: cardIn 0.4s cubic-bezier(.17,.67,.35,1.2);
}

.brave-card {
    border-color: rgba(249,115,22,0.4);
    box-shadow: 0 0 80px rgba(249,115,22,0.2), 0 0 0 1px rgba(249,115,22,0.1) inset;
}

@keyframes cardIn {
    from { transform: scale(0.92) translateY(20px); opacity: 0; }
    to   { transform: scale(1) translateY(0);       opacity: 1; }
}

.blocker-icon { font-size: 64px; margin-bottom: 20px; }

.blocker-title {
    font-size: 22px;
    font-weight: 900;
    color: #f87171;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.brave-card .blocker-title { color: #fb923c; }

.blocker-desc {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.75;
    margin-bottom: 24px;
}

.steps-list {
    background: rgba(0,0,0,0.3);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 24px;
    text-align: right;
}

.steps-list li {
    list-style: none;
    font-size: 13px;
    color: #94a3b8;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.steps-list li:last-child { border-bottom: none; }

.btn-adblock {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 30px rgba(239,68,68,0.3);
}

.btn-adblock:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(239,68,68,0.45); }

.btn-brave {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 30px rgba(249,115,22,0.3);
}

.btn-brave:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(249,115,22,0.45); }

/* ── Turnstile center ── */
.cf-turnstile { display: flex; justify-content: center; margin: 20px 0; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.4); border-radius: 10px; }

/* ── Mobile ── */
@media (max-width: 480px) {
    .glass-card  { padding: 24px 18px; border-radius: 22px; }
    .step-title  { font-size: 19px; }
    .blocker-card { padding: 32px 22px; border-radius: 22px; }
}
