/* ==========================================================================
   animação da cortina
   ========================================================================== */

#site-loader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    pointer-events: none;
}

/* metades */
.loader-top,
.loader-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    height: 50%;
    background: black;
    transition: transform 0.8s cubic-bezier(.7,0,.3,1);
}

/* metade de cima */
.loader-top {
    top: 0;
    transform-origin: top;
}

/* metade de baixo */
.loader-bottom {
    bottom: 0;
    transform-origin: bottom;
}

/* estado aberto */
#site-loader.open .loader-top {
    transform: scaleY(0);
}

#site-loader.open .loader-bottom {
    transform: scaleY(0);
}


/* ==========================================================================
   1. CONFIGURAÇÕES E DISCORD (ESTILO ORIGINAL RESTAURADO)
   ========================================================================== */

   /* Loader de mensagens antigas */
.chat-top-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

.chat-top-loader .spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top: 3px solid #5865f2;
    border-radius: 50%;
    animation: spinLoader 0.7s linear infinite;
}

@keyframes spinLoader {
    to { transform: rotate(360deg); }
}

   .discord-loading-screen{
    position:absolute;
    inset:0;
    background:#313338;

    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    gap:30px;
}

.discord-loading-logo{
    width:120px;
    animation:discordPulse 1.5s infinite ease-in-out;
}

@keyframes discordPulse{
    0%{ transform:scale(.9); opacity:.7 }
    50%{ transform:scale(1.05); opacity:1 }
    100%{ transform:scale(.9); opacity:.7 }
}

.discord-loading-bar{
    width:240px;
    height:6px;
    background:#2b2d31;
    border-radius:20px;
    overflow:hidden;
}

#discord-progress{
    height:100%;
    width:0%;
    background:#5865f2;
    transition:width .35s ease;
}

.discord-loading-text{
    font-size:13px;
    color:#aaa;
    letter-spacing:.3px;
}

.msg {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;

    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.msg.show {
    opacity: 1;
    transform: translateY(0);
}

.channel-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    margin: 2px 6px;
    border-radius: 6px;
    color: #949ba4;
    cursor: pointer;
    transition: all 0.15s ease;
}

.channel-link:hover {
    background: #35373c;
    color: #fff;
}

.channel-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.msg:hover {
    background: rgba(255,255,255,0.02);
}

.username {
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 3px;
}

.msg-content {
    color: #dbdee1;
    font-size: 14px;
    line-height: 1.4;
}

.discord-input-area {
    display: flex;
    padding: 10px;
    background: #1e1f22;
    gap: 10px;
}

.discord-input-area input {
    flex: 1;
    padding: 8px;
    border-radius: 5px;
    border: none;
    background: #2b2d31;
    color: white;
    outline: none;
}

.discord-input-area button {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    background: #5865f2;
    color: white;
    cursor: pointer;
}


.discord-link {
    color: #00a8fc;
    text-decoration: none;
}

.discord-link:hover {
    text-decoration: underline;
}

.discord-mention {
    background: rgba(88, 101, 242, 0.3);
    color: #dee0fc;
    padding: 1px 5px;
    border-radius: 4px;
}

.discord-reply {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    margin-left: 2px;
}

.reply-bar {
    width: 2px;
    height: 14px;
    background: #5865f2;
    border-radius: 4px;
}

.reply-content {
    display: flex;
    gap: 6px;
    font-size: 13px;
    color: #b9bbbe;
    max-width: 90%;
}

.reply-user {
    color: #fff;
    font-weight: 500;
}

.reply-text {
    opacity: 0.8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 260px));
    gap: 8px;
    margin-top: 8px;
}

.discord-image {
    width: 100%;
    margin-top: 8px;
}

.discord-image img {
    width: 100%;
    max-width: 100%;
    height: auto;

    display: block;

    border-radius: 8px;
    border: 1px solid #2b2d31;

    object-fit: contain;
}

.discord-image:hover {
    transform: scale(1.02);
}

.video-wrapper {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #2b2d31;
}

.video-wrapper video {
    width: 100%;
    max-height: 350px;
}

.welcome-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 100%;
    color: #949ba4;
    font-size: 15px;
}

.welcome-icon {
    font-size: 22px;
}


:root {
    --glass: rgba(25, 25, 25, 0.85);
    --border: rgba(255, 255, 255, 0.1);
    --discord-bg: #313338;
    --discord-header: #2b2d31;
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: #1e1f22; 
    background-image: url('Files/Desktop.png'); 
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    background-size: cover;
    user-select: none;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* ==========================================
   LOGIN TRANSIÇÃO FLIP
========================================== */

.login-avatar-wrapper {
    perspective: 1000px;
    display: flex;
    justify-content: center;
}

#loginAvatar {
    transition: transform 0.8s cubic-bezier(.4,.2,.2,1);
    transform-style: preserve-3d;
}

#loginAvatar.flipping {
    transform: rotateY(180deg);
}

/* Fade suave no nome e botão */
.fade-in {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

#loginScreen {
    position: fixed;
    inset: 0;
    background: inherit;
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

#loginScreen::before {
    content: "";
    position: absolute;
    inset: 0;
    /* Gradiente sutil para dar profundidade ao blur */
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.5) 100%);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
}

.login-content {
    position: relative;
    text-align: center;
    width: 320px; /* Um pouco mais largo para respiro */
    padding: 2rem;
    color: white;
    animation: fadeIn 0.8s ease-out;
}

#loginAvatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    object-fit: cover;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#loginInputGroup input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);

    background: rgba(255, 255, 255, 0.1);
    color: white;

    margin-bottom: 15px;
    text-align: center;
    outline: none;

    box-sizing: border-box;  /* ← ESSA LINHA RESOLVE TUDO */
    transition: all 0.3s ease;
}


/* Efeito de foco no input */
#loginInputGroup input:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

#btnFetchUser, #btnEnter {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s active, background 0.3s ease, box-shadow 0.3s;
}

#btnFetchUser {
    background: rgba(255, 255, 255, 0.15); /* Mais elegante que o azul sólido */
    color: white;
    margin-bottom: 10px;
}

#btnFetchUser:hover { background: rgba(255, 255, 255, 0.25); }

#btnEnter {
    background: #0078d4; /* Azul é mais comum para ação principal */
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 120, 212, 0.3);
}

#btnEnter:hover {
    background: #0086ed;
    box-shadow: 0 6px 20px rgba(0, 120, 212, 0.4);
    transform: translateY(-1px);
}

#btnEnter:active { transform: translateY(0); }

/* Animação de entrada */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

#desktop {
    width: 100vw;
    height: calc(100vh - 48px); /* Descontando a barra de tarefas */
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    padding: 10px; /* Margem de segurança para os ícones */
}

/* Alinhamento correto dos apps abertos na taskbar */
#taskIcons {
    display: flex;          /* faz ficar lado a lado */
    align-items: center;
    gap: 6px;               /* espaço entre ícones */
    height: 100%;
}

.icon {
    width: 74px;   /* Tamanho real de ícone do Windows */
    height: 82px;  /* Altura compacta */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 6px 2px;
    cursor: default;
    border: 1px solid transparent;
    border-radius: 4px;
    user-select: none;
    transition: background 0.1s;
}

.icon:hover {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.icon img {
    width: 40px;  /* Imagem pequena, padrão Windows */
    height: 40px;
    margin-bottom: 4px;
    pointer-events: none;
}

.icon span {
    color: white;
    font-size: 11px; /* Fonte pequena de sistema */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 1);
    text-align: center;
    width: 100%;
    
    /* Isso aqui resolve o Bloco de Notas sem aumentar o ícone */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Quebra em 2 linhas se precisar */
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.2;
    word-break: break-word; /* Força a quebra de palavras longas */
}

/* Quando o ícone estiver selecionado ou sendo arrastado */
.icon.dragging, .icon:active {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

#taskbar {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 50px;
    background: var(--glass);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center; /* Garante o centro no meio absoluto */
    border-top: 1px solid var(--border);
    z-index: 9999;
}

.center { margin: auto; display: flex; align-items: center; gap: 8px; }
.right { position: absolute; right: 15px; color: white; text-align: right; }
.clock-info { display: flex; flex-direction: column; font-size: 11px; }

#winButton { background: transparent; border: none; cursor: pointer; padding: 5px; border-radius: 5px; }
#winButton img { width: 28px; border-radius: 50%; }

.task-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;
    cursor: pointer;

    transition: background 0.15s ease;
    border-bottom: none;
}

.task-icon:hover {
    background: rgba(255,255,255,0.12);
}

.task-icon.active {
    background: rgba(255,255,255,0.18);
}

.task-icon img { width: 26px; }

/* --- JANELAS E DISCORD (ESTRUTURA ORIGINAL) --- */
.window {
    position: absolute; width: 850px; height: 550px;
    background: var(--discord-bg); border-radius: 10px;
    border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex; flex-direction: column; overflow: hidden;
}

.window.maximized { top: 0 !important; left: 0 !important; width: 100vw !important; height: calc(100vh - 50px) !important; border-radius: 0; }

.header { background: var(--discord-header); padding: 10px 15px; display: flex; justify-content: space-between; align-items: center; color: white; cursor: move; flex-shrink: 0; }

.header-buttons button { background: transparent; border: none; color: white; padding: 5px 12px; cursor: pointer; }
.header-buttons .close-btn:hover { background: #e81123; }

.window-content { flex: 1; display: flex; overflow: hidden; }

.discord-main { display: flex; width: 100%; height: 100%; }
.discord-sidebar { width: 240px; background: #2b2d31; display: flex; flex-direction: column; border-right: 1px solid rgba(0,0,0,0.2); flex-shrink: 0; }
.discord-chat-area { flex: 1; position: relative; background: #313338; display: flex; flex-direction: column; min-width: 0; }
.chat { flex: 1; padding: 20px; overflow-y: auto; overflow-x: hidden; background: var(--discord-bg); }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.msg-data { flex: 1; min-width: 0; }
.username { color: #ffffff !important; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.msg-content { color: #dbdee1; font-size: 14px; line-height: 1.4; word-wrap: break-word; }
.msg-media { margin-top: 8px; max-width: 100%; height: auto; max-height: 350px; border-radius: 8px; display: block; border: 1px solid rgba(255,255,255,0.1); }

.discord-loader { position: absolute; inset: 0; background: var(--discord-bg); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 100; color: white; }
.pulse-logo { width: 80px; margin-bottom: 20px; animation: discord-pulse 1.5s infinite ease-in-out; }

@keyframes discord-pulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

.server-header { padding: 15px; font-weight: bold; border-bottom: 1px solid rgba(0,0,0,0.2); color: white; }
.channels-list { padding: 10px; overflow-y: auto; }
.discord-category { margin-top: 15px; }
.cat-title { font-size: 11px; font-weight: bold; color: #949ba4; text-transform: uppercase; padding-left: 5px; }
.channel-link { padding: 6px 8px; margin: 2px 0; color: #949ba4; cursor: pointer; border-radius: 4px; font-size: 15px; }
.channel-link:hover { background: #35373c; color: #dbdee1; }
.channel-link .hash { color: #80848e; margin-right: 5px; }

/* ==========================================================================
   MENU INICIAR - DESIGN PROFISSIONAL CORRIGIDO
   ========================================================================== */

#startMenu {
    position: absolute;
    bottom: 60px;
    left: 50%;
    /* Estado Inicial: Deslocado para baixo e invisível */
    transform: translateX(-50%) translateY(30px); 
    opacity: 0;
    pointer-events: none; 

    display: flex;
    flex-direction: column;
    background: rgba(30, 31, 34, 0.9);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 450px;
    height: 550px;
    overflow: hidden;
    z-index: 10000;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    
    /* Transição suave de subida */
    transition: transform 0.4s cubic-bezier(0.1, 0.9, 0.2, 1), opacity 0.2s ease;
}

/* Estado Ativo: Sobe para a posição final */
#startMenu:not(.hidden) {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* A classe .hidden aqui NÃO deve ter display:none para o StartMenu 
   para não "matar" a animação */
#startMenu.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(30px);
    pointer-events: none;
    display: flex !important; 
}

/* --- TÍTULO DO TOPO (CORRIGIDO) --- */
.start-header-info {
    padding: 20px 24px 10px; /* Margem interna para não colar no topo */
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 13px;
    font-weight: 500;
}

/* --- ÁREA DAS CONFIGURAÇÕES --- */
.system-details {
    flex: 1;
    padding: 10px 24px 24px 24px;
    overflow-y: auto;
    color: white;
}

.system-details h2 {
    font-size: 20px;
    margin: 15px 0 5px 0;
}

.system-details p {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 25px;
}

/* Cada linha de spec */
.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.spec-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.spec-value {
    color: #40a9ff;
    font-size: 13px;
    font-weight: 500;
    text-align: right;
    max-width: 60%;
}

/* --- RODAPÉ CENTRALIZADO (RESOLVIDO) --- */
.start-actions {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px 0; /* Espaço para o botão */
    display: flex;
    flex-direction: column;
    align-items: center;    /* Centraliza na horizontal */
    justify-content: center;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

#btnLogout {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 0;
    width: 240px; /* Largura definida para centralização perfeita */
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto; /* Força o alinhamento no meio */
}

#btnLogout:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

/* CORREÇÃO DO ÍCONE: Remove o ícone extra que aparece na imagem */
#btnLogout::before, 
#btnLogout i:nth-child(2) { 
    display: none !important; 
}

/* STATUS DA LICENÇA */
.user-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4cd964;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(76, 217, 100, 0.4);
}

.hidden { display: none !important; }

.welcome-msg {
    display: flex; align-items: center; justify-content: center;
    height: 100%; color: #949ba4; font-size: 14px;
}
/* ==========================================================================
   YOUTUBE
   ========================================================================== */
   /* Estilo específico para a janela do YouTube se precisar */
.window[data-type="youtube"] {
    background: #0f0f0f; /* Cor dark oficial do YouTube */
}

/* Garante que o conteúdo ocupe tudo sem bordas brancas */
.window[data-type="youtube"] .window-content {
    padding: 0;
    background: #000;
}

/* ==========================================================================
   Calculadora
   ========================================================================== */

/* Tamanho fixo para a Calculadora */
.window[id="calculatorWindow"] {
    width: 320px !important;
    height: 450px !important;
}

/* Deixa os botões com efeito de clique */
.calc-btn:active {
    background: #666 !important;
    transform: scale(0.95);
}

.calc-btn:hover {
    filter: brightness(1.2);
}
/* AJUSTE PARA CALCUALDORA NÃO FICAR TORTA */
#calc-container {
    padding: 20px !important; /* Margem interna igual em todos os lados */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 15px; /* Espaço entre display e botões */
    height: 100%;
}

#calc-display {
    width: 100% !important;
    height: 65px !important;
    padding: 15px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 8px !important;
    margin-bottom: 5px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* GRID PERFEITO 4x4 */
.calc-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; /* 4 colunas iguais */
    grid-template-rows: repeat(4, 1fr) !important;    /* 4 linhas iguais */
    gap: 10px !important;
    flex: 1; /* Faz o grid ocupar o resto da janela */
}

.calc-btn {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 6px !important;
    font-weight: 600 !important;
}

/* AJUSTE PARA CONFIGURAÇÕES DO SISTEMA (image_980c60.png) */
.start-header-info {
    padding: 25px 30px 10px !important; /* Respiro no topo */
}

#btnLogout {
    margin: 15px auto 25px !important; /* Centraliza e desgruda do rodapé */
    width: 240px !important;
}

/* ==========================================================================
   Menu Mouse (Context Menu) com Submenu Lateral Estilo Windows
   ========================================================================== */

#context-menu {
    position: fixed;
    background: rgba(25, 25, 25, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white !important;
    padding: 5px;
    border-radius: 8px;
    z-index: 10000;
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Itens principais do menu */
.context-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 4px;
    position: relative; /* FUNDAMENTAL para prender o submenu aqui */
    color: white;
}

.context-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* --- Estilo do Submenu (Abre para o lado) --- */
.submenu {
    display: none; /* Escondido por padrão */
    position: absolute;
    left: 100%;    /* Cola exatamente na borda direita do menu pai */
    top: -5px;     /* Alinha com o topo do menu principal */
    background: rgba(25, 25, 25, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 5px;
    min-width: 160px;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.5);
    margin-left: 2px; /* Espaço pequeno para não colar 100% */
}

/* Mostra o submenu quando passa o mouse no item pai (has-submenu) */
.has-submenu:hover > .submenu {
    display: block;
}

.arrow {
    font-size: 10px;
    opacity: 0.5;
    margin-left: 10px;
}

/* ==========================================================================
   Janela Modal de URL (Centralizada com Blur Total no Fundo)
   ========================================================================== */

#wallpaperURLModal {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.6); 
    backdrop-filter: blur(20px); /* O BLUR que você pediu no fundo */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
}

/* Classe para esconder as modais via JS */
.hidden {
    display: none !important;
}

.modal-mini {
    background: #1e1e1e;
    border: 1px solid #333;
    width: 350px;
    border-radius: 12px;
    color: white;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
    animation: scaleUp 0.2s ease-out;
}

@keyframes scaleUp {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-mini-header {
    background: rgba(255,255,255,0.05);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

#closeMiniModal {
    background: #ff5f56;
    border: none;
    color: white;
    border-radius: 50%;
    width: 22px; height: 22px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-mini-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-mini-body input {
    background: #121212;
    border: 1px solid #444;
    padding: 10px;
    color: white;
    border-radius: 6px;
    outline: none;
}

.modal-mini-body input:focus {
    border-color: #0078d4;
}

#btnApplyURL {
    background: #0078d4;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

#btnApplyURL:hover {
    background: #0086f0;
}

/* Ajuste para o botão do PC dentro do submenu */
#btnUploadPC {
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
}

/* ==========================================================================
   widgetPanel - DESIGN PROFISSIONAL CORRIGIDO
   ========================================================================== */
/* ===== WIDGET HUBOS NEWS – ESTILO WINDOWS 11 ===== */

#widgetButton {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

#widgetButton:hover {
    background: rgba(255,255,255,0.15);
}

#widgetButton img {
    width: 18px;
    height: 18px;
}

#widgetTemp {
    font-size: 13px;
    color: white;
}

/* PAINEL PRINCIPAL DO WIDGET */
#widgetPanel {
    position: absolute;
    bottom: 55px;
    left: 10px;

    width: 460px;
    height: 640px;

    background: rgba(18, 18, 20, 0.85);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.1);

    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);

    display: flex;
    flex-direction: column;

    animation: widgetOpen 0.25s ease;
    overflow: hidden;
    z-index: 9999;
}

@keyframes widgetOpen {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#widgetPanel.hidden {
    display: none;
}

/* CABEÇALHO */
.widget-header {
    padding: 14px 16px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.widget-header h3 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.4px;
}

/* CATEGORIAS */
.widget-categories {
    padding: 12px 10px;

    display: flex;
    flex-wrap: wrap;      /* permite quebrar linha */
    gap: 8px;             /* espaçamento entre botões */

    overflow: hidden;     /* remove scroll horizontal */
    justify-content: flex-start;
}

.cat-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #ddd;

    padding: 8px 10px;
    border-radius: 10px;

    font-size: 12px;
    cursor: pointer;

    transition: all 0.2s ease;

    flex: 1 1 auto;       /* faz dividir o espaço */
    min-width: 120px;     /* largura mínima */
    text-align: center;
}


.cat-btn:hover {
    background: rgba(255,255,255,0.12);
}

.cat-btn.active {
    background: #0078d7;
    color: white;
    border-color: rgba(255,255,255,0.2);
}

/* ÁREA DE CONTEÚDO */
#widgetContent {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
}

/* BARRA DE ROLAGEM BONITA */
#widgetContent::-webkit-scrollbar {
    width: 6px;
}

#widgetContent::-webkit-scrollbar-track {
    background: transparent;
}

#widgetContent::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
}

/* BOLHA DE MENSAGEM */
.msg-bubble {
    animation: fadeIn 0.2s ease;
    transition: all 0.2s ease;

    max-width: 100%;
    word-wrap: break-word;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CABEÇALHO DA MENSAGEM */
.msg-bubble img {
    border: 1px solid rgba(255,255,255,0.1);
}

.msg-bubble strong {
    letter-spacing: 0.3px;
}

/* TEXTO DA MENSAGEM */
.msg-bubble div[style*="font-size: 13px"] {
    line-height: 1.5;
    opacity: 0.95;
}

/* PLAYER DE VÍDEO */
.msg-bubble video {
    border-radius: 10px;
    background: black;
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
    #widgetPanel {
        width: 92%;
        left: 4%;
        height: 70vh;
    }
}

/* INDICADOR DE CARREGAMENTO */
#widgetContent p {
    font-size: 12px;
    opacity: 0.8;
}

/* Cache */

#cacheCountdownText {
    margin-top: 10px;
    padding: 6px 10px;

    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);

    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);

    color: #e0e0e0;
    font-size: 12px;
    text-align: center;

    transition: all 0.3s ease;
    animation: fadeInCache 0.4s ease;

    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Quando estiver perto de expirar */
#cacheCountdownText.warning {
    background: rgba(255, 165, 0, 0.2);
    border-color: rgba(255, 165, 0, 0.4);
    color: #ffd27f;
}

/* Quando faltar MUITO pouco */
#cacheCountdownText.danger {
    background: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.4);
    color: #ff7f7f;
}

@keyframes fadeInCache {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* =====================================================
   WINDOWS 11 UPDATE TOAST (REALISTA)
   ===================================================== */

#win11UpdateToast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 340px;
    padding: 18px;
    border-radius: 14px;

    background: rgba(32,32,32,0.78);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);

    color: white;
    font-family: "Segoe UI", system-ui, sans-serif;

    box-shadow: 0 20px 50px rgba(0,0,0,0.55);

    transform: translateY(120%);
    opacity: 0;
    transition: all .45s cubic-bezier(.2,.8,.2,1);

    z-index: 999999;
}

#win11UpdateToast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.toast-icon {
    width: 10px;
    height: 10px;
    background: #00ff9d;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff9d;
}

.toast-body {
    font-size: 13px;
    color: #d6d6d6;
    margin-bottom: 14px;
    line-height: 1.4;
}

.toast-progress {
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 14px;
}

.toast-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg,#0a84ff,#00a2ff);
    animation: winToastTimer 10s linear forwards;
}

@keyframes winToastTimer {
    from { width: 100%; }
    to { width: 0%; }
}

.toast-btn {
    width: 100%;
    padding: 9px;
    border: none;
    border-radius: 8px;

    background: linear-gradient(180deg,#0a84ff,#006fe0);
    color: white;
    font-weight: 600;
    cursor: pointer;

    transition: all .2s;
}

.toast-btn:hover {
    filter: brightness(1.15);
}