/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    /* Colors - Instagram Clean Light Theme */
    --bg-main: #f8fafc; /* Crisp light background */
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --border-color: #e2e8f0;
    --border-color-active: rgba(225, 48, 108, 0.4);
    
    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    /* Brand Accent & Instagram Gradients */
    --accent: #e1306c; /* Instagram Magenta Pink */
    --accent-hover: #c13584;
    --accent-glow: rgba(225, 48, 108, 0.15);
    --gradient-accent: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    --gradient-card: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    
    /* Category Colors (Tailored HSL values) */
    --color-educational: hsl(225, 75%, 50%);
    --color-comparison: hsl(150, 70%, 40%);
    --color-mythbusting: hsl(15, 85%, 50%);
    --color-storytelling: hsl(270, 75%, 55%);
    --color-random: hsl(330, 80%, 55%);
    --color-authority: hsl(40, 95%, 45%);
    --color-dayinthelife: hsl(190, 80%, 40%);
    
    /* UI Sizing */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --transition-fast: 0.15s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Glassmorphism Blur */
    --glass-blur: 20px;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: auto;
    overflow-y: auto;
    line-height: 1.5;
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(225, 48, 108, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(240, 148, 51, 0.04) 0%, transparent 40%);
    background-attachment: fixed;
}

/* Custom Scrollbars - Prominent Bottom Horizontal Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 14px;
}

::-webkit-scrollbar-track {
    background: rgba(10, 11, 16, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #ff9933 0%, #ff3366 50%, #d946ef 100%);
    border-radius: 10px;
    border: 2px solid rgba(10, 11, 16, 0.8);
    box-shadow: 0 0 10px rgba(217, 70, 239, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #ffaa44 0%, #ff4477 50%, #ea57ff 100%);
    box-shadow: 0 0 16px rgba(217, 70, 239, 0.9);
}

/* ==========================================================================
   APP LAYOUT (Sidebar + Main Grid)
   ========================================================================== */
.app-container {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    width: 100%;
    min-width: 1350px; /* Guarantees spacious layout for all 3 card columns */
}

/* ==========================================================================
   HEADER / SIDEBAR SIDE (Sticky Left)
   ========================================================================== */
.app-header {
    background-color: #ffffff;
    border-right: 1px solid var(--border-color);
    padding: 35px 25px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 100;
    width: 310px;
    min-width: 310px;
    height: 100vh;
    overflow-y: auto;
    backdrop-filter: blur(var(--glass-blur));
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .app-header {
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 30px 20px;
    }
}

/* Logo Styling - 3D Rounded Square Hook Logo */
.logo-container {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(225, 48, 108, 0.18);
    border: 1.5px solid rgba(225, 48, 108, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background-color: #ffffff;
    transition: var(--transition-smooth);
}

.logo-container:hover {
    transform: scale(1.03) rotate(1deg);
    box-shadow: 0 12px 32px rgba(225, 48, 108, 0.3);
    border-color: rgba(225, 48, 108, 0.5);
}

.app-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .logo-container {
        margin: 0 auto 10px auto;
    }
}

.app-title {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.15;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.app-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.6;
}

/* User Profile Widget in Header */
.user-profile-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gradient-accent);
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(225, 48, 108, 0.25);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    flex-grow: 1;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.76rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.switch-user-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.logout-user-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.logout-user-btn:hover {
    color: #dc2626;
}

/* Stats Card Panel */
.stats-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.stats-header {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-status-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(255, 51, 102, 0.15);
    color: #ff3366;
    border: 1px solid rgba(255, 51, 102, 0.4);
    letter-spacing: 0.5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.category-stats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px;
}

.cat-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.cat-stat-name {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cat-stat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.cat-stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* ==========================================================================
   MAIN CONTENT SIDE (Right)
   ========================================================================== */
.main-content {
    padding: 35px 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    min-width: 1040px;
    box-sizing: border-box;
    flex-grow: 1;
}

@media (max-width: 1024px) {
    .main-content {
        padding: 20px;
    }
}

/* ==========================================================================
   CONTROLS BAR (Search & Categories Scroll)
   ========================================================================== */
.controls-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* Search Box glass */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 20px;
    height: 60px;
    transition: var(--transition-smooth);
}

.search-box:focus-within {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color-active);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.search-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    margin-right: 15px;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.search-box:focus-within .search-icon {
    color: var(--accent);
}

.search-box input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 400;
    width: 100%;
    height: 100%;
}

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

.clear-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-fast);
}

.clear-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.clear-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.08);
}

.clear-btn svg {
    width: 18px;
    height: 18px;
}

/* Category Filters Horizontal Scroll Wrapper */
.category-filters-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.category-filters-container {
    position: relative;
    flex-grow: 1;
    overflow: hidden;
}

.category-filters-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 6px 4px 12px 4px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    user-select: none;
}

.category-filters-scroll.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

/* Custom styled horizontal scrollbar for category tabs */
.category-filters-scroll::-webkit-scrollbar {
    height: 6px;
    display: block;
}

.category-filters-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.category-filters-scroll::-webkit-scrollbar-thumb {
    background: rgba(217, 70, 239, 0.3);
    border-radius: 10px;
}

.category-filters-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(217, 70, 239, 0.6);
}

/* Scroll Navigation Arrow Buttons */
.scroll-arrow {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.scroll-arrow:hover {
    background: rgba(217, 70, 239, 0.2);
    color: var(--text-primary);
    border-color: var(--accent);
    transform: scale(1.08);
}

.scroll-arrow svg {
    width: 18px;
    height: 18px;
}

.filter-tab {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 10px 18px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.filter-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--border-color-active);
}

.filter-tab.active {
    background-color: var(--text-primary);
    color: var(--bg-main);
    border-color: var(--text-primary);
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15);
}

.tab-count {
    font-size: 0.75rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: inherit;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
}

.filter-tab.active .tab-count {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Active filter clear indicator */
.active-filters-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(34, 197, 94, 0.05);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    font-size: 0.9rem;
}

.reset-filter-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-decoration: underline;
}

.reset-filter-btn:hover {
    color: #4ade80;
}

/* ==========================================================================
   HOOKS GRID & CARDS
   ========================================================================== */
.hooks-grid-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
}

.hooks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    width: 100%;
    min-width: 1000px;
}

@media (max-width: 480px) {
    .hooks-grid {
        grid-template-columns: 1fr;
    }
}

/* The Card Structure (Glassmorphism & animations) */
.hook-card {
    min-width: 0;
    word-break: break-word;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.hook-card:hover {
    background-color: #ffffff;
    border-color: var(--border-color-active);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(225, 48, 108, 0.12);
}

/* Accent Card Glow on Category Color */
.hook-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--cat-color, var(--accent));
    opacity: 0.8;
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hook-id {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    font-family: monospace;
    background-color: #f1f5f9;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.lang-flag {
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.category-tag {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--cat-color, var(--accent));
    background-color: rgba(var(--cat-color-rgb, 34, 197, 94), 0.08);
    border: 1px solid rgba(var(--cat-color-rgb, 34, 197, 94), 0.25);
    padding: 4px 10px;
    border-radius: 50px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Card Content Area */
.card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.hook-portuguese {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-primary);
    word-break: break-word;
}

/* Placeholders inside the translated hook (Highlighted styled terms) */
.hook-portuguese mark,
.hook-english mark {
    background: rgba(225, 48, 108, 0.08);
    color: #e1306c;
    border: 1px dashed rgba(225, 48, 108, 0.3);
    border-radius: 4px;
    padding: 0 4px;
    font-weight: 600;
}

.hook-english {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.5;
    border-left: 2px solid var(--border-color);
    padding-left: 10px;
    word-break: break-word;
}

/* Card Footer - Buttons */
.card-footer {
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    margin-top: auto;
    align-items: center;
}

/* Copy Button styles */
.copy-btn {
    flex-grow: 1;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    height: 42px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.copy-btn:hover {
    background-color: #f1f5f9;
    color: var(--text-primary);
    border-color: var(--border-color-active);
}

.copy-btn svg {
    width: 16px;
    height: 16px;
}

.copy-btn.copied {
    background-color: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border-color: rgba(34, 197, 94, 0.3);
}

/* Favorite Star Button (Aligned between Copiar Gancho & Instagram Icon) */
.fav-btn {
    width: 42px;
    height: 42px;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    color: #94a3b8;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.fav-btn:hover {
    background-color: #fffbeb;
    color: #f59e0b;
    border-color: #fcd34d;
    transform: scale(1.08);
}

.fav-btn.active {
    background-color: #fef3c7;
    color: #d97706;
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.fav-btn svg {
    width: 18px;
    height: 18px;
}

/* Example Video Button Link */
.example-btn {
    width: 42px;
    height: 42px;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    flex-shrink: 0;
}

.example-btn:hover {
    background-color: #f1f5f9;
    color: var(--accent);
    border-color: var(--accent);
    transform: scale(1.05);
}

.example-btn svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   LOADING & STATE ANIMATIONS
   ========================================================================== */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* No Results State */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    gap: 15px;
}

.no-results-icon {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
}

.no-results h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.no-results p {
    color: var(--text-muted);
    max-width: 400px;
    font-size: 0.95rem;
}

.reset-btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
    transition: var(--transition-fast);
}

.reset-btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--border-color-active);
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #121318;
    border: 1px solid var(--border-color-active);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.toast-message {
    font-size: 0.95rem;
    font-weight: 500;
}

/* ==========================================================================
   FLOATING VIDEO PREVIEW POPUP & HOVER EFFECTS
   ========================================================================== */
.hook-portuguese[data-preview-url] {
    cursor: pointer;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.hook-card:hover .hook-portuguese[data-preview-url],
.hook-portuguese[data-preview-url]:hover {
    color: var(--cat-color, #d946ef);
    text-shadow: 0 0 16px rgba(var(--cat-color-rgb, 217, 70, 239), 0.35);
}

.example-btn:hover {
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.25), rgba(217, 70, 239, 0.25)) !important;
    color: #ff3366 !important;
    border-color: #ff3366 !important;
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.45) !important;
    transform: scale(1.15) rotate(4deg) !important;
}

.video-preview-popup {
    position: fixed;
    z-index: 99999;
    width: 320px;
    background: #0d0e17;
    border: 1.5px solid rgba(255, 51, 102, 0.45);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(217, 70, 239, 0.3);
    overflow: hidden;
    pointer-events: auto;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9) translateY(12px);
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s;
    backdrop-filter: blur(20px);
}

.video-preview-popup.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

.preview-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.popup-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ff3366;
    display: flex;
    align-items: center;
    gap: 6px;
}

.popup-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.15s;
}

.popup-close-btn:hover {
    color: #fff;
}

.preview-popup-body {
    position: relative;
    width: 100%;
    height: 440px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #0d0e17;
    color: var(--text-secondary);
    font-size: 0.85rem;
    z-index: 2;
}

.preview-popup-iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: relative;
    z-index: 1;
}

.preview-popup-footer {
    padding: 10px 14px;
    background: rgba(10, 11, 16, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: center;
}

.popup-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s;
}

.popup-open-btn:hover {
    color: #ff3366;
}

/* ==========================================================================
   TABLET RESPONSIVENESS ADJUSTMENTS (768px a 1024px)
   ========================================================================== */
@media (min-width: 768px) and (max-width: 1024px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    
    .app-header {
        display: grid;
        grid-template-columns: 1fr 340px;
        align-items: center;
        gap: 30px;
        height: auto;
        padding: 30px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        position: relative;
    }
    
    .logo-container {
        margin: 0 0 10px 0;
    }
    
    .stats-card {
        margin-top: 0;
        width: 100%;
    }
    
    .main-content {
        padding: 30px;
    }
    
    .hooks-grid {
        grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
        gap: 20px;
    }
}

/* ==========================================================================
   MOBILE RESPONSIVENESS ADJUSTMENTS (Celulares < 768px)
   ========================================================================== */
@media (max-width: 767px) {
    /* Main Layout */
    .app-container {
        grid-template-columns: 1fr;
    }

    /* Header on Mobile */
    .app-header {
        padding: 24px 16px;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        gap: 15px;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .app-title {
        font-size: 1.8rem;
        text-align: center;
    }

    .app-subtitle {
        font-size: 0.88rem;
        text-align: center;
    }

    /* Hide category stats details on mobile to save space */
    .stats-card {
        padding: 15px;
        margin-top: 5px;
        width: 100%;
        max-width: 400px;
    }
    
    .category-stats-list {
        display: none; /* Hide detailed breakdown on mobile to keep header compact */
    }

    /* Controls Bar & Grid */
    .main-content {
        padding: 16px;
        gap: 20px;
    }

    .search-box {
        height: 52px;
        padding: 0 16px;
    }

    .search-box input {
        font-size: 0.95rem;
    }

    .filter-tab {
        padding: 8px 14px;
        font-size: 0.82rem;
    }

    .tab-count {
        font-size: 0.7rem;
        padding: 1px 5px;
    }

    .hooks-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Hook Cards on Mobile */
    .hook-card {
        padding: 18px;
        gap: 15px;
    }

    .hook-portuguese {
        font-size: 1.05rem;
    }

    .hook-english {
        font-size: 0.82rem;
        padding-left: 8px;
    }

    .copy-btn {
        height: 38px;
        font-size: 0.8rem;
    }

    .example-btn {
        width: 38px;
        height: 38px;
    }
}

/* ==========================================================================
   IMPORT MODAL & BUTTON STYLES
   ========================================================================== */
.import-adicionais-btn {
    width: 100%;
    margin-top: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(217, 70, 239, 0.2), rgba(255, 51, 102, 0.2));
    border: 1px solid rgba(255, 51, 102, 0.4);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.import-adicionais-btn:hover {
    background: linear-gradient(135deg, rgba(217, 70, 239, 0.4), rgba(255, 51, 102, 0.4));
    border-color: #ff3366;
    box-shadow: 0 0 16px rgba(255, 51, 102, 0.35);
    transform: translateY(-1px);
}

/* Modal Styles */
/* ==========================================================================
   CREATIVE INSTAGRAM LIGHT THEME WELCOME LANDING SCREEN
   ========================================================================== */
.welcome-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 10% 20%, rgba(245, 96, 64, 0.15) 0%, rgba(225, 48, 108, 0.22) 40%, rgba(131, 58, 180, 0.18) 75%, rgba(255, 255, 255, 0.95) 100%), #f8fafc;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.welcome-modal-overlay.active {
    display: flex !important;
}

.welcome-modal-card {
    background: #ffffff;
    border: 1.5px solid rgba(225, 48, 108, 0.25);
    border-radius: 24px;
    width: 520px;
    max-width: 95vw;
    padding: 38px 42px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    box-shadow: 0 24px 65px rgba(225, 48, 108, 0.2), 0 8px 30px rgba(0, 0, 0, 0.05);
    animation: welcomePop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.welcome-modal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #f56040, #e1306c, #833ab4, #4c5fd7);
}

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

.welcome-card-header {
    text-align: center;
}

.welcome-badge {
    background: rgba(225, 48, 108, 0.08);
    color: #e1306c;
    font-weight: 800;
    font-size: 0.76rem;
    letter-spacing: 1px;
    padding: 6px 16px;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 12px;
    border: 1px solid rgba(225, 48, 108, 0.2);
}

.welcome-title {
    font-size: 1.65rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f56040, #e1306c, #833ab4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.25;
    margin-bottom: 10px;
}

.welcome-subtitle {
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.55;
}

.welcome-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.welcome-form-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.welcome-input-row {
    display: flex;
    gap: 12px;
}

.welcome-input {
    width: 100%;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
}

.welcome-input:focus {
    border-color: #e1306c;
    box-shadow: 0 0 0 4px rgba(225, 48, 108, 0.12);
}

.welcome-error-msg {
    color: #e1306c;
    font-size: 0.82rem;
    font-weight: 600;
    display: none;
    margin-top: 6px;
}

.welcome-card-footer {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 4px;
}

.welcome-submit-btn {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #f56040, #e1306c, #833ab4);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1.02rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(225, 48, 108, 0.35);
    transition: all 0.25s ease;
}

.welcome-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(225, 48, 108, 0.45);
}

.welcome-trust-note {
    text-align: center;
    font-size: 0.78rem;
    color: #64748b;
}

.welcome-cancel-link {
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: underline;
    margin-top: 4px;
    transition: color 0.2s ease;
}

.welcome-cancel-link:hover {
    color: #0f172a;
}

.user-actions-stacked {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
}

.import-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
}

.import-modal-overlay.active {
    display: flex !important;
}

.import-modal-card {
    background: #0d0e17;
    border: 1.5px solid rgba(255, 51, 102, 0.4);
    border-radius: 16px;
    width: 500px;
    max-width: 90vw;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

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

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.modal-body textarea {
    width: 100%;
    height: 180px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    font-family: monospace;
    font-size: 0.82rem;
    resize: none;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-cancel-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.modal-confirm-btn {
    background: linear-gradient(135deg, #ff9933, #ff3366, #d946ef);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
}

/* Admin Panel Tabs & User Management Styles */
.admin-nav-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-top: 5px;
}

.admin-tab-btn {
    background: none;
    border: 1px solid transparent;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.admin-tab-btn:hover {
    color: var(--text-primary);
    background: #f1f5f9;
}

.admin-tab-btn.active {
    background: #ffffff;
    border-color: var(--border-color);
    color: var(--accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.admin-users-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 320px;
    overflow-y: auto;
}

.admin-user-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-user-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.92rem;
}

.admin-user-email {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.admin-user-favs {
    margin-top: 4px;
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ==========================================================================
   FULL-SCREEN ADMIN CONTROL CENTER PAGE
   ========================================================================== */
.admin-fullscreen-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #f8fafc;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.admin-page-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.admin-header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-logo-badge {
    background: var(--gradient-accent);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 10px;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(225, 48, 108, 0.25);
}

.admin-page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.admin-page-subtitle {
    font-size: 0.85rem;
    color: #64748b;
}

.admin-header-actions {
    display: flex;
    gap: 12px;
}

.admin-header-btn {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
}

.admin-header-btn.secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.admin-header-btn.secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.admin-header-btn.danger {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fecaca;
}

.admin-header-btn.danger:hover {
    background: #fee2e2;
    color: #dc2626;
}

.admin-page-body {
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
}

.admin-nav-tabs-bar {
    display: flex;
    gap: 12px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 2px;
}

.admin-page-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 20px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-bottom: -2px;
}

.admin-page-tab:hover {
    color: #0f172a;
}

.admin-page-tab.active {
    color: #e1306c;
    border-bottom-color: #e1306c;
    font-weight: 700;
}

.admin-card-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.panel-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
}

.panel-counter {
    background: rgba(225, 48, 108, 0.1);
    color: #e1306c;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
}


