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

:root {
    --bg: #070714;
    --surface: #12122a;
    --border: #2a2a4a;
    --primary: #6366f1;
    --accent: #8b5cf6;
    --text: #f1f1ff;
    --muted: #8888aa;
    --radius: 14px;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-text-size-adjust: 100%;
}

/* ── Nav ── */
.nav {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text);
    letter-spacing: -0.5px;
}

.logo span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

footer {
    text-align: center;
    padding: 20px;
    color: var(--muted);
    font-size: 0.82rem;
    border-top: 1px solid var(--border);
}

.footer-link {
    color: var(--muted);
    text-decoration: none;
}
.footer-link:hover { color: var(--text); }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.1s;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.98); }

/* ── Index page ── */
.hero {
    text-align: center;
    max-width: 620px;
    width: 100%;
}

.hero h1 {
    font-size: clamp(1.9rem, 6vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 14px;
    letter-spacing: -1.5px;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero > p {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 16px;
    padding: 0 4px;
}

.form-group {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.input {
    flex: 1;
    min-height: 48px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}
.input:focus { border-color: var(--primary); }
.input::placeholder { color: var(--muted); }

.error-msg {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    text-align: left;
}

.result-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-top: 16px;
    text-align: left;
}

.result-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
    margin-bottom: 10px;
}

.result-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-link {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    word-break: break-all;
    flex: 1;
    text-decoration: none;
}
.result-link:hover { text-decoration: underline; }

.copy-btn {
    min-height: 44px;
    padding: 10px 16px;
    background: var(--border);
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.copy-btn:hover { background: #3a3a5a; }
.copy-btn.copied { color: #4ade80; }

.highlight-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: fit-content;
    margin: 0 auto 16px;
    padding: 6px 14px;
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.2px;
}
.highlight-pill::before {
    content: '✓';
    font-size: 0.75rem;
}

.steps {
    display: flex;
    flex-direction: column;
    margin-top: 40px;
    text-align: left;
    width: 100%;
}

.step-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
}
.step-card:last-child { border-bottom: 1px solid var(--border); }

.step-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    opacity: 0.5;
    padding-top: 3px;
    min-width: 18px;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.step-text { display: flex; flex-direction: column; gap: 2px; }

.step-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.step-desc {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.5;
}

.step-arrow { display: none; }

/* ── Ad page ── */
.ad-page {
    max-width: 600px;
    width: 100%;
    text-align: center;
    padding: 0 4px;
}

.ad-page h2 {
    font-size: clamp(1.4rem, 5vw, 2rem);
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.ad-page .subtitle {
    color: var(--muted);
    margin-bottom: 28px;
    font-size: 0.95rem;
    padding: 0 8px;
}

/* Countdown ring */
.ring-wrap {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 28px;
}

.ring-wrap svg {
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 6;
}

.ring-progress {
    fill: none;
    stroke: url(#ringGrad);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.ring-number {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
}

/* AdSense slot */
.ad-slot {
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin: 0 auto 28px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.85rem;
    width: 100%;
}

.go-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 14px 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
    pointer-events: none;
    opacity: 0.3;
    -webkit-tap-highlight-color: transparent;
}
.go-btn.active {
    pointer-events: auto;
    opacity: 1;
}
.go-btn.active:hover { opacity: 0.88; }

.fine-print {
    color: var(--muted);
    font-size: 0.8rem;
    margin-top: 14px;
    padding: 0 12px;
    line-height: 1.5;
}

/* ── Error pages ── */
.error-page {
    text-align: center;
    padding: 0 16px;
}

.error-page .code {
    font-size: clamp(4rem, 20vw, 7rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 16px;
}

.error-page h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.error-page p {
    color: var(--muted);
    margin-bottom: 28px;
    font-size: 0.95rem;
}

/* ── Prank Ticker ── */
.ticker-section {
    width: 100%;
    max-width: 700px;
    margin-top: 36px;
}

.ticker-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
    text-align: center;
    margin-bottom: 14px;
}

.ticker-overflow {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.ticker-track {
    display: flex;
    flex-direction: row;
    gap: 12px;
    width: max-content;
    animation: tickerScroll 45s linear infinite;
}

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

.prank-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 14px 12px;
    width: 168px;
    flex-shrink: 0;
    text-align: left;
}

.useful-card {
    border-color: rgba(99,102,241,0.35);
    background: rgba(99,102,241,0.06);
}

.prank-emoji {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 7px;
    line-height: 1;
}

.prank-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 7px;
    line-height: 1.3;
}

.prank-sent {
    font-size: 0.68rem;
    color: var(--muted);
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 4px;
}

.prank-arrow {
    font-size: 0.6rem;
    color: var(--border);
    margin-bottom: 3px;
}

.prank-actually {
    font-size: 0.68rem;
    color: var(--primary);
    font-weight: 600;
    line-height: 1.4;
}

.useful-card .prank-actually {
    color: #a78bfa;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    main { padding: 28px 16px; }
    .form-group { flex-direction: column; }
    .btn { width: 100%; }
    .result-row { flex-wrap: wrap; }
    .copy-btn { width: 100%; justify-content: center; }
    .go-btn { width: 100%; }
    .ad-page .subtitle { font-size: 0.9rem; }
    .steps { margin-top: 32px; }
    .hero h1 { letter-spacing: -0.5px; }
}
