/* =========================================
   1. RESET E BASE
   ========================================= */
:root {
    --primary-blue: #2563eb;
    --primary-dark: #1e40af;
    --snaptik-green: #22c55e;
    --snaptik-green-hover: #16a34a;
    --bg-color: #f8fafc;
    --text-main: #334155;
    --text-muted: #64748b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
    line-height: 1.6; 
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
ul, ol { list-style: none; }

/* =========================================
   2. HEADER (Topo)
   ========================================= */
.nav-header { 
    background: white; 
    padding: 15px 5%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); 
    position: sticky; top: 0; z-index: 100;
}

.logo { 
    font-weight: 800; 
    font-size: 1.6rem; 
    letter-spacing: -1px; 
    color: var(--primary-blue); 
}
.logo span { color: #0f172a; }

/* --- MENU DE IDIOMAS PERSONALIZADO (NOVO) --- */
.custom-lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-btn {
    background-color: #f1f5f9;
    color: #334155;
    padding: 8px 15px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.lang-btn:hover {
    background-color: #e2e8f0;
    color: var(--primary-blue);
}

.lang-content {
    display: none;
    position: absolute;
    right: 0;
    top: 110%; /* Fica logo abaixo do botão */
    background-color: white;
    min-width: 120px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    z-index: 200;
    overflow: hidden;
    animation: fadeIn 0.2s ease;
}

.custom-lang-dropdown:hover .lang-content {
    display: block;
}

.lang-content a {
    color: #334155;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid #f8fafc;
}

.lang-content a:hover {
    background-color: #f8fafc;
    color: var(--primary-blue);
}
.lang-content a:last-child { border-bottom: none; }

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero-section { 
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white; 
    padding: 60px 20px 100px; 
    text-align: center; 
    position: relative;
}

.hero-content { max-width: 800px; margin: 0 auto; }

.hero-title { 
    font-size: 2.8rem; font-weight: 800; margin-bottom: 10px; 
    letter-spacing: -1px; line-height: 1.1; 
}
.hero-subtitle { font-size: 1.1rem; color: #dbeafe; margin-bottom: 30px; }

/* =========================================
   4. CAIXA DE BUSCA (SnapTik Verde)
   ========================================= */
.search-container { width: 100%; max-width: 700px; margin: 0 auto; }
.search-form { display: flex; flex-direction: column; gap: 15px; }

.input-group {
    display: flex; background: white; border-radius: 8px; 
    padding: 5px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); 
    align-items: center;
}

.search-input { 
    flex: 1; border: none; padding: 15px 20px; font-size: 1.1rem; 
    outline: none; border-radius: 8px 0 0 8px; color: #333; 
}

.btn-paste {
    background: transparent; color: var(--primary-blue); border: none; 
    font-weight: 600; font-size: 0.95rem; padding: 10px 20px; cursor: pointer; 
    display: flex; align-items: center; gap: 6px; border-left: 1px solid #f1f5f9; 
    height: 40px; transition: color 0.2s;
}
.btn-paste:hover { color: var(--primary-dark); background: #f8fafc; border-radius: 0 8px 8px 0; }

.btn-download { 
    background-color: var(--snaptik-green); color: white; border: none; 
    padding: 16px; border-radius: 8px; font-weight: 800; font-size: 1.2rem; 
    cursor: pointer; transition: all 0.2s ease; 
    box-shadow: 0 4px 6px -1px rgba(22, 163, 74, 0.4); 
    display: flex; align-items: center; justify-content: center; gap: 10px; 
    text-transform: uppercase; letter-spacing: 0.5px;
}
.btn-download:hover { 
    background-color: var(--snaptik-green-hover); transform: translateY(-2px); 
    box-shadow: 0 10px 15px -3px rgba(22, 163, 74, 0.5);
}

.error-msg {
    margin-top: 15px; background: #fee2e2; color: #b91c1c; padding: 12px; 
    border-radius: 8px; font-size: 0.9rem; border: 1px solid #fca5a5;
}

/* =========================================
   5. RESULTADO E CONTEÚDO
   ========================================= */
main { flex: 1; width: 100%; max-width: 900px; margin: 40px auto; padding: 0 20px; }

.result-box { 
    background: white; border-radius: 12px; padding: 25px; 
    width: 100%; max-width: 600px; margin: -80px auto 50px; 
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); 
    border: 1px solid #e2e8f0; position: relative; z-index: 10;
    animation: slideUp 0.4s ease;
}

.video-info { 
    display: flex; align-items: center; gap: 15px; margin-bottom: 20px; 
    padding-bottom: 20px; border-bottom: 1px solid #f1f5f9; 
}

.thumb { 
    width: 90px; height: 90px; background-size: cover; background-position: center;
    border-radius: 8px; background-color: #eee; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.meta h3 { font-size: 1rem; margin-bottom: 5px; line-height: 1.4; color: #1e293b; }
.meta p { color: #64748b; font-size: 0.85rem; }

.btn-action { 
    display: block; padding: 14px; border-radius: 8px; font-weight: 700; 
    text-align: center; margin-bottom: 10px; 
}
.btn-primary { background: var(--primary-blue); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #f1f5f9; color: var(--text-main); }
.btn-secondary:hover { background: #e2e8f0; }
.btn-reset { display: block; text-align: center; color: #94a3b8; font-size: 0.9rem; margin-top: 15px; }

/* =========================================
   6. SEO & FAQ
   ========================================= */
.seo-section { 
    text-align: left; background: white; padding: 40px; 
    border-radius: 16px; border: 1px solid #e2e8f0; 
}
.seo-section h2 { font-size: 1.5rem; color: #1e293b; margin: 30px 0 15px; font-weight: 800; }
.seo-section h2:first-child { margin-top: 0; }
.seo-section p { margin-bottom: 15px; color: #475569; }

.features-box { 
    background: #f8fafc; padding: 20px; border-radius: 12px; margin: 25px 0; border: 1px solid #e2e8f0; 
}
.features-box h3 { margin-bottom: 10px; font-size: 1.1rem; }
.features-box li { margin-bottom: 8px; color: #475569; font-size: 0.95rem; }
.seo-section ol { margin-left: 20px; margin-bottom: 25px; color: #475569; }
.seo-section li { margin-bottom: 8px; }

/* FAQ */
details.faq-item { 
    background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 10px; overflow: hidden; 
}
summary { 
    padding: 15px; font-weight: 600; cursor: pointer; background: #f8fafc; color: #334155; 
    list-style: none; display: flex; justify-content: space-between; align-items: center; 
}
summary::after { content: "+"; font-size: 1.2rem; color: #94a3b8; }
details[open] summary::after { content: "−"; color: var(--primary-blue); }
.faq-text { padding: 15px; color: #475569; border-top: 1px solid #e2e8f0; background: white; }

/* Footer */
footer { 
    background: white; border-top: 1px solid #e2e8f0; padding: 40px 20px; 
    text-align: center; margin-top: auto; color: #94a3b8; font-size: 0.9rem; 
}
.footer-links { margin-bottom: 15px; }
.footer-links a:hover { color: var(--primary-blue); }

/* Mobile */
@media (max-width: 600px) {
    .hero-title { font-size: 2rem; }
    .hero-section { padding-bottom: 80px; }
    .nav-header { padding: 15px 20px; }
    .search-input { width: 100%; border-radius: 8px; padding: 15px; }
    @media (max-width: 360px) {
        .input-group { flex-direction: column; gap: 5px; }
        .search-input { border-radius: 8px; border-bottom: 1px solid #eee; }
        .btn-paste { width: 100%; justify-content: center; border-left: none; }
    }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }