:root {
    --bg: #0a0a0f;
    --surface: #12121a;
    --surface2: #1a1a26;
    --border: #2a2a40;
    --primary: #7c3aed;
    --primary-hover: #6d28d9;
    --primary-glow: rgba(124, 58, 237, 0.3);
    --accent: #a855f7;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --success: #10b981;
    --error: #ef4444;
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* ── NAVBAR ── */
.navbar {
    background: rgba(18, 18, 26, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

.navbar-brand span { color: var(--accent); }

.navbar-brand img { width: 36px; height: 36px; border-radius: 50%; }

.navbar-links { display: flex; gap: 1.5rem; list-style: none; }
.navbar-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.navbar-links a:hover { color: var(--text); }

/* ── HERO ── */
.hero {
    text-align: center;
    padding: 5rem 2rem 3rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--accent);
    padding: 0.3rem 1rem;
    border-radius: 999px;
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.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(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 2.5rem;
}

/* ── GRID DE FERRAMENTAS ── */
.tools-section {
    padding: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    display: block;
}

.tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-glow), transparent);
    opacity: 0;
    transition: opacity 0.25s;
}

.tool-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.2);
}

.tool-card:hover::before { opacity: 1; }

.tool-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1rem;
    position: relative;
}

.tool-icon.ig { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.tool-icon.tt { background: #010101; border: 1px solid #333; }
.tool-icon.yt { background: #ff0000; }
.tool-icon.stk { background: linear-gradient(135deg, var(--primary), var(--accent)); }

.tool-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.4rem; }
.tool-card p { color: var(--text-muted); font-size: 0.88rem; }

/* ── FERRAMENTA PAGE ── */
.tool-page {
    max-width: 700px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tool-header .tool-icon { margin-bottom: 0; width: 56px; height: 56px; }
.tool-header h1 { font-size: 1.8rem; font-weight: 800; }
.tool-header p { color: var(--text-muted); font-size: 0.9rem; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

/* ── FORM ── */
.input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.input-group input {
    flex: 1;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.2rem;
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus { border-color: var(--primary); }
.input-group input::placeholder { color: var(--text-muted); }

.btn {
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    white-space: nowrap;
}

.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-download {
    background: var(--success);
    color: #fff;
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.btn-download:hover { background: #059669; }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--accent); }

/* Upload area */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.upload-area:hover, .upload-area.drag { border-color: var(--primary); background: var(--primary-glow); }
.upload-area input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-area .upload-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.upload-area p { color: var(--text-muted); }
.upload-area .file-name { color: var(--accent); font-weight: 600; margin-top: 0.5rem; }

/* Tab buttons (YouTube) */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--surface2);
    padding: 0.4rem;
    border-radius: var(--radius-sm);
}

.tab-btn {
    flex: 1;
    padding: 0.6rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--primary);
    color: #fff;
}

/* ── RESULTADO ── */
.result-box { display: none; }
.result-box.show { display: block; }

.result-media {
    width: 100%;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    max-height: 400px;
    object-fit: contain;
    background: var(--bg);
}

.result-info h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.3rem; }
.result-info p { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 0.2rem; }

.result-items { display: flex; flex-direction: column; gap: 0.75rem; }

.result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface2);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
}

.result-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.result-item-info { flex: 1; min-width: 0; }
.result-item-info span {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* ── LOADING ── */
.loading {
    display: none;
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.loading.show { display: block; }
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

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

/* ── ERRO ── */
.error-box {
    display: none;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    padding: 1rem;
    color: var(--error);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.error-box.show { display: block; }

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

footer a { color: var(--accent); text-decoration: none; }

/* ── ADS ── */
.ad-banner {
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 1.5rem 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
    .navbar { padding: 0 1rem; }
    .navbar-links { display: none; }
    .input-group { flex-direction: column; }
    .hero { padding: 3rem 1.5rem 2rem; }
    .tools-section { padding: 1.5rem; }
}
