/* ============================================
   STICKERLAB — PREMIUM DARK THEME (64-BIT EDITION)
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    /* 🎨 PALETA CHAMPAGNE / CUTE / GLASSMORPHISM */
    --bg-primary: #fdf2f8; 
    --bg-secondary: rgba(255, 255, 255, 0.65); 
    --bg-tertiary: rgba(255, 255, 255, 0.85); 
    --bg-card: rgba(255, 255, 255, 0.55); 
    --bg-input: rgba(255, 255, 255, 0.9);
    --bg-hover: rgba(255, 255, 255, 0.95);

    --accent-primary: #fbbf24; /* Ouro/Amarelo */
    --accent-secondary: #f59e0b;
    --accent-glow: rgba(251, 191, 36, 0.4);
    --accent-gradient: linear-gradient(135deg, #fbbf24, #f59e0b);
    --accent-gradient-2: linear-gradient(135deg, #f59e0b, #fbbf24);

    /* Neutralizando os neons antigos para dourado/quente (pra não quebrar nada que os use) */
    --neon-purple: #fbbf24; 
    --neon-cyan: #f59e0b;
    --neon-pink: #fbbf24;
    --neon-green: #34d399;

    --text-primary: #3f2e3e; /* Uva/Grafite escuro para leitura perfeita */
    --text-secondary: #6b5a68;
    --text-muted: #9a8a97;

    --border-color: rgba(255, 255, 255, 0.8);
    --border-light: rgba(255, 255, 255, 0.5);

    /* Mantendo as suas medidas originais */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 999px;

    /* Sombras clareadas para o tema claro */
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 20px rgba(251, 191, 36, 0.3);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --header-height: 60px;
    --input-height: 80px;
    --max-width: 480px;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    overflow: hidden !important;
    width: 100%;
    height: 100%;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    background-color: var(--bg-primary) !important;
    
    /* 🚨 O NOVO FUNDO CLARO E CUTE */
    background-image: 
        /* Opacidade reduzida para o wallpaper brilhar! */
        linear-gradient(rgba(253, 242, 248, 0.55), rgba(255, 235, 238, 0.60)),
        url('/backapp.png') !important;
        
    background-size: cover !important;
    background-position: center !important;
    background-attachment: scroll !important;
    background-repeat: no-repeat !important;
    color: var(--text-primary);
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-origin: border-box !important;
    background-clip: border-box !important;
}
/* ============================================
   APP CONTAINER E HEADER
   ============================================ */

.app-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    width: 100%; /* <--- A MÁGICA QUE DESESMAGA A TELA */
    height: 100vh;
    height: 100dvh;
    max-width: var(--max-width);
    margin: 0 auto;
    overflow-y: hidden; /* 🔥 Permite scroll horizontal em filhos */
    overflow-x: visible;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    padding: 0 16px;
    background: var(--bg-secondary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    z-index: 20;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    position: relative;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glow);
}
.logo-emoji {
    font-size: 20px;
    z-index: 1;
}
.logo-glow {
    position: absolute;
    inset: -4px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    opacity: 0.3;
    filter: blur(8px);
    animation: logoGlow 4s ease-in-out infinite alternate;
}
@keyframes logoGlow {
    from { opacity: 0.2; transform: scale(1); }
    to { opacity: 0.4; transform: scale(1.05); }
}
.logo-text h1 {
    font-size: 18px;
    font-weight: 800;
    background: var(--accent-gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}
.logo-subtitle {
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.header-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 500;
    color: #4ade80;
}
.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
/* 1. O ELEVADOR DO MODAL (Joga tudo pro topo) */
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(420px, 480px);
    align-items: start; /* ISSO AQUI SOBE O MODAL E TIRA O BURACO! */
    gap: 44px;
}

/* =========================================================
   O PALCO DOS ADESIVOS (MESA DE TRABALHO) - GRID ORGÂNICO
   ========================================================= */
.sticker-stage {
    position: relative;
    width: 100%;
    height: 700px !important; /* Aumentamos um pouco para caber mais volume */
    margin-top: 24px;
    background: rgba(10, 10, 12, 0.45) !important; 
    backdrop-filter: blur(15px) !important; 
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 184, 0, 0.15) !important; 
    border-radius: 24px !important; 
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5) !important; 
    overflow-y: auto; 
    scrollbar-width: none; 
}

.sticker-stage::-webkit-scrollbar {
    display: none;
}

/* A PISTA: Forçando o Grid a funcionar */
.stage-scroll-area {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 30px;
    padding: 40px 20px 80px;
    align-items: center;
    justify-items: center;
}

/* AS IMAGENS: Matando o position absolute de vez */
.sticker-float {
    position: relative !important; /* 🚨 O EXORCISMO DO BUG ESTÁ AQUI 🚨 */
    width: 100%;
    max-width: 130px; 
    object-fit: contain;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
    animation: floatSticker 6s ease-in-out infinite;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

/* O Segredo do Caos Organizado: desalinhar os itens de propósito para parecerem jogados */
.sticker-float:nth-child(4n+1) { --r: -8deg; animation-delay: 0s; margin-top: 20px; }
.sticker-float:nth-child(4n+2) { --r: 12deg; animation-delay: -1.5s; margin-bottom: 30px; }
.sticker-float:nth-child(4n+3) { --r: -5deg; animation-delay: -3s; margin-top: 10px; }
.sticker-float:nth-child(4n+4) { --r: 15deg; animation-delay: -4.5s; margin-bottom: 20px; }

/* Inverter o caos na linha de baixo para não ficar repetitivo */
.sticker-float:nth-child(8n+5) { --r: 10deg; animation-delay: -2s; margin-bottom: 15px; }
.sticker-float:nth-child(8n+6) { --r: -12deg; animation-delay: -3.5s; margin-top: 25px; }
.sticker-float:nth-child(8n+7) { --r: 8deg; animation-delay: -1s; margin-bottom: 10px; }
.sticker-float:nth-child(8n+8) { --r: -15deg; animation-delay: -5s; margin-top: 30px; }

.sticker-float:hover {
    transform: scale(1.15) rotate(0deg) !important;
    z-index: 50 !important;
    filter: drop-shadow(0 25px 40px rgba(255, 184, 0, 0.3)); 
}

@keyframes floatSticker {
    0%, 100% { transform: translateY(0) rotate(var(--r)); }
    50% { transform: translateY(-18px) rotate(var(--r)); }
}

/* Proteção para Celulares: cai de 4 para 2 colunas para não esmagar os adesivos */
@media (max-width: 640px) {
    .stage-scroll-area {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}
/* ============================================
   CHAT AREA E MENSAGENS
   ============================================ */

.chat-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.chat-area::-webkit-scrollbar {
    width: 4px;
}
.chat-area::-webkit-scrollbar-track {
    background: transparent;
}
.chat-area::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
    opacity: 0.5;
}

.message {
    display: flex;
    gap: 10px;
    max-width: 100%;
    animation: msgSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes msgSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}
.bot-message .message-avatar {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.2));
    border-color: rgba(139, 92, 246, 0.3);
}

.message-content {
    flex: 1;
    min-width: 0;
}
.message-bubble {
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.bot-message .message-bubble {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top-left-radius: 4px;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    background: var(--accent-gradient);
}
.user-message .message-bubble {
    background: var(--accent-gradient);
    color: white;
    border-top-right-radius: 4px;
}
.message-time {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    padding: 0 4px;
}

.user-message .message-time {
    text-align: right;
}

/* ============================================
   STICKER RESULT E AÇÕES
   ============================================ */

.sticker-result {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sticker-canvas-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    background-image:
        linear-gradient(45deg, #1a1a2e 25%, transparent 25%),
        linear-gradient(-45deg, #1a1a2e 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #1a1a2e 75%),
        linear-gradient(-45deg, transparent 75%, #1a1a2e 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    background-color: #12121a;
    border: 1px solid var(--border-color);
}
.sticker-canvas-wrapper:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-glow);
}

.sticker-canvas-wrapper canvas,
.sticker-canvas-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.sticker-actions-inline {
    display: flex;
    gap: 8px;
}

.btn-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    font-family: var(--font-sans);
}
.btn-inline-download {
    background: var(--accent-gradient);
    color: white;
}

.btn-inline-download:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.btn-inline-expand {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}
.btn-inline-expand:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}
/* ============================================
   LOADING
   ============================================ */

.loading-dots {
    display: flex;
    gap: 6px;
    padding: 8px 0;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    animation: loadingBounce 1.4s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.generating-text {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-top: 4px;
}

.generating-text .gen-step {
    color: var(--neon-cyan);
}
/* ============================================
   INPUT AREA (SIMPLIFICADA)
   ============================================ */

.input-area {
    flex-shrink: 0;
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: var(--bg-secondary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-light);
    z-index: 20;
}
.input-container {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 6px;
    transition: border-color 0.3s;
}
.input-container:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}
.input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}
.input-wrapper textarea {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    padding: 8px 45px 8px 12px;
    resize: none;
    outline: none;
    max-height: 100px;
    overflow-y: auto;
}
.input-wrapper textarea::placeholder {
    color: var(--text-muted);
}

.char-count {
    position: absolute;
    right: 8px;
    bottom: 8px;
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    pointer-events: none;
}
.btn-send {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s;
    opacity: 0.4;
    pointer-events: none;
}
.btn-send.active {
    opacity: 1;
    pointer-events: all;
}
.btn-send.active:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.btn-send.active:active {
    transform: scale(0.95);
}
.input-footer {
    display: flex;
    justify-content: flex-end; /* Alterado para alinhar à direita já que o nome do estilo sumiu */
    align-items: center;
    padding: 6px 8px 0;
}
.powered-by {
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
/* ============================================
   ERROR MESSAGE STYLE
   ============================================ */

.error-bubble {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #fca5a5;
}

/* --- ESTILOS DA BIBLIOTECA --- */
.library-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(15px);
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.library-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.btn-back {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 15px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-back:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
}

/* A Mágica da Grade */
.sticker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
}

.library-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.library-item:hover {
    transform: translateY(-5px);
    background: rgba(139, 92, 246, 0.15);
    border-color: #8b5cf6;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.library-item img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 10px;
}

.library-placeholder {
    grid-column: 1 / -1;
    padding: 60px 20px;
    text-align: center;
    color: #64748b;
    font-style: italic;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* --- ESTILOS DOS NOVOS MODAIS --- */
.modal-small { max-width: 400px !important; }

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-option-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    border-radius: 16px;
    color: #fff;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.btn-option-card:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: #8b5cf6;
    transform: scale(1.02);
}

.btn-option-card .icon { font-size: 24px; }
.btn-option-card .text strong { display: block; font-size: 16px; margin-bottom: 2px; }
.btn-option-card .text span { font-size: 12px; color: #94a3b8; }

/* CSS DOS BOTÕES DE ESTILO */
.style-selector-bar {
    display: flex; 
    gap: 8px; 
    padding: 0 16px 8px 16px; 
    overflow-x: auto;
}

.style-option {
    background: rgba(255, 255, 255, 0.05); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8; 
    padding: 6px 12px; 
    border-radius: 20px; 
    font-size: 12px;
    font-weight: 600; 
    cursor: pointer; 
    transition: all 0.2s; 
    white-space: nowrap;
}

.style-option.active {
    background: rgba(139, 92, 246, 0.2); 
    border-color: #8b5cf6; 
    color: #fff;
}

/* NOVO CSS MODERNO PARA OS BOTÕES DE SUGESTÃO (CHIPS) */
.suggestion-chips {
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
    margin-top: 14px;
}

.chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0; 
    padding: 8px 14px; 
    border-radius: 12px;
    font-size: 13px; 
    font-weight: 500; 
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
}

.chip:hover {
    background: rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.6);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

/* CSS DO MENU HAMBURGER E SIDEBAR */
.hamburger-btn {
    background: none; 
    border: none; 
    color: #94a3b8; 
    cursor: pointer;
    padding: 4px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: color 0.2s;
}

.hamburger-btn:hover { 
    color: #fff; 
}

.sidebar-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    background: rgba(0, 0, 0, 0.6); 
    z-index: 1000; 
    opacity: 0; 
    visibility: hidden; 
    transition: all 0.3s ease;
}

.sidebar-overlay.active { 
    opacity: 1; 
    visibility: visible; 
}

.sidebar-menu {
    position: fixed; 
    top: 0; 
    right: -280px; 
    width: 280px; 
    height: 100vh;
    background: #0f172a; 
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1001; 
    transition: right 0.3s ease; 
    display: flex; 
    flex-direction: column;
    padding: 24px; 
    box-shadow: -4px 0 20px rgba(0,0,0,0.5);
}

.sidebar-menu.active { 
    right: 0; 
}

.sidebar-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 32px; 
}

.sidebar-close { 
    background: none; 
    border: none; 
    color: #94a3b8; 
    font-size: 24px; 
    cursor: pointer; 
}

.sidebar-item {
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 16px; 
    margin-bottom: 8px;
    border-radius: 12px; 
    color: #fff; 
    font-weight: 500; 
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03); 
    transition: all 0.2s;
}

.sidebar-item:hover { 
    background: rgba(139, 92, 246, 0.2); 
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 16px 0;
}

.sidebar-item-logout {
    color: #f87171;
    background: rgba(248, 113, 113, 0.08);
    margin-top: auto;
}

.sidebar-item-logout:hover {
    background: rgba(248, 113, 113, 0.2);
}

.store-preview {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   MODAL OVERLAY & CONTENT STYLES
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 16px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(135deg, rgba(22, 22, 42, 0.95), rgba(26, 26, 46, 0.95));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(139, 92, 246, 0.2);
    max-width: 520px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-content {
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
    width: 4px;
}

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

.modal-body::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
    opacity: 0.5;
}

.modal-actions {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.btn-action {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: var(--font-sans);
}

.btn-action.btn-download {
    background: var(--accent-gradient);
    color: white;
}

.btn-action.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}

.btn-action.btn-new {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-action.btn-new:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(139, 92, 246, 0.5);
    color: var(--neon-purple);
}

.sticker-preview-container {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(139, 92, 246, 0.2);
    margin-bottom: 16px;
}

.sticker-checkered-bg {
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(45deg, #1a1a2e 25%, transparent 25%),
        linear-gradient(-45deg, #1a1a2e 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #1a1a2e 75%),
        linear-gradient(-45deg, transparent 75%, #1a1a2e 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    background-color: #12121a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sticker-info {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.info-badge {
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: #c084fc;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

/* ============================================
   LOJA DE PACOTES STYLES
   ============================================ */
.store-packages {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 600px) {
    .store-packages {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.package-card {
    position: relative;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.6), rgba(22, 22, 42, 0.6));
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.package-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.15);
}

.package-card.featured {
    border-color: rgba(139, 92, 246, 0.5);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(34, 211, 238, 0.05));
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.package-card.featured:hover {
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.3);
}

.package-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: #c084fc;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.package-badge.featured-badge {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(34, 211, 238, 0.3));
    border-color: rgba(34, 211, 238, 0.5);
    color: #22d3ee;
}

.package-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.package-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

.package-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feature {
    font-size: 13px;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.feature::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 50%;
}

.package-price {
    font-size: 24px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 8px 0 0 0;
}

.package-price.featured-price {
    font-size: 28px;
}

.btn-package {
    width: 100%;
    padding: 12px;
    border: none;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: #c084fc;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-sans);
}

.btn-package:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.6);
    transform: scale(1.02);
}

.btn-package-featured {
    background: var(--accent-gradient);
    border: none;
    color: white;
}

.btn-package-featured:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}

/* ============================================
   OPÇÕES DE FORMATO (Modal de Exportação)
   ============================================ */
.btn-format-option {
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
}

.btn-format-option.selected {
    background: rgba(139, 92, 246, 0.15) !important;
    border-color: var(--accent-primary) !important;
}

.btn-format-option.selected .format-check {
    display: block !important;
    color: #22d3ee;
    animation: checkPulse 0.3s ease;
}

@keyframes checkPulse {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* ============================================
   AÇÕES DA BIBLIOTECA (LIXEIRA & PUBLICAR)
   ============================================ */
.library-item {
    position: relative; /* Necessário para os botões flutuarem dentro do card */
}

.lib-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 6px;
    opacity: 0; /* Escondido por padrão */
    transition: opacity 0.2s;
}

/* Revela os botões quando passa o mouse por cima do sticker */
.library-item:hover .lib-actions {
    opacity: 1;
}

.btn-lib-action {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-lib-action:hover {
    background: #8b5cf6;
    transform: scale(1.1);
}

.btn-lib-action.delete:hover {
    background: #ef4444; /* Vermelho para a lixeira */
}

/* ============================================
   🔥 NEON SNAP GALLERY (GLOBAL FEED)
   ============================================ */
.feed-post {
    display: flex !important;
    flex-direction: column !important;
    
    /* O SEU DESIGN PREMIUM (MANTIDO INTACTO) */
    background: linear-gradient(180deg, rgba(8, 13, 25, 0.96), rgba(14, 20, 38, 0.94));
    border: 1px solid rgba(110, 231, 255, 0.12);
    border-radius: 24px;
    padding: 16px;
    box-shadow: 0 24px 50px rgba(0,0,0,0.26), 0 0 0 1px rgba(168, 85, 247, 0.06), inset 0 1px 0 rgba(255,255,255,0.04);
    backdrop-filter: blur(16px);
}

.feed-post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: #f8fafc;
    font-size: 14px;
    font-weight: 600;
}

.feed-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.feed-post-img {
    width: 100%;
    border-radius: 18px;
    background: radial-gradient(circle at top, rgba(34, 211, 238, 0.1), rgba(0, 0, 0, 0.2));
    margin-bottom: 14px;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border: 1px solid rgba(255,255,255,0.06);
}

.feed-post-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.feed-btn {
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 22px;
    cursor: pointer;
    transition: transform 0.1s;
}

.feed-btn:active {
    transform: scale(0.8);
}

.feed-likes {
    font-size: 14px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 8px;
}

.feed-caption {
    font-size: 14px;
    color: #cbd5e1;
    margin-bottom: 16px;
    line-height: 1.4;
}

.feed-comment-box {
    display: flex;
    gap: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 14px;
    cursor: pointer;
}

.feed-post-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.feed-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    text-align: left;
}

.feed-user-trigger:hover .feed-username {
    color: var(--neon-cyan);
}

.feed-username {
    transition: color 0.2s ease;
}

.feed-post-time {
    font-size: 11px;
    color: var(--text-muted);
}

.feed-btn.like-active {
    color: #ff77b7;
    text-shadow: 0 0 18px rgba(244, 114, 182, 0.45);
}

.feed-btn.like-burst {
    animation: likeBurstNeon 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes likeBurstNeon {
    0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(244, 114, 182, 0)); }
    35% { transform: scale(1.35); filter: drop-shadow(0 0 14px rgba(244, 114, 182, 0.9)); }
    55% { transform: scale(0.92); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(244, 114, 182, 0)); }
}

.feed-comments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.feed-comment-item {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.45;
}

.feed-comment-item strong {
    color: #fff;
    margin-right: 6px;
}

.feed-comment-meta {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.feed-comment-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #f8fafc;
    font-size: 14px;
    outline: none;
}

.feed-comment-btn {
    background: none;
    border: none;
    color: #8b5cf6;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
}

/* ============================================
   🛠️ CORREÇÕES DE ESQUADRO E ALINHAMENTO
   ============================================ */

/* 1. Salvando a cabeça dos botões de Modo */
.input-area {
    overflow: visible !important; /* Impede que o footer corte o que tentar sair dele */
}

.style-selector-bar {
    padding-top: 8px !important; /* Dá um respiro no topo para o brilho e a borda caberem */
    padding-bottom: 8px !important;
    margin-top: -5px; /* Compensa o espaço para não empurrar muito a tela */
}

/* 2. Centralizando e salvando as Tags da Loja Premium */
.store-packages {
    padding-top: 15px; /* Empurra os cartões para baixo, dando espaço para a tag existir */
}

.package-card {
    position: relative !important;
    margin-top: 15px !important; /* Dá distância do texto de cima */
    padding-top: 35px !important; /* Empurra o conteúdo do cartão para baixo, liberando o topo */
}

.package-badge {
    position: absolute !important;
    top: -12px !important; /* Faz a tag flutuar exatamente na linha da borda superior */
    left: 50% !important;
    transform: translateX(-50%) !important; /* Centraliza a tag perfeitamente no meio do cartão */
    z-index: 10;
    white-space: nowrap; /* Impede que o texto da tag quebre em duas linhas */
}

/* ============================================
   🎨 MAGIC VARIANT SYSTEM
   ============================================ */

/* Variant Preview Container - CSS-only carousel */
.variant-preview-container {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    gap: 16px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
}

.variant-preview-container::-webkit-scrollbar {
    display: none;
}

/* Variant image items for horizontal scrolling */
.variant-image-item {
    flex: 0 0 100%;
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.variant-image-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 90%;
    max-height: 90%;
}

.variant-scroll-hint {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.variant-preview-container:hover .variant-scroll-hint {
    opacity: 0.7;
}

.variant-scroll-hint span {
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Variant Controls */
.variant-controls {
    background: rgba(22, 22, 42, 0.6);
    border-radius: 16px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 20px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
}

.variant-section {
    margin-bottom: 20px;
}

.variant-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.variant-section-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: rgba(26, 26, 46, 0.5);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.category-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
}

.category-tab:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-primary);
}

.category-tab.active {
    background: rgba(139, 92, 246, 0.2);
    color: var(--text-primary);
    border: 1px solid rgba(139, 92, 246, 0.4);
}

.category-icon {
    font-size: 18px;
    line-height: 1;
}

.category-label {
    line-height: 1.2;
}

/* Variant Options Container */
.variant-options-container {
    position: relative;
    min-height: 120px;
}

.variant-options {
    display: none;
    animation: fadeIn 0.3s ease;
}

.variant-options.active {
    display: block;
}

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

.variant-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
}

.variant-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: rgba(30, 30, 53, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.variant-option:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.variant-option.active {
    background: rgba(139, 92, 246, 0.25);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.variant-option-icon {
    font-size: 20px;
    line-height: 1;
}

.variant-option-label {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
}

/* Quantity Controls */
.variant-quantity-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.quantity-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quantity-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.quantity-icon {
    font-size: 14px;
}

.quantity-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(30, 30, 53, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 10px;
    padding: 4px;
    width: fit-content;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--accent-primary);
}

.quantity-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.quantity-value {
    min-width: 30px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.token-cost-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 10px;
}

.token-cost-icon {
    font-size: 16px;
    color: var(--neon-cyan);
}

.token-cost-text {
    font-size: 13px;
    color: var(--text-primary);
}

.token-cost-text strong {
    color: var(--neon-cyan);
}

/* Variant Button */
.btn-action.btn-variant {
    background: linear-gradient(135deg, #ff5500, #ffb800);
    color: #0a0a0f;
    border: none;
    flex: 1.5;
}

.btn-action.btn-variant:hover {
    background: linear-gradient(135deg, #ff6a1a, #ffc233);
    box-shadow: 0 8px 20px rgba(255, 85, 0, 0.4);
    transform: translateY(-2px);
}

.btn-action.btn-variant:active {
    transform: scale(0.98);
}

.btn-action.btn-variant:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .category-tabs {
        flex-direction: column;
        gap: 4px;
    }
    
    .category-tab {
        flex-direction: row;
        justify-content: flex-start;
        padding: 12px;
        gap: 12px;
    }
    
    .variant-options-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .variant-quantity-controls {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .quantity-selector {
        width: 100%;
    }
    
    .quantity-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .token-cost-info {
        width: 100%;
        justify-content: center;
    }
    
    .modal-actions {
        flex-wrap: wrap;
    }
    
    .btn-variant {
        order: -1;
        width: 100%;
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .variant-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-tab {
        padding: 10px;
    }
    
    .variant-option {
        padding: 10px 6px;
    }
}

.app-neon-frame::after {
    content: "";
    position: absolute;
    top: -20%;
    left: -35%;
    width: 42%;
    height: 140%;
    transform: rotate(18deg);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(110, 231, 255, 0.03),
        rgba(110, 231, 255, 0.22),
        rgba(255,255,255,0.06),
        transparent
    );
    filter: blur(14px);
    animation: borderSweep 5.8s linear infinite;
}

@keyframes borderSweep {
    0% { left: -40%; opacity: 0; }
    8% { opacity: 0.9; }
    50% { opacity: 0.65; }
    100% { left: 120%; opacity: 0; }
}

/* header */
.premium-header {
    position: relative;
    z-index: 2;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    backdrop-filter: blur(12px);
}

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

.header-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.9);
}

/* welcome */
.premium-welcome .message-bubble {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
}

.welcome-badge-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.mini-badge {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(110,231,255,0.12);
    border: 1px solid rgba(110,231,255,0.18);
    color: #bff6ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.mini-badge-soft {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.08);
    color: var(--text-2);
}

.welcome-highlight-card {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(110,231,255,0.08), rgba(139,92,246,0.08));
    border: 1px solid rgba(255,255,255,0.08);
}

.welcome-highlight-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,0.08);
    font-size: 18px;
}

.welcome-highlight-text {
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.45;
}

.highlight-word {
    color: #c4b5fd;
    font-weight: 700;
}

/* input / footer */
.premium-input-area {
    position: relative;
    z-index: 2;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    backdrop-filter: blur(14px);
}

.premium-style-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.studio-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(110,231,255,0.18);
    background: linear-gradient(180deg, rgba(110,231,255,0.14), rgba(139,92,246,0.10));
    color: #e6fbff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(110,231,255,0.10);
    transition: 0.2s ease;
}

.studio-trigger-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(110,231,255,0.16);
}

.studio-trigger-icon {
    font-size: 16px;
}

.active-setup-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.active-setup-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-2);
    font-size: 12px;
}

.active-setup-pill span {
    color: var(--text-3);
}

.active-setup-pill strong {
    color: var(--text-1);
    font-weight: 700;
}

.premium-input-container {
    gap: 10px;
}

.premium-input-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-3);
}

.footer-separator {
    width: 1px;
    height: 14px;
    background: rgba(255,255,255,0.08);
}

/* style buttons */
.style-option,
.library-view-btn,
.folder-action-btn,
.btn-folder-create,
.btn-palette,
.chip {
    transition: all 0.2s ease;
}

.style-option {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-2);
}

.style-option.active {
    background: linear-gradient(180deg, rgba(110,231,255,0.15), rgba(139,92,246,0.12));
    color: white;
    border-color: rgba(110,231,255,0.24);
    box-shadow: 0 8px 22px rgba(110,231,255,0.08);
}

/* modal */
.premium-modal {
    background: linear-gradient(180deg, rgba(12, 18, 34, 0.96), rgba(8, 13, 25, 0.94));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 24px 80px rgba(0,0,0,0.45);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.studio-modal {
    max-width: 860px;
    width: calc(100% - 24px);
    border-radius: 28px;
}

.studio-modal-body {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.studio-section {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}

.studio-section-head h4 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 800;
    color: var(--text-1);
}

.studio-section-head p {
    margin: 0 0 16px;
    color: var(--text-3);
    font-size: 13px;
}

.studio-mode-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.studio-mode-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-1);
    cursor: pointer;
    text-align: left;
}

.studio-mode-card.active {
    background: linear-gradient(180deg, rgba(110,231,255,0.12), rgba(139,92,246,0.10));
    border-color: rgba(110,231,255,0.25);
    box-shadow: 0 12px 30px rgba(110,231,255,0.08);
}

.studio-card-icon {
    font-size: 20px;
}

.studio-mode-card small {
    color: var(--text-3);
    font-size: 12px;
}

.premium-palette-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-palette {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.06);
    color: var(--text-2);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.btn-palette.active {
    color: #fff;
    border-color: rgba(110,231,255,0.30);
    box-shadow: 0 8px 24px rgba(110,231,255,0.08);
}

.palette-pastel {
    background: linear-gradient(180deg, rgba(253,242,248,0.95), rgba(250,232,242,0.85));
    color: #be185d;
}

.palette-matcha {
    background: linear-gradient(180deg, rgba(240,253,244,0.95), rgba(220,252,231,0.88));
    color: #166534;
}

.palette-dark {
    background: linear-gradient(180deg, rgba(41,37,36,0.95), rgba(28,25,23,0.95));
    color: #e7e5e4;
}

.palette-cyber {
    background: linear-gradient(135deg, rgba(15,23,42,0.95), rgba(88,28,135,0.95));
    color: #e9d5ff;
}

.premium-chip-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.chip {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.05);
    color: var(--text-2);
    cursor: pointer;
    font-size: 13px;
}

.chip:hover,
.btn-palette:hover,
.folder-action-btn:hover,
.btn-folder-create:hover,
.library-view-btn:hover {
    transform: translateY(-1px);
}

/* library */
.premium-library {
    padding: 20px;
    height: 100%;
    box-sizing: border-box;
}

.library-topbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.library-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.library-title-wrap h2 {
    margin: 0;
    font-size: 24px;
}

.library-title-wrap p {
    margin: 4px 0 0;
    color: var(--text-3);
    font-size: 13px;
}

.library-topbar-right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.library-stat-chip {
    min-width: 96px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-2);
}

.library-stat-chip strong {
    color: white;
    font-size: 15px;
}

.library-stat-chip small {
    color: var(--text-3);
}

.library-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 18px;
    min-height: calc(100vh - 180px);
}

.library-sidebar,
.library-content {
    background: linear-gradient(180deg, rgba(13, 20, 38, 0.92), rgba(9, 15, 28, 0.82));
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 24px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.22);
}

.library-sidebar {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.library-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.library-sidebar-header h3 {
    margin: 0;
    font-size: 16px;
}

.btn-folder-create {
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(110,231,255,0.18);
    background: rgba(110,231,255,0.08);
    color: #dffaff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.folder-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: auto;
    max-height: 58vh;
    padding-right: 2px;
}

.folder-item {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    color: var(--text-2);
    cursor: pointer;
    text-align: left;
}

.folder-item.active {
    background: linear-gradient(180deg, rgba(110,231,255,0.12), rgba(139,92,246,0.10));
    border-color: rgba(110,231,255,0.22);
    color: #fff;
}

.folder-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-count {
    font-size: 12px;
    color: var(--text-3);
}

.folder-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.folder-action-btn {
    flex: 1;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.05);
    color: var(--text-2);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.folder-action-btn.danger {
    color: #ffd0d7;
    border-color: rgba(251,113,133,0.16);
    background: rgba(251,113,133,0.08);
}

.library-content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.library-content-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.library-search-wrap {
    flex: 1;
    min-width: 220px;
}

/* ============================================
   TOKEN DISPLAY
   ============================================ */
.token-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    user-select: none;
}

.token-display:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.token-icon {
    font-size: 16px;
    animation: pulse 2s infinite;
}

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

.token-count {
    font-size: 16px;
    font-weight: 700;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}

.token-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Estilo para quando os tokens estão baixos */
.token-display.low-tokens .token-count {
    color: var(--neon-pink);
    animation: warning-pulse 1s infinite;
}

@keyframes warning-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Estilo para quando não há tokens */
.token-display.no-tokens .token-count {
    color: #ff6b6b;
    animation: critical-pulse 0.8s infinite;
}

@keyframes critical-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.library-search {
    width: 100%;
    height: 46px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: white;
    padding: 0 16px;
    outline: none;
}

.library-toolbar-actions {
    display: flex;
    gap: 8px;
}

.library-view-btn {
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-2);
    cursor: pointer;
}

.library-view-btn.active {
    color: white;
    background: rgba(110,231,255,0.10);
    border-color: rgba(110,231,255,0.20);
}

.folder-drop-hint {
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(110,231,255,0.08), rgba(255,255,255,0.03));
    border: 1px dashed rgba(110,231,255,0.22);
    color: var(--text-2);
    font-size: 13px;
}

.premium-sticker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 14px;
    align-content: start;
    min-height: 320px;
}

/* generic sticker card suggestion for JS render */
.sticker-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.08);
    min-height: 180px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}

.sticker-card.dragging {
    opacity: 0.6;
    transform: scale(0.98);
}

.sticker-card .thumb {
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    background:
        linear-gradient(45deg, rgba(255,255,255,0.03) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,0.03) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.03) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.03) 75%);
    background-size: 18px 18px;
    background-position: 0 0, 0 9px, 9px -9px, -9px 0px;
}

.sticker-card .thumb img {
    width: 86%;
    height: 86%;
    object-fit: contain;
}

.sticker-card .meta {
    padding: 12px;
}

.sticker-card .title {
    font-size: 13px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.sticker-card .sub {
    font-size: 12px;
    color: var(--text-3);
}

/* responsive */
@media (max-width: 980px) {
    .library-layout {
        grid-template-columns: 1fr;
    }

    .library-sidebar {
        order: 2;
    }

    .library-content {
        order: 1;
    }

    .studio-mode-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .premium-shell {
        border-radius: 0;
    }

    .app-neon-frame,
    .app-shell-glow {
        border-radius: 0;
    }

    .header-status-pill {
        display: none;
    }

    .premium-input-footer .footer-hint,
    .footer-separator {
        display: none;
    }

    .premium-sticker-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
/* ============================================
   💻 TABLET & DESKTOP EXPANSION (FULLSCREEN STUDIO)
   ============================================ */

/* Quando a tela for maior que um celular (Tablet, PC) */
@media (min-width: 768px) {
    
    /* 1. O App domina 100% da tela */
    .app-container {
        max-width: 100% !important;
        width: 100vw !important;
        height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* 2. Centraliza o conteúdo do chat para não esticar demais na horizontal */
    .chat-area {
        padding-left: 10% !important;
        padding-right: 10% !important;
    }

    /* 3. A barra de digitação acompanha o chat */
    .input-area {
        padding-left: 10% !important;
        padding-right: 10% !important;
        border-radius: 0 !important; /* Tira as bordas arredondadas do fundo para colar na tela */
    }

    /* 4. Os botões de Modo ganham fôlego e ficam centralizados */
    .style-selector-bar {
        justify-content: center !important;
        gap: 24px !important;
    }

    .style-option {
        padding: 8px 24px !important;
        font-size: 14px !important;
    }

  /* 5. A Biblioteca aproveita o telão */
    .sticker-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
        padding-left: 10% !important;
        padding-right: 10% !important;
    }


}

/* Telas Ultra-Wide e Monitores Grandes (Garante que o chat não passe de um limite confortável) */
@media (min-width: 1440px) {
    .chat-area, .input-area, .sticker-grid, .feed-container {
        padding-left: 20% !important;
        padding-right: 20% !important;
    }
}

/* --- O EFEITO DE VIDRO NOS ADESIVOS DA BIBLIOTECA --- */

.sticker-image-wrap {
    overflow: hidden;
    border-radius: 16px;
}

.sticker-card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 10, 15, 0.6); /* Vidro escuro */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
    opacity: 0; /* Invisível por padrão */
    transition: all 0.3s ease;
    border-radius: 16px;
    backdrop-filter: blur(2px);
}

/* A mágica acontece quando passa o mouse (PC) ou toca (Tablet) */
.sticker-image-wrap:hover .sticker-card-overlay,
.sticker-card:active .sticker-card-overlay {
    opacity: 1;
}

.card-actions-top, .card-actions-bottom {
    display: flex;
    gap: 8px;
}

.card-actions-top { justify-content: flex-end; }
.card-actions-bottom { justify-content: flex-end; }

.btn-share {
    background: rgba(255, 184, 0, 0.9);
    color: #000;
    border: none;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.action-icon-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: 0.2s;
}

.action-icon-btn:hover { background: rgba(255, 255, 255, 0.3); transform: scale(1.05); }
/* ============================================
   🔥 NEON SNAP GALLERY (GLOBAL FEED)
   ============================================ */

/* O Efeito Neon Hover (Desktop) */


/* O Palco do Adesivo */
.feed-image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible; /* Deixa a sombra vazar */
}

/* A Arte em si */
.feed-post-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.7)); /* Sombra realista 3D no adesivo */
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Efeito 3D de "Pulo" quando passa o mouse na foto */
.feed-post:hover .feed-post-img {
    transform: scale(1.1) rotate(-3deg);
}

/* Tipografia e Cabeçalho */
.feed-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 0.8rem;
}
.feed-user-trigger {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    text-align: left;
    transition: opacity 0.2s;
}
.feed-user-trigger:hover { opacity: 0.7; }
.feed-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(34, 211, 238, 0.8); /* Aro neon na foto do perfil */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    font-size: 20px;
}
.feed-username {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}
.feed-post-time {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}

/* Prompt / Caption Premium */
.feed-caption {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.4;
    font-style: italic;
    border-left: 2px solid rgba(34, 211, 238, 0.5);
    padding-left: 10px;
}

/* Botões de Ação */
.feed-post-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}
.feed-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: rgba(255,255,255,0.6);
    transition: transform 0.2s, filter 0.2s;
}
.feed-btn:hover {
    transform: scale(1.2);
    filter: brightness(1.5);
}

/* O POP de Dopamina do Like */
@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.5) rotate(-10deg); }
    100% { transform: scale(1); }
}

.feed-likes {
    font-weight: 700;
    font-size: 0.9rem;
}

/* Caixinha de Comentário Dark/Sleek */
.feed-comment-box {
    display: flex;
    background: rgba(0,0,0,0.4);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(255,255,255,0.05);
}
.feed-comment-input {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 12px;
    color: white;
    font-size: 0.9rem;
    outline: none;
}
.feed-comment-btn {
    background: rgba(34, 211, 238, 0.1);
    color: #22d3ee;
    border: none;
    border-radius: 8px;
    padding: 0 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.feed-comment-btn:hover {
    background: rgba(34, 211, 238, 0.3);
}

/* ============================================
   JOYRIDE & GIFT MODAL (ONBOARDING) - VERSÃO LIMPA
   ============================================ */
.joyride-overlay {
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 100vw !important; height: 100vh !important;
    background: rgba(3, 5, 10, 0.85) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 999990 !important;
}

.joyride-highlight {
    position: relative !important;
    z-index: 999991 !important;
    pointer-events: none !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px !important;
    box-shadow: 0 0 0 4px rgba(255, 122, 24, 0.5) !important;
}

.joyride-tooltip {
    position: fixed !important;
    z-index: 999999 !important;
    background: linear-gradient(180deg, rgba(14, 20, 38, 0.98), rgba(8, 13, 25, 0.98)) !important;
    border: 1px solid rgba(255, 184, 0, 0.3) !important;
    padding: 16px 20px !important;
    border-radius: 16px !important;
    width: 260px !important;
    max-width: 90vw !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 122, 24, 0.2) !important;
}

.joyride-tooltip p {
    font-size: 14px !important; color: #cbd5e1 !important; margin-bottom: 16px !important;
}

