/* =============================================
   pelicula.fun - Design System Original
   ============================================= */

:root {
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #5b21b6;
    --primary-bg: #f5f3ff;
    --accent: #06b6d4;
    --accent-light: #67e8f9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg: #faf9fe;
    --bg-card: #ffffff;
    --bg-muted: #f1f0f7;
    --text: #1e1b3a;
    --text-secondary: #6b6890;
    --text-muted: #9895b0;
    --border: #e8e5f3;
    --shadow: 0 4px 24px rgba(124, 58, 237, 0.06);
    --shadow-lg: 0 12px 48px rgba(124, 58, 237, 0.10);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-weight: 400;
}

/* Evitar layout shift durante carregamento de fontes */
@font-face {
    font-family: 'Inter';
    src: local('Inter'), local('Inter-Regular');
    font-weight: 400;
    font-display: optional;
}

@font-face {
    font-family: 'Inter';
    src: local('Inter'), local('Inter-Bold');
    font-weight: 700;
    font-display: optional;
}

@font-face {
    font-family: 'Inter';
    src: local('Inter'), local('Inter-SemiBold');
    font-weight: 600;
    font-display: optional;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

.container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== HEADER ==================== */
.site-header {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon--default svg {
    width: 22px;
    height: 22px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 12px;
    padding: 9px;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.logo-icon--image img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: contain;
    background: transparent;
    display: block;
}

.logo-text {
    font-size: 1.35rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.header-actions { display: flex; align-items: center; gap: 12px; }

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font);
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(124, 58, 237, 0.4);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid rgba(124, 58, 237, 0.25);
}
.btn-outline:hover {
    background: var(--primary-bg);
    border-color: var(--primary);
    color: var(--primary);
}

/* ==================== SUGGEST BUTTON WITH ROTATING GRADIENT ==================== */
#suggestBtn {
    position: relative;
    /* overflow: hidden; */ /* Removido para permitir que o tooltip (filho) apareça fora dos limites do botão */
    background: transparent;
    color: var(--primary);
    border: 2px solid transparent;
    padding: 10px 24px;
}

#suggestBtn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    padding: 2px;
    background: linear-gradient(
        90deg,
        var(--primary),
        var(--accent),
        var(--primary-light),
        var(--primary),
        var(--accent),
        var(--primary)
    );
    background-size: 200% 100%;
    animation: rotateBorder 3s linear infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

@keyframes rotateBorder {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

#suggestBtn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    background: transparent;
    pointer-events: none;
}

#suggestBtn:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

/* Tooltip para o botão Sugira um Modelo */
.suggest-tooltip {
    position: absolute;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 250;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
    animation: tooltipPulse 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
    top: calc(100% + 12px); /* Mudado para top para aparecer abaixo do botão */
    right: 0; /* Alinhado à direita do botão para que o conteúdo cresça para a esquerda */
}

@keyframes tooltipPulse {
    0% { opacity: 0; transform: scale(0.5) translateY(-10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.suggest-tooltip::after {
    content: '';
    position: absolute;
    top: -6px; /* Seta no topo do tooltip apontando para cima */
    right: 15px; /* Seta alinhada com o botão no lado direito */
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--primary); /* Seta apontando para cima */
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
}
.btn-ghost:hover { background: var(--bg-muted); color: var(--text); }

.btn-sm { padding: 7px 16px; font-size: 0.82rem; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }

/* ==================== HERO / SEARCH ==================== */
.hero-section {
    padding: 20px 0 8px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    border-radius: 50px;
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.hero-badge svg { width: 16px; height: 16px; }

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
    color: var(--text);
    text-wrap: balance;
}

.hero-title .gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    min-height: 1.2em;
    vertical-align: top;
}

#typingText::after {
    content: '|';
    margin-left: 2px;
    color: var(--primary);
    animation: blink 0.7s infinite;
    -webkit-text-fill-color: var(--primary);
}

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

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 16px;
    line-height: 1.7;
}

/* Search Box */
.search-box {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 2px solid var(--border);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition);
    overflow: hidden;
    flex-wrap: nowrap;
    gap: 0;
}

.search-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12), var(--shadow-lg);
}

.search-icon {
    padding: 0 0 0 20px;
    color: var(--primary);
    display: flex;
    align-items: center;
}

.search-icon svg { width: 24px; height: 24px; }

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 20px 16px;
    font-size: 1.1rem;
    font-family: var(--font);
    color: var(--text);
    background: transparent;
}

.search-input::placeholder { color: var(--text-muted); }

.search-clear {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-muted);
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color var(--transition);
}
.search-clear:hover { color: var(--text); }
.search-clear.visible { display: flex; }

.search-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px;
    border-radius: 12px;
    transition: all var(--transition);
    font-family: var(--font);
    white-space: nowrap;
    flex-shrink: 0;
}

.search-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
}

.search-btn svg { width: 20px; height: 20px; }

/* Search suggestions */
.search-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(124, 58, 237, 0.16);
    overflow: hidden;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.search-suggestions.visible {
    display: block;
}

.search-suggestion-item {
    width: 100%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    text-align: left;
    transition: background var(--transition), color var(--transition);
    font-family: var(--font);
}

.search-suggestion-item + .search-suggestion-item {
    border-top: 1px solid rgba(232, 229, 243, 0.8);
}

.search-suggestion-item:hover,
.search-suggestion-item.is-active {
    background: var(--primary-bg);
}

.search-suggestion-model {
    color: var(--text);
    font-weight: 700;
    font-size: 0.98rem;
}

.search-suggestion-brand {
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
    background: rgba(124, 58, 237, 0.10);
    padding: 5px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

/* Popular searches */
.popular-searches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.popular-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.popular-tag {
    padding: 5px 14px;
    border-radius: 50px;
    background: var(--bg-muted);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    font-family: var(--font);
}

.popular-tag:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

/* ==================== LAYOUT 3 COLUNAS ==================== */
.main-layout {
    display: flex;
    gap: 24px;
    padding-bottom: 0;
}

.sidebar-left,
.sidebar-right {
    width: 200px;
    flex-shrink: 0;
}

.sidebar-inner {
    position: sticky;
    top: 92px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.main-content { flex: 1; min-width: 0; }

.banner-item {
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: transform var(--transition);
    min-height: 0;
}

.banner-item:hover { transform: scale(1.02); }
.banner-item img, .banner-item video { width: 100%; display: block; border-radius: var(--radius-sm); height: auto; }

/* Reduzir espaço vazio de banners vazios */
#bannerTop:empty,
#bannerBottom:empty {
    display: none;
}

/* ==================== RESULTS ==================== */
.results-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.results-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #ecfdf5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.results-icon svg { width: 20px; height: 20px; color: var(--success); }

.results-count { font-size: 1.1rem; font-weight: 700; }
.results-query { font-size: 0.9rem; color: var(--text-secondary); }
.results-query strong { color: var(--text); }

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
}

/* Result Card */
.result-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all var(--transition);
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

.result-card:hover {
    border-color: rgba(124, 58, 237, 0.2);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

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

.card-header {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.06), transparent);
    padding: 16px 20px;
    border-bottom: 1px solid rgba(124, 58, 237, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-device-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(124, 58, 237, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.result-card:hover .card-device-icon { background: rgba(124, 58, 237, 0.15); }
.card-device-icon svg { width: 22px; height: 22px; color: var(--primary); }

.card-device-info { flex: 1; min-width: 0; }
.card-device-name { font-size: 1.1rem; font-weight: 700; color: var(--text); text-transform: uppercase; }

.card-device-brand {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    white-space: nowrap;
}

.card-badge svg { width: 12px; height: 12px; }

.card-body { padding: 16px 20px; }

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

.compat-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.compat-tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--bg-muted);
    color: var(--text-secondary);
    border: 1px solid transparent;
    transition: all var(--transition);
    text-transform: uppercase;
}

.compat-tag:hover {
    background: var(--primary-bg);
    color: var(--primary);
    border-color: rgba(124, 58, 237, 0.2);
    cursor: pointer;
}

/* ==================== EMPTY / LOADING ==================== */
.empty-state, .loading-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon, .loading-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.empty-icon svg, .loading-icon svg { width: 40px; height: 40px; color: var(--text-muted); }

.empty-title, .loading-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.empty-desc { color: var(--text-secondary); max-width: 400px; margin: 0 auto 24px; }

.loading-icon svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== FEATURES ==================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 28px 20px;
    text-align: center;
    transition: all var(--transition);
}

.feature-card:hover {
    border-color: rgba(124, 58, 237, 0.15);
    box-shadow: var(--shadow);
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    transition: background var(--transition);
}

.feature-card:hover .feature-icon { background: rgba(124, 58, 237, 0.12); }
.feature-icon svg { width: 26px; height: 26px; color: var(--primary); }
.feature-title { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.feature-desc { font-size: 0.85rem; color: var(--text-secondary); }

/* ==================== MODAL ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal-box {
    background: var(--bg-card);
    border-radius: var(--radius);
    max-width: 480px;
    width: 100%;
    box-shadow: 0 24px 80px rgba(0,0,0,0.2);
    animation: modalIn 0.3s ease;
    position: relative;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 8px;
    transition: all var(--transition);
}

.modal-close:hover { background: var(--bg-muted); color: var(--text); }
.modal-desc { padding: 8px 24px 0; font-size: 0.9rem; color: var(--text-secondary); }
.modal-body { padding: 20px 24px 24px; }

/* ==================== FORM ==================== */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg-card);
    transition: border-color var(--transition);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-textarea { min-height: 80px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ==================== FOOTER ==================== */
.site-footer {
    border-top: 1px solid var(--border);
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(20px);
    padding: 32px 0;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
}

.footer-logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo-icon svg { width: 14px; height: 14px; color: var(--primary); }

.footer-logo-icon--image img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

.footer-brand {
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-text { font-size: 0.85rem; color: var(--text-secondary); }
.footer-copy { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; }

/* ==================== TOAST ==================== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 300;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }

@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(20px); } }

/* ==================== NOVIDADES / NOTIFICAÇÕES ==================== */

/* Bell wrapper */
.novidades-bell-wrapper {
    position: relative;
}

/* Bell button */
.novidades-bell-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    color: var(--text-muted);
}

.novidades-bell-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.novidades-bell-btn:not(:disabled):hover {
    background: var(--primary-bg);
    border-color: var(--primary);
    color: var(--primary);
}

.novidades-bell-btn.has-novidades {
    color: var(--primary);
    border-color: var(--primary);
    opacity: 1;
}

.novidades-bell-btn .bell-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

/* Animação de sino tocando quando tem novidades */
@keyframes bellRing {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-12deg); }
    30% { transform: rotate(10deg); }
    40% { transform: rotate(-8deg); }
    50% { transform: rotate(6deg); }
    60% { transform: rotate(-4deg); }
    70% { transform: rotate(2deg); }
    80% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

.novidades-bell-btn.has-novidades .bell-icon {
    animation: bellRing 2s ease-in-out infinite;
    animation-delay: 1s;
}

/* Badge contador */
.novidades-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 50px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
    z-index: 2;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 2px 16px rgba(239, 68, 68, 0.6);
    }
}

/* Glow pulsante ao redor do botão */
.novidades-bell-btn.has-novidades::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--primary);
    animation: bellGlow 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes bellGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Popup de novidades */
.novidades-popup {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 380px;
    max-height: 480px;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.15), 0 8px 24px rgba(0, 0, 0, 0.08);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.novidades-popup.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Seta do popup */
.novidades-popup::before {
    content: '';
    position: absolute;
    top: -7px;
    right: 14px;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-right: none;
    border-bottom: none;
    transform: rotate(45deg);
    z-index: 1;
}

.novidades-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.04), rgba(6, 182, 212, 0.04));
}

.novidades-popup-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
}

.novidades-popup-title svg {
    color: var(--primary);
}

.novidades-popup-close {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition);
}

.novidades-popup-close:hover {
    background: var(--bg-muted);
    color: var(--text);
}

.novidades-popup-body {
    overflow-y: auto;
    max-height: 400px;
    padding: 8px;
}

.novidades-popup-body::-webkit-scrollbar {
    width: 5px;
}

.novidades-popup-body::-webkit-scrollbar-track {
    background: transparent;
}

.novidades-popup-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* Card de novidade no popup */
.novidade-popup-item {
    padding: 14px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
    position: relative;
}

.novidade-popup-item:hover {
    background: var(--bg-muted);
}

.novidade-popup-item + .novidade-popup-item {
    border-top: 1px solid var(--border);
}

.novidade-popup-item-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.novidade-popup-item-title::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    flex-shrink: 0;
}

.novidade-popup-item-desc {
    font-size: 0.83rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-left: 16px;
}

.novidade-popup-item-suggested {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--primary);
    margin-top: 6px;
    margin-left: 16px;
    font-weight: 600;
}

.novidade-popup-item-suggested svg {
    flex-shrink: 0;
}

.novidade-popup-item-date {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
    margin-left: 16px;
}

.novidade-popup-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    margin-left: 16px;
}

.novidade-like-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.novidade-like-btn:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #ef4444;
}

.novidade-like-btn.liked {
    background: #fef2f2;
    border-color: #fecaca;
    color: #ef4444;
}

.novidade-like-btn.liked svg {
    fill: #ef4444;
}

.novidade-like-btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.novidade-like-btn:active svg {
    transform: scale(1.4);
}

/* Empty state no popup */
.novidades-popup-empty {
    text-align: center;
    padding: 32px 20px;
    color: var(--text-muted);
}

.novidades-popup-empty p {
    font-size: 0.88rem;
    margin-top: 8px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
    .sidebar-left { display: none; }
}

@media (max-width: 1024px) {
    .sidebar-right { display: none; }
}

@media (max-width: 768px) {
    .hero-section { padding: 50px 0 24px; }
    .search-btn span { display: none; }
    .search-btn { padding: 14px 18px; margin: 6px 6px 6px 0; }
    .search-input { padding: 16px 12px; font-size: 1rem; min-width: 0; }
    .search-clear { margin: 0 6px 0 0; }
    .results-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .header-actions .btn span.hide-mobile { display: none; }
    
    .suggest-tooltip {
        top: calc(100% + 10px) !important;
        bottom: auto !important;
        left: auto !important;
        right: 0 !important;
        transform: none !important;
        white-space: nowrap;
        max-width: none;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    /* Novidades popup mobile */
    .novidades-popup {
        position: fixed;
        top: 68px;
        right: 8px;
        left: 8px;
        width: auto;
        max-height: calc(100vh - 100px);
        border-radius: var(--radius);
    }
    
    .novidades-popup::before {
        right: auto;
        right: 52px;
    }
    
    .novidades-bell-btn {
        width: 38px;
        height: 38px;
    }
    
    .novidades-bell-btn .bell-icon {
        width: 18px;
        height: 18px;
    }
    
    .novidades-badge {
        min-width: 18px;
        height: 18px;
        font-size: 0.62rem;
        top: -3px;
        right: -3px;
    }
}