.joyride-btn {
    width: 100% !important; padding: 10px !important; border-radius: 10px !important;
    border: none !important; color: #fff !important; font-weight: 700 !important; cursor: pointer !important;
    background: linear-gradient(135deg, #ff7a18, #ffb800) !important;
}

/* Animação do Presente */
.token-burst {
    animation: burstGlow 1s ease-out forwards !important;
}

@keyframes burstGlow {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
    50% { transform: scale(1.1); box-shadow: 0 0 30px 10px rgba(52, 211, 153, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
/* =========================================================
   MODAL DE PREVIEW DA LIBRARY (LIGHTBOX)
   ========================================================= */
.library-preview-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(3, 6, 10, 0.85);
    backdrop-filter: blur(12px);
    z-index: 9999;
    padding: 20px;
}

.library-preview-modal.active {
    display: flex;
}

.library-preview-card {
    position: relative;
    width: min(500px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.library-preview-img {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    /* Sombreamento para dar a ilusão de que o adesivo já está "solto" */
    filter: drop-shadow(0 30px 60px rgba(0,0,0,0.6)); 
    cursor: grab; /* Mostra a mãozinha/caneta de arrastar */
    transition: transform 0.2s ease;
}

.library-preview-img:active {
    cursor: grabbing;
    transform: scale(0.98); /* Dá um feedback tátil de que a pessoa "pegou" o adesivo */
}

.library-preview-prompt {
    margin-top: 24px;
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* =========================================================
           📱 RESPONSIVO COZY & PREMIUM (ANTI-QUEBRA)
           ========================================================= */
        @media (max-width: 1180px) {
            .hero-grid, .split-section, .trust-wrap { grid-template-columns: 1fr; }
            .trust-logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
            .feature-grid, .steps-grid, .testimonial-grid, .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .style-grid, .usecase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        }

        @media (max-width: 860px) {
            /* 🚨 Mantém tudo alinhado em linha no topo em vez de virar coluna */
            .nav-inner { flex-direction: row !important; justify-content: space-between !important; align-items: center !important; padding: 14px 0 !important; }
            .hero { padding-top: 34px; }
            .auth-inner-note, .form-row, .trust-logos { grid-template-columns: 1fr; }
            .section { padding: 68px 0; }
            .sticker-stage { height: 400px !important; }
            .feature-grid, .steps-grid, .testimonial-grid, .pricing-grid, .style-grid, .usecase-grid { grid-template-columns: 1fr; }
        }

        @media (max-width: 640px) {
            .container, .nav-inner { width: min(100% - 24px, var(--max)); }
            .section-title, .hero-title { font-size: clamp(32px, 10vw, 46px) !important; line-height: 1.15 !important; }
            .auth-panel { padding: 20px 16px; }
            
            /* Ajustes finos de espaço para telas muito pequenas */
            .brand-text h1 { font-size: 16px !important; white-space: nowrap !important; }
            .brand-text span { font-size: 9px !important; white-space: nowrap !important; }
            .brand-logo-wrap { width: 40px !important; height: 40px !important; border-radius: 14px !important; }
            .brand-logo-wrap img { width: 22px !important; height: 22px !important; }
            .brand { gap: 10px !important; }
            
            /* Diminui um pouco os botões do menu no celular para caber tudo na mesma linha */
            .nav-links a, .nav-links button { font-size: 12px !important; padding: 8px 10px !important; }
            /* Opcional: Esconde o texto do tiktok em telas minúsculas para priorizar o login */
            .nav-tiktok { display: none !important; } 
        }
/* =====================================================================
   ✨ THE CHAMPAGNE GLASS UNIFIER (A IDENTIDADE DEFINITIVA) ✨
   Cole no FINAL do arquivo. Este bloco unifica tudo!
   ===================================================================== */

/* 1. MATA OS NEONS ESCUROS RESTANTES */
.smoke-bg, .smoke-layer, .app-neon-frame, .app-shell-glow, .particles { 
    display: none !important; 
}

/* 2. O WALLPAPER PERFEITO (Com película rosé translúcida) */
body, html { background-color: #fdf2f8 !important; }
body::before {
    content: "";
    position: fixed !important; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -10 !important;
    background-image: 
        linear-gradient(rgba(253, 242, 248, 0.65), rgba(255, 235, 238, 0.70)),
        url('/backapp.png') !important;
    background-size: cover !important; background-position: center !important; filter: blur(6px) !important;
}

/* 3. A IDENTIDADE UNIFICADA (Todos os painéis com a mesma textura de vidro) */
/* Aqui consertamos o Header branco demais e o Rodapé preto demais de uma vez só */
.app-header, .premium-header,
.input-area, .premium-input-area,
.message-bubble,
.sidebar-menu,
.modal-content, .premium-modal,
.library-area, .library-sidebar, .library-content,
.feed-post {
    background: rgba(255, 255, 255, 0.45) !important; /* Vidro suave, não é branco sólido! */
    backdrop-filter: blur(20px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04) !important;
}

/* 4. TIPOGRAFIA DE LUXO (Isolada para não apagar os textos do Login) */
.app-container h1, .app-container h2, .app-container h3, .app-container h4, 
.msg-greeting, .logo-text h1, .modal-header h3, .package-name, .package-price {
    color: #3f2e3e !important;
    font-family: 'Playfair Display', serif !important;
    font-style: italic !important;
    text-shadow: none !important;
    -webkit-text-fill-color: #3f2e3e !important;
}
p, span, div, .token-count, .token-label, .char-count { color: #6b5a68 !important; }
.logo-subtitle, .footer-hint, .message-time { color: #9a8a97 !important; }

/* 5. ARRUMANDO A BARRA DE INPUT E OS BOTÕES QUE ESTAVAM PRETOS */
.input-container { background: transparent !important; border: none !important; box-shadow: none !important; }

.input-wrapper textarea { 
    background: rgba(255, 255, 255, 0.6) !important; 
    border: 1px solid rgba(255, 255, 255, 0.8) !important; 
    color: #3f2e3e !important; 
    border-radius: 16px !important;
}
.input-wrapper textarea::placeholder { color: #a393a1 !important; }

/* Botões Cinzas viram Botões Claros */
.style-option, .chip, .btn-action.btn-new, .btn-folder-create, .library-view-btn, .studio-trigger-btn { 
    background: rgba(255, 255, 255, 0.5) !important; 
    border: 1px solid rgba(255, 255, 255, 0.8) !important; 
    color: #5c4d5c !important; 
    font-weight: 600 !important;
}

/* Botão Ativo Fica Dourado */
.style-option.active, .chip:hover, .studio-trigger-btn:hover { 
    background: #fbbf24 !important; 
    color: #fff !important; 
    border-color: #fbbf24 !important; 
}

/* O Botão de Enviar (Dourado Quente) */
.btn-send, .btn-action.btn-download, .btn-main { 
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important; 
    color: #fff !important; 
    border: none !important; 
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2) !important; 
}
.btn-send svg, .btn-send svg path, .btn-send svg line, .btn-send svg polygon { 
    stroke: #fff !important; 
    fill: none !important; 
}

/* 6. LIMPANDO FUNDOS PRETOS ESCONDIDOS NA ESTRUTURA */
.app-container, .chat-area, .sticker-stage, .feed-area { background: transparent !important; }

/* 7. BADGES DE TOPO (Premium PNGs, Tokens, Studio Ready) */
.mini-badge, .header-status-pill, .token-display {
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    color: #5c4d5c !important;
    box-shadow: none !important;
}
.badge-dot { background-color: #fbbf24 !important; box-shadow: none !important; }
/* =====================================================================
   ✨ TYPOGRAPHY BOOST & PREMIUM STORE MAKEOVER ✨
   ===================================================================== */

/* 1. CONTRASTE MÁXIMO NOS TEXTOS (Fim da leitura lavada) */
h1, h2, h3, h4, .package-name, .package-price {
    color: #1a111a !important; /* Tom super escuro, quase preto */
    font-weight: 800 !important;
}

p, span, div, .feature, .package-desc, .modal-body { 
    color: #3f2e3e !important; /* Tom escuro para corpo de texto */
    font-weight: 500 !important;
}

.feature {
    color: #3f2e3e !important;
    font-size: 14px !important;
}

/* =====================================================================
   ✨ THE KAWAII PREMIUM STORE (COMPACT BUBBLE EDITION) ✨
   ===================================================================== */

/* O Modal da Loja (Ligeiramente mais largo e com scroll travado) */
#storeModal .modal-content {
    background: #ffffff !important;
    border: 2px solid #f3e8ff !important;
    box-shadow: 0 25px 60px rgba(147, 51, 234, 0.1) !important;
    max-width: 760px !important; /* Mais largo para o texto não empurrar a altura */
    overflow: hidden !important; /* Corta a barra de rolagem do container */
}

/* Trava a barra de rolagem do corpo do modal */
#storeModal .modal-body {
    overflow-y: hidden !important;
    padding: 20px 24px 24px !important; /* Menos margem no topo */
}

/* O Título da Loja */
.modal-header h3 {
    color: #2e1065 !important;
    font-size: 26px !important;
}

/* O Container dos Cartões */
.store-packages {
    display: flex !important;
    gap: 16px !important; /* Mais juntos */
    justify-content: center !important;
    margin-top: 25px !important; /* Menos margem no topo */
    padding-bottom: 10px !important;
    align-items: stretch !important;
}

/* A Base de Todos os Cartões */
.package-card {
    background: #ffffff !important;
    border-radius: 28px !important;
    padding: 30px 16px 16px !important; /* Padding vertical bem reduzido */
    position: relative !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    transition: transform 0.3s ease !important;
}

/* 🖼️ IMAGENS MENORES PARA CABER TUDO */
.package-image {
    width: 100px !important; /* Reduzido de 130px */
    height: 90px !important; /* Reduzido de 120px */
    object-fit: contain !important;
    margin-bottom: 12px !important; /* Menos respiro abaixo da imagem */
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.05)) !important;
}

/* Textos Globais dos Cartões */
.package-name {
    font-family: 'Playfair Display', serif !important;
    font-style: italic !important;
    font-size: 20px !important;
    color: #2e1065 !important;
    margin-bottom: 4px !important;
}
.package-desc { color: #6b7280 !important; font-size: 12px !important; text-align: center !important; margin-bottom: 14px !important; }
.package-features { color: #4b5563 !important; font-size: 13px !important; width: 100% !important; margin-bottom: 14px !important; display: flex; flex-direction: column; gap: 6px;}
.feature { justify-content: center !important; } 
.package-price { font-size: 28px !important; font-weight: 800 !important; margin-top: auto !important; margin-bottom: 12px !important; }

/* Botões Globais (Mais fininhos) */
.btn-package {
    border-radius: 999px !important;
    padding: 10px 20px !important; /* Altura do botão reduzida */
    font-weight: 800 !important;
    font-size: 14px !important;
    width: 100% !important;
    transition: all 0.2s !important;
}
.btn-package:hover { transform: translateY(-3px) !important; }

/* Badges Globais */
.package-badge {
    position: absolute !important;
    top: -14px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    padding: 6px 18px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    border: none !important;
    white-space: nowrap !important;
}

/* ============================================
   🎨 CORES ESPECÍFICAS DE CADA PACOTE
   ============================================ */

/* 1. PACOTE POP */
.package-card:nth-child(1) { border: 2px solid #f3e8ff !important; box-shadow: 0 10px 30px rgba(147, 51, 234, 0.05) !important; }
.package-card:nth-child(1) .package-badge { background: #f3e8ff !important; color: #9333ea !important; }
.package-card:nth-child(1) .package-price { color: #a855f7 !important; }
.package-card:nth-child(1) .btn-package { background: #ffffff !important; border: 2px solid #e9d5ff !important; color: #a855f7 !important; }
.package-card:nth-child(1) .btn-package:hover { background: #faf5ff !important; }

/* 2. PACOTE BEST */
.package-card.featured, .package-card:nth-child(2) {
    border: 3px solid #fde047 !important;
    transform: scale(1.04) !important; /* Scale reduzido de 1.06 para não encostar no teto */
    box-shadow: 0 20px 40px rgba(250, 204, 21, 0.15) !important;
    z-index: 10;
}
.package-card:nth-child(2) .package-badge { background: #fef08a !important; color: #ca8a04 !important; }
.package-card:nth-child(2) .package-price { color: #eab308 !important; }
.package-card:nth-child(2) .btn-package { background: linear-gradient(135deg, #fde047, #facc15) !important; border: none !important; color: #ffffff !important; box-shadow: 0 8px 20px rgba(250, 204, 21, 0.3) !important; }

/* 3. PACOTE PRO */
.package-card:nth-child(3) { border: 2px solid #fce7f3 !important; box-shadow: 0 10px 30px rgba(219, 39, 119, 0.05) !important; }
.package-card:nth-child(3) .package-badge { background: #fce7f3 !important; color: #db2777 !important; }
.package-card:nth-child(3) .package-price { color: #f472b6 !important; }
.package-card:nth-child(3) .btn-package { background: #ffffff !important; border: 2px solid #fbcfe8 !important; color: #f472b6 !important; }
.package-card:nth-child(3) .btn-package:hover { background: #fdf2f8 !important; }

/* =====================================================================
   🚑 GLOBAL FEED HOTFIX (FIM DA SOBREPOSIÇÃO)
   ===================================================================== */

/* 1. Oculta o app de trás e cria um fundo blindado para o Feed */
.feed-area {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 2000 !important; /* Passa por cima de TUDO (Header original, botões, etc) */
    background-color: #fdf2f8 !important; /* Fundo sólido para tapar o que está atrás */
    background-image: linear-gradient(rgba(253, 242, 248, 0.85), rgba(255, 235, 238, 0.90)), url('/backapp.png') !important;
    background-size: cover !important;
    background-position: center !important;
    flex-direction: column !important;
}

/* 2. Cria uma barra de topo exclusiva e chique para o Feed */
.feed-area .library-header {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 16px 24px !important;
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.8) !important;
    margin: 0 !important; /* Arranca a margem que deixava ele flutuando no nada */
    box-shadow: 0 4px 15px rgba(0,0,0,0.03) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 3. Arruma o Botão Back para o tema Claro */
.feed-area .btn-back {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 1) !important;
    color: #3f2e3e !important;
    font-weight: 700 !important;
    border-radius: 14px !important;
    padding: 10px 16px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04) !important;
    transition: all 0.2s ease !important;
}
.feed-area .btn-back:hover {
    background: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(251, 191, 36, 0.15) !important;
    border-color: #fbbf24 !important;
    color: #d97706 !important;
}

/* 4. Título do Feed na nova cor base */
.feed-area .library-header h2 {
    margin: 0 !important;
    color: #2e1065 !important;
    font-size: 24px !important;
}

/* 5. Compensa o espaço da nova barra no container dos posts */
.feed-container {
    padding-top: 30px !important;
}
/* =====================================================================
   🌸 CLEAR GLASS & PASTEL FIX (ERRADICANDO O CINZA MORTO) 🌸
   ===================================================================== */

/* 1. O MENU LATERAL (SIDEBAR) CLARO E ELEGANTE */
.sidebar-menu {
    background: rgba(255, 255, 255, 0.85) !important; /* Branco leitoso translúcido */
    border-left: 1px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: -10px 0 40px rgba(147, 51, 234, 0.08) !important; /* Glow lilás sutil, sem sombra preta */
}

.sidebar-header h2 {
    color: #2e1065 !important; /* Roxo escuro chique */
}

.sidebar-close {
    color: #9a8a97 !important;
}

/* Os botões do menu lateral */
.sidebar-item {
    color: #6b5a68 !important; /* Grafite suave */
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02) !important;
}

.sidebar-item:hover {
    background: #fdf2f8 !important; /* Fundo rosinha pastel no hover */
    border-color: #fbcfe8 !important;
    color: #db2777 !important; /* Rosa forte no texto */
    transform: translateX(4px) !important;
    box-shadow: 0 4px 15px rgba(219, 39, 119, 0.08) !important;
}

.sidebar-divider {
    background: rgba(243, 232, 255, 0.8) !important; /* Linha divisória lilás bem clarinha */
}

.sidebar-item-logout {
    color: #ef4444 !important;
    background: rgba(254, 226, 226, 0.6) !important;
    border-color: rgba(254, 226, 226, 0.9) !important;
}
.sidebar-item-logout:hover {
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
}

/* 2. O CARD DE DICA NO CHAT (Matando o gradiente chumbo) */
.welcome-highlight-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(253, 242, 248, 0.95)) !important;
    border: 1px solid #fce7f3 !important;
    box-shadow: 0 6px 20px rgba(219, 39, 119, 0.06) !important;
}

.welcome-highlight-icon {
    background: #fdf2f8 !important;
    border: 1px solid #fbcfe8 !important;
    color: #db2777 !important;
}

.welcome-highlight-text {
    color: #6b5a68 !important;
}

.highlight-word {
    color: #db2777 !important; /* Destaca a palavra em Rosa */
}

/* 3. AS TAGS E BADGES DO CHAT E HEADER (Removendo o Neon escuro) */
.mini-badge {
    background: #fdf2f8 !important;
    border: 1px solid #fbcfe8 !important;
    color: #db2777 !important;
    box-shadow: 0 2px 8px rgba(219, 39, 119, 0.05) !important;
}

.mini-badge-soft {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
}

.active-setup-pill {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 1) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03) !important;
}

.active-setup-pill span {
    color: #9a8a97 !important;
}

.active-setup-pill strong {
    color: #d97706 !important; /* Dourado combinando com o botão Studio */
}

/* 4. BOTÕES INLINE DO CHAT (Expandir, Download) */
.btn-inline-expand {
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    color: #6b5a68 !important;
}
.btn-inline-expand:hover {
    background: #ffffff !important;
    color: #db2777 !important;
    border-color: #fbcfe8 !important;
    box-shadow: 0 4px 12px rgba(219, 39, 119, 0.08) !important;
}
/* =====================================================================
   🛍️ THE ULTIMATE STORE (CENÁRIO 100% VIVO E LIMPO)
   ===================================================================== */

/* 1. O Modal Container (Fundo com a imagem direta, sem máscaras ou vidros) */
#storeModal .modal-content {
    position: relative !important;
    
    /* A IMAGEM VAI AQUI: 100% viva, preenchendo tudo */
    background: url('/lojaback.png') center bottom / cover no-repeat !important;
    background-color: #ffffff !important;
    
    border: 2px solid #f3e8ff !important;
    max-width: 820px !important;
    overflow: hidden !important; 
    
    /* 🚨 A MÁGICA: Cancela o vidro branco do Unifier para este modal específico! */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* 2. Mata qualquer pseudo-elemento antigo que estava apagando a imagem */
#storeModal .modal-content::before {
    display: none !important;
}

/* 3. Modal Body */
#storeModal .modal-body {
    position: relative !important;
    z-index: 10 !important;
    padding: 25px 24px 30px 24px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

/* 4. O Texto de Abertura (Com um brilho branco atrás para ler bem em cima do sol) */
.store-premium-text {
    font-family: 'Playfair Display', serif !important;
    font-style: italic !important;
    font-size: 22px !important;
    color: #6b21a8 !important; /* Roxo forte elegante */
    text-align: center !important;
    margin: 0 0 25px 0 !important;
    font-weight: 900 !important;
    text-shadow: 0 2px 15px rgba(255, 255, 255, 0.9) !important; 
}

/* 5. A Vitrine (Grid travado) */
.store-packages {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 18px !important;
    width: 100% !important;
    margin: 0 !important;
    padding-top: 15px !important;
}

/* 6. OS CARTÕES TRANSPARENTES (EFEITO VIDRO FOFO) */
.package-card {
    background: rgba(255, 255, 255, 0.45) !important; 
    backdrop-filter: blur(10px) !important; 
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important; 
    border-radius: 28px !important;
    padding: 35px 16px 16px !important;
    margin: 0 !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    height: 100% !important;
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.08) !important;
}

/* Destaque para o Pacote do Meio (Best) */
.package-card.featured {
    background: rgba(255, 255, 255, 0.6) !important;
    border: 2px solid #fde047 !important;
    box-shadow: 0 15px 40px rgba(250, 204, 21, 0.2) !important;
    transform: scale(1.03) !important;
    z-index: 15 !important;
}

/* 7. Ajustes dos Elementos Internos */
.package-badge {
    position: absolute !important;
    top: -14px !important; 
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 20 !important;
    white-space: nowrap !important;
}

.package-image {
    width: 110px !important; 
    height: 100px !important;
    object-fit: contain !important;
    margin-bottom: 15px !important;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.06)) !important;
}

.package-price {
    margin-top: auto !important; 
    margin-bottom: 12px !important;
}

/* ================== CORES DOS TEXTOS E BOTÕES ================== */
.package-card:nth-child(1) .package-badge { background: #f3e8ff !important; color: #9333ea !important; }
.package-card:nth-child(1) .package-price { color: #a855f7 !important; }
.package-card:nth-child(1) .btn-package { background: rgba(255,255,255,0.8) !important; border: 2px solid #e9d5ff !important; color: #a855f7 !important; }

.package-card.featured .package-badge { background: #fef08a !important; color: #ca8a04 !important; }
.package-card.featured .package-price { color: #eab308 !important; }
.package-card.featured .btn-package { background: linear-gradient(135deg, #fde047, #facc15) !important; border: none !important; color: #ffffff !important; box-shadow: 0 8px 20px rgba(250, 204, 21, 0.3) !important; }

.package-card:nth-child(3) .package-badge { background: #fce7f3 !important; color: #db2777 !important; }
.package-card:nth-child(3) .package-price { color: #f472b6 !important; }
.package-card:nth-child(3) .btn-package { background: rgba(255,255,255,0.8) !important; border: 2px solid #fbcfe8 !important; color: #f472b6 !important; }

@media (max-width: 768px) {
    /* Salva a bateria e a fluidez do celular */
    .bg-image { 
        animation: none !important; 
        transform: none !important;
    }
}
/* =====================================================================
   🔥 A SUPREMA MARRETA DO FEED UNIFICADA: APP (VERTICAL) VS LOGIN (HORIZONTAL)
   ===================================================================== */

/* -----------------------------------------------------------------
   1. O LAYOUT DO APP NO PC (Grid com 2 colunas lado a lado)
   ----------------------------------------------------------------- */
.feed-area .feed-container {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(320px, 420px)) !important; 
    justify-content: center !important;
    align-content: start !important;
    gap: 40px 30px !important;
    
    width: 100% !important;
    flex: 1 !important; 
    height: auto !important; 
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 20px 10px 150px 10px !important;
    scroll-snap-type: none !important;
}

.feed-area .feed-post {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important; 
    min-height: unset !important; 
    margin: 0 !important;
    scroll-snap-align: none !important;
}

/* -----------------------------------------------------------------
   2. O LAYOUT DO APP NO CELULAR (Scroll Estilo TikTok - 1 por fila)
   ----------------------------------------------------------------- */
@media (max-width: 768px) {
    .feed-area .feed-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
        scroll-snap-type: y mandatory !important;
        scroll-padding-top: 15px !important;
    }
    
    .feed-area .feed-post {
        width: 100% !important;
        max-width: 380px !important;
        height: 45vh !important; 
        min-height: 350px !important;
        scroll-snap-align: start !important;
        overflow: hidden !important;
    }

    .feed-area .feed-image-wrapper {
        aspect-ratio: auto !important;
        flex: 1 !important;
        min-height: 0 !important;
        margin-bottom: 8px !important;
    }

    .feed-area .feed-post-img {
        height: 100% !important;
        width: 100% !important;
        object-fit: contain !important;
        margin-bottom: 0 !important;
    }
    
    .feed-area .feed-comment-box {
        display: none !important;
    }
}
/* =====================================================================
   🌟 NAV COM LAYOUT FLEXÍVEL + SUPREMA MOBILE TAB BAR
   ===================================================================== */

/* 1. COMPORTAMENTO PARA DESKTOP / PC */
.app-header {
    position: relative !important; /* Transforma o header no ponto de referência */
}

.header-main-nav {
    position: static !important; /* Remove absolute, deixa o flow normal */
    display: flex !important;
    gap: 16px !important;
    margin: 0 !important;
    z-index: 100 !important;
}

.header-nav-btn {
    background: rgba(255, 255, 255, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    color: #6b5a68 !important;
    padding: 8px 18px !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    transition: 0.2s ease !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
}

.header-nav-btn:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: #fbcfe8 !important;
    color: #db2777 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 14px rgba(219,39,119,0.10) !important;
}

/* 2. 📱 A MÁGICA DO CELULAR (TRANSFORMAÇÃO EM TAB BAR INFERIOR) */
@media (max-width: 768px) {
    .header-main-nav {
        position: fixed !important;
        bottom: 0 !important;   /* Cola no rodapé do celular */
        left: 0 !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        height: 68px !important; /* Altura perfeita para o clique */
        margin: 0 !important;
        
        /* Visual de Vidro Escuro Premium (Glassmorphism flutuando) */
        background: rgba(10, 10, 15, 0.88) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-left: none !important;
        border-right: none !important;
        border-bottom: none !important;
        border-radius: 0 !important;
        
        /* Distribui os botões igualmente pela largura da tela do celular */
        justify-content: space-around !important;
        align-items: center !important;
        padding: 0 15px !important;
        gap: 0 !important;
        z-index: 999999 !important; /* Fica por cima de absolutamente tudo */
        box-shadow: 0 -10px 35px rgba(0, 0, 0, 0.6) !important;
    }

    .header-nav-btn {
        background: transparent !important;
        border: none !important;
        padding: 10px 20px !important;
        font-size: 22px !important; /* Aumenta o emoji para o clique do dedo ser cirúrgico */
        border-radius: 0 !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
    }
    
    .header-nav-btn:hover {
        transform: none !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .header-nav-btn span {
        display: none !important; /* Oculte o texto no celular para manter clean, foca só no ícone */
    }
    
    /* 🚨 PROTEÇÃO DO CONTEÚDO: Dá um espaço no fundo do app para a barra não cobrir as coisas */
    .feed-container, .chat-history, #libraryArea, .studio-container {
        padding-bottom: 90px !important;
    }
}
/* =====================================================================
   🎨 DROPDOWN DE ESTILOS (POPOVER PREMIUM)
   ===================================================================== */
.style-popover {
    position: absolute;
    bottom: calc(100% + 12px); /* Abre flutuando acima do botão */
    left: 0;
    width: 220px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08), 0 0 0 1px rgba(168, 85, 247, 0.1);
    padding: 14px;
    
    /* Animação Inicial Oculta */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    transform-origin: bottom left;
}

.style-popover.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.popover-header {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #9a8a97;
    margin-bottom: 10px;
    padding-left: 6px;
}

.popover-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.popover-options .btn-palette {
    width: 100%;
    text-align: left;
    justify-content: flex-start;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
}
/* 🚨 QUEBRANDO O MURO: Libera o popover para flutuar acima do rodapé */
.input-area,
.input-area.premium-input-area,
.style-selector-bar,
.style-selector-bar.premium-style-bar {
    overflow: visible !important;
    /* Se a barra ficar longa no celular, ela quebra de linha em vez de criar rolagem e cortar o popover */
    flex-wrap: wrap !important; 
}

/* =====================================================================
   🖼️ ÍCONES CUSTOMIZADOS DO HEADER (SUBSTITUTOS DOS EMOJIS)
   Definição canônica abaixo no bloco Mobile Unificado.
   ===================================================================== */
/* =====================================================================
   📱 MOBILE UNIFICADO — BLOCO ÚNICO LIMPO E SEM CONFLITO
   Corrige: ícones sobrepostos, scroll horizontal indevido,
   fundo cinza nos botões de nav, tab bar inferior premium.
   ===================================================================== */

/* ── Ícones customizados do header (base, fora de media query) ── */
.nav-custom-icon {
    width: 26px !important;
    height: 26px !important;
    object-fit: contain !important;
    display: block !important;
    flex-shrink: 0 !important;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.08));
}
.header-nav-btn:hover .nav-custom-icon {
    transform: scale(1.15) rotate(-5deg) !important;
}

@media (max-width: 768px) {
    /* 🚨 O RESET SALVADOR: Devolve o header para o fluxo da página e mata a sobreposição */
    .app-header, 
    .app-header.premium-header, 
    header {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 999 !important; /* Garante que menus abertos fiquem por cima */
        margin-bottom: 15px !important; /* Dá um respiro pro texto do login respirar */
    }

    /* ── 1. BLOQUEIA O SCROLL HORIZONTAL GLOBAL ── */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    /* ── 2. APP CONTAINER: ocupa 100% sem vazar ── */
    .app-container {
        max-width: 100vw !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }

    /* ── 3. HEADER: linha única, compacta, sem quebra ── */
    .app-header,
    .app-header.premium-header {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: 54px !important;
        min-height: 54px !important;
        padding: 0 14px !important;
        gap: 0 !important;
        /* Garante que o header não crie referência posicional que empurre a tab bar */
        position: relative !important;
        z-index: 20 !important;
    }

    /* Logo: comprimida e sem subtítulo */
    .logo {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex-shrink: 0 !important;
        min-width: 0 !important;
        max-width: 140px !important;
    }

    .logo-icon {
        width: 30px !important;
        height: 30px !important;
        flex-shrink: 0 !important;
    }

    .logo-subtitle { display: none !important; }

    .logo-text h1 {
        font-size: 15px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        margin: 0 !important;
    }

    /* ── 4. NAV CENTRAL: escondida no header, vira tab bar fixa ── */
    /*
       A .header-main-nav usa position: absolute no desktop (centralizada).
       No mobile ela sai do header e vira uma tab bar fixada no rodapé.
       Não conflita com nada porque usamos position: fixed de alto z-index.
    */
    .header-main-nav {
        /* Reset total do modo desktop */
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        height: 60px !important;
        margin: 0 !important;

        /* Visual: vidro branco pastel — sem cinza, sem neon escuro */
        background: rgba(255, 255, 255, 0.78) !important;
        backdrop-filter: blur(18px) saturate(160%) !important;
        -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
        border-top: 1px solid rgba(251, 207, 232, 0.55) !important;
        border-left: none !important;
        border-right: none !important;
        border-bottom: none !important;
        border-radius: 0 !important;
        box-shadow: 0 -4px 20px rgba(219, 39, 119, 0.07) !important;

        /* Layout: 3 botões igualmente espaçados */
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-around !important;
        align-items: center !important;
        gap: 0 !important;
        padding: 0 !important;
        z-index: 9999 !important;
        overflow: visible !important;
    }

    /* ── 5. BOTÕES DA TAB BAR: apenas ícone, fundo transparente ── */
    .header-nav-btn {
        /* Reset de todos os estilos desktop */
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        border-radius: 0 !important;

        /* Layout: coluna (ícone + label pequeno) */
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 3px !important;
        padding: 8px 16px !important;
        flex: 1 !important;
        height: 100% !important;
        cursor: pointer !important;
        transition: opacity 0.15s ease !important;
    }

    .header-nav-btn:hover,
    .header-nav-btn:active {
        background: transparent !important;
        box-shadow: none !important;
        transform: none !important;
        opacity: 0.7 !important;
    }

    /* Ícone maior e nítido */
    .header-nav-btn .nav-custom-icon {
        width: 26px !important;
        height: 26px !important;
    }

    /* Label de texto embaixo do ícone: pequeno e na cor do tema */
    .header-nav-btn span {
        display: block !important;
        font-size: 10px !important;
        font-weight: 600 !important;
        color: #9a8a97 !important;
        letter-spacing: 0.02em !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    /* ── 6. AÇÕES DO HEADER (tokens + hamburger): mantidas no header ── */
    .header-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 8px !important;
        flex-shrink: 0 !important;
    }

    /* Token: só ícone + número, sem label */
    .token-display {
        padding: 5px 10px !important;
        gap: 4px !important;
    }
    .token-label { display: none !important; }

    /* Status pill: invisível no mobile */
    .header-status-pill { display: none !important; }

    /* ── 7. CONTEÚDO: padding no fundo para a tab bar não cobrir ── */
    .chat-area {
        padding: 12px 12px 80px 12px !important;
    }

    #libraryArea,
    .library-area {
        padding-bottom: 80px !important;
    }

    .feed-container,
    .feed-area .feed-container {
        padding-bottom: 80px !important;
    }

    /* ── 8. INPUT AREA: colada no fundo, acima da tab bar ── */
    .input-area,
    .input-area.premium-input-area {
        padding: 10px 12px !important;
        /* A tab bar tem 60px; safe-area compensa o notch/home indicator */
        padding-bottom: calc(60px + max(8px, env(safe-area-inset-bottom))) !important;
        overflow: visible !important;
        flex-wrap: wrap !important;
    }

    /* Style selector: scroll horizontal sem mostrar scrollbar */
    .style-selector-bar {
        padding: 4px 0 6px 0 !important;
        gap: 6px !important;
        justify-content: flex-start !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        scrollbar-width: none !important;
        flex-wrap: nowrap !important;
    }
    .style-selector-bar::-webkit-scrollbar { display: none !important; }

    .style-option {
        font-size: 12px !important;
        padding: 6px 12px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    /* ── 9. MODAIS: surgem de baixo, com bordas arredondadas no topo ── */
    .modal-overlay {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    .modal-content {
        max-height: 92dvh !important;
        border-radius: 20px 20px 0 0 !important;
        /* Evita que o modal fique embaixo da tab bar */
        padding-bottom: max(16px, env(safe-area-inset-bottom)) !important;
    }

    /* ── 10. TEXTOS E LAYOUT GERAL ── */
    .hero-title {
        font-size: 28px !important;
        line-height: 1.15 !important;
        text-align: center !important;
        word-wrap: break-word !important;
    }

    p { font-size: 14px !important; line-height: 1.4 !important; }

    .hero-section,
    .login-container,
    main {
        padding-top: 12px !important;
        min-height: auto !important;
        gap: 12px !important;
    }

} /* fim @media (max-width: 768px) */

/* ── Telas muito pequenas (≤ 360px): ícones um pouco menores ── */
@media (max-width: 360px) {
    .header-nav-btn {
        padding: 8px 10px !important;
    }
    .header-nav-btn .nav-custom-icon {
        width: 22px !important;
        height: 22px !important;
    }
    .header-nav-btn span {
        font-size: 9px !important;
    }
    .logo-text h1 {
        font-size: 13px !important;
    }
}
/* =====================================================================
   📱 OTIMIZAÇÃO: MENU HAMBÚRGUER EXCLUSIVO PARA MOBILE
   ===================================================================== */

/* No computador: esconde os botões clonados do menu lateral */
.mobile-only-nav {
    display: none;
}

@media (max-width: 768px) {
    /* 1. Esconde a barra do meio do Header (Library, Feed, Store originais) */
    .header-main-nav {
        display: none !important;
    }

    /* 2. Mostra os botões clonados dentro do menu Hambúrguer */
    .mobile-only-nav {
        display: block;
    }
}
/* =====================================================================
   🛍️ CORREÇÃO DA LOJA NO CELULAR (MOBILE STORE FIX)
   ===================================================================== */
@media (max-width: 768px) {
    /* 1. DESTRAVAR A ROLAGEM: Permite o usuário descer até os botões de compra */
    #storeModal .modal-content,
    #storeModal .modal-body {
        overflow-y: auto !important; 
        max-height: 90vh !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* 2. EMPILHAR OS CARTÕES: Um embaixo do outro ao invés de lado a lado */
    #storeModal .store-packages {
        display: flex !important;
        flex-direction: column !important;
        gap: 35px !important; /* Espaço extra para as tags flutuantes não baterem no card de cima */
        padding-top: 25px !important;
        padding-bottom: 30px !important;
    }

    /* 3. AJUSTE DO CARTÃO "BEST": Tira o zoom gigante para caber na telinha */
    #storeModal .package-card.featured {
        transform: none !important;
        border-width: 2px !important;
    }

    /* 4. REDUZIR O TÍTULO: Para sobrar mais espaço para os produtos */
    .store-premium-text {
        font-size: 18px !important;
        margin-bottom: 10px !important;
    }
}