:root {
    --pink: #ff0055;
    --blue: #00f2ff;
    --orange: #ff8800;
    
    /* Cores do Tema Claro (Portal) */
    --light-bg: #f4f6f8;
    --white: #ffffff;
    --text-dark: #1a1c23;
    --text-gray: #666;
    
    /* Cores do Tema Escuro (Terminal) */
    --dark: #0a0b10;
    --dark-l: #16181d;
    
    --grad: linear-gradient(135deg, #ff0055, #ff8800);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; line-height: 1.6; }

.scanlines {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.01) 2px, rgba(0,0,0,0.01) 4px);
    z-index: 9999; pointer-events: none;
}
.grad { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.txt-pink { color: var(--pink); font-weight: bold; }


/* ====================================================
   ESTILOS DA HOME (PORTAL CLARO E MODERNO)
==================================================== */
.portal-home { background: var(--light-bg); color: var(--text-dark); }

.navbar {
    background: var(--white);
    border-bottom: 2px solid var(--pink);
    position: fixed; top: 0; width: 100%; z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.nav-container {
    max-width: 1200px; margin: 0 auto; display: flex; 
    justify-content: space-between; align-items: center; padding: 15px 20px;
}
.logo { font-family: 'Righteous'; font-size: 24px; color: var(--pink); }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text-dark); font-family: 'Oswald'; font-size: 14px; font-weight: 600; }
.nav-terminal-btn { background: var(--pink); padding: 8px 15px; border-radius: 4px; color: var(--white) !important; font-weight: bold; }
.nav-auth a { margin-left: 10px; font-size: 12px; color: var(--text-gray); }

.portal-hero { margin-top: 60px; padding: 80px 20px; background: var(--white); border-bottom: 1px solid #eaeaea; }
.hero-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 40px; }
.hero-visual video { width: 160px; height: 160px; border-radius: 50%; border: 3px solid var(--pink); object-fit: cover; box-shadow: 0 10px 30px rgba(255,0,85,0.15); }
.hero-text h1 { font-family: 'Righteous'; font-size: 48px; margin-bottom: 15px; color: var(--text-dark); line-height: 1.1; }
.hero-text p { color: var(--text-gray); margin-bottom: 25px; font-size: 18px; max-width: 600px; }
.btn-hero { display: inline-block; padding: 15px 35px; background: var(--grad); color: white; text-decoration: none; border-radius: 8px; font-family: 'Oswald'; font-weight: bold; font-size: 18px; box-shadow: 0 5px 20px rgba(255,0,85,0.3); transition: 0.3s; }
.btn-hero:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(255,0,85,0.4); }

.portal-container { max-width: 1200px; margin: 50px auto; display: flex; gap: 40px; padding: 0 20px; }

.main-feed { flex: 2; }
.section-title { font-family: 'Righteous'; margin-bottom: 30px; border-left: 4px solid var(--pink); padding-left: 15px; color: var(--text-dark); }

/* CARDS DE NOTÍCIA CLAROS */
.main-news-card { 
    background: var(--white); border-radius: 12px; overflow: hidden; 
    margin-bottom: 30px; border: 1px solid #eaeaea; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); transition: 0.3s; 
}
.main-news-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); border-color: rgba(255,0,85,0.2); }
.news-img { height: 280px; background-size: cover; background-position: center; }
.news-body { padding: 25px; }
.tag { font-size: 10px; font-weight: bold; padding: 5px 12px; border-radius: 4px; margin-bottom: 15px; display: inline-block; color: white; }
.leak { background: var(--pink); } .gold { background: var(--orange); } .lore { background: #0088cc; }
.news-body h3 { font-family: 'Oswald'; font-size: 26px; margin-bottom: 10px; color: var(--text-dark); }
.news-body p { color: var(--text-gray); }
.card-meta { font-size: 11px; color: #888; margin-top: 20px; text-transform: uppercase; font-weight: bold; }

/* SIDEBAR DO PORTAL CLARA */
.sidebar { flex: 1; }
.sidebar-widget { background: var(--white); padding: 25px; border-radius: 12px; margin-bottom: 30px; border: 1px solid #eaeaea; box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.widget-title { font-family: 'Oswald'; font-size: 18px; margin-bottom: 20px; color: var(--text-dark); border-bottom: 2px solid #f0f0f0; padding-bottom: 10px; }

.top-list { list-style: none; }
.top-list li { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.rank { font-family: 'Righteous'; font-size: 24px; color: var(--pink); opacity: 0.8; }
.top-list a { color: var(--text-dark); text-decoration: none; font-size: 14px; font-weight: bold; transition: 0.2s; }
.top-list a:hover { color: var(--pink); }

.mini-item { margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0; }
.mini-item p { font-size: 14px; color: var(--text-dark); font-weight: 500; }
.mini-item span { font-size: 10px; color: #888; }

.ad-space { background: #f8f9fa; border: 2px dashed #ccc; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #888; font-family: 'Oswald'; text-transform: uppercase; }
.main-ad { height: 150px; margin-bottom: 30px; }
.side-ad { height: 400px; margin-bottom: 30px; }

.portal-footer { background: var(--white); padding: 60px 20px 30px; border-top: 1px solid #eaeaea; margin-top: 60px; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; gap: 40px; }
.footer-about { max-width: 400px; }
.footer-about p { color: var(--text-gray); margin-top: 15px; font-size: 14px; }
.footer-links h4 { font-family: 'Oswald'; margin-bottom: 20px; color: var(--pink); }
.footer-links a { display: block; color: var(--text-gray); text-decoration: none; margin-bottom: 10px; font-size: 14px; }
.footer-bottom { max-width: 1200px; margin: 40px auto 0; padding-top: 20px; border-top: 1px solid #eaeaea; text-align: center; font-size: 11px; color: #888; }

@media (max-width: 900px) {
    .portal-container { flex-direction: column; }
    .hero-inner { flex-direction: column; text-align: center; }
}


/* ====================================================
   ESTILOS DO TERMINAL (CHAT IA) - CORRIGIDO
==================================================== */
.terminal-page { background: white; height: 100vh; overflow: hidden; }
.app-container { display: flex; height: 100vh; width: 100vw; overflow: hidden; }

/* MENU LATERAL DO TERMINAL - BLINDADO CONTRA ESTICAMENTO */
.terminal-page .sidebar,
.sidebar-terminal { 
    width: 400px !important;       /* Largura exata fixada */
    min-width: 400px !important; 
    max-width: 400px !important; 
    flex: none !important;         /* IMPEDE de esticar e ocupar metade da tela */
    background: white; 
    border-right: 1px solid #ddd; 
    display: flex; 
    flex-direction: column; 
    padding: 25px 20px; 
    z-index: 100; 
    color: #111; 
    height: 100vh;
}

.logo-area a { text-decoration: none; }
.logo-area h1 { font-family: 'Righteous'; color: var(--pink); font-size: 24px; margin-bottom: 2px;}
.version { font-size: 9px; color: #999; letter-spacing: 2px; }

.broker-identity { margin: 30px 0; display: flex; align-items: center; gap: 12px; background: #f8f9fa; padding: 15px; border-radius: 12px; }
.glitch-avatar { width: 50px; height: 50px; border-radius: 50%; overflow: hidden; border: 2px solid var(--pink); flex-shrink: 0; }
.glitch-avatar video { width: 100%; height: 100%; object-fit: cover; }
.id-name { font-weight: 900; font-family: 'Oswald'; font-size: 15px; color: #111; }
.id-status { font-size: 9px; color: #28a745; font-weight: bold; display: flex; align-items: center; gap: 5px; }
.pulse-dot { width: 6px; height: 6px; background: #28a745; border-radius: 50%; animation: p 1.5s infinite; }

.sidebar-nav a { display: block; padding: 12px 15px; text-decoration: none; color: #555; font-family: 'Oswald'; font-size: 14px; border-radius: 8px; margin-bottom: 5px; transition: 0.3s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-nav a.active, .sidebar-nav a:hover { background: var(--pink); color: white; }
.locked { opacity: 0.3; cursor: not-allowed; }

/* ÁREA PRINCIPAL DO CHAT - RESPEITANDO A BARRA LATERAL */
.main-terminal {
    flex: 1; 
    width: calc(100vw - 280px) !important; /* Força o chat a respeitar a barra lateral */
    display: flex; flex-direction: column; position: relative;
    background-image: url('bg-gta6.jpg'); background-size: cover; background-position: center;
    overflow: hidden;
}
.main-terminal::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(10,11,16,0.95) 0%, rgba(10,11,16,0.85) 100%);
}

.terminal-bar {
    position: relative; z-index: 10; height: 60px; padding: 0 40px;
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(10,11,16,0.9); border-bottom: 1px solid rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.4); font-family: 'Oswald'; font-size: 11px; letter-spacing: 2px;
}

/* CONTAINER DE CHAT COM SCROLL PERFEITO */
.chat-container { 
    position: relative; z-index: 10; flex: 1; 
    display: flex; flex-direction: column; 
    max-width: 900px; margin: 0 auto; width: 100%; 
    overflow: hidden; 
}

.chat-area { 
    flex: 1; 
    overflow-y: auto; 
    padding: 30px 20px; 
    display: flex;
    flex-direction: column;
}

.message { display: flex; flex-direction: column; margin-bottom: 25px; max-width: 85%; }
.bot { align-items: flex-start; }
.user { align-items: flex-end; align-self: flex-end; }

.msg-tag { font-family: 'Oswald'; font-size: 10px; letter-spacing: 2px; margin-bottom: 6px; color: var(--pink); }
.user .msg-tag { color: var(--blue); }

.msg-content { background: rgba(255,255,255,0.05); padding: 15px 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); color: #ddd; line-height: 1.6; font-size: 15px; }
.bot .msg-content { border-left: 4px solid var(--pink); background: rgba(255,255,255,0.03); }
.user .msg-content { border-right: 4px solid var(--blue); }

.input-wrapper { padding: 20px 20px 30px; background: transparent; }
.input-box {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px; padding: 8px 20px; display: flex; align-items: center;
    backdrop-filter: blur(10px);
}
.input-box input { flex: 1; background: transparent; border: none; color: white; outline: none; font-size: 15px; padding: 10px 0; }
#send-btn { background: var(--pink); border: none; color: white; font-family: 'Oswald'; padding: 10px 20px; border-radius: 6px; cursor: pointer; transition: 0.3s; font-size: 14px; }
#send-btn:hover { background: var(--orange); }

@media (max-width: 1000px) {
    .terminal-page .sidebar, .sidebar-terminal { display: none !important; }
    .main-terminal { width: 100vw !important; }
}

/* Scrollbar Customizada do Chat */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 10px; }

/* ====================================================
OTIMIZAÇÃO EXCLUSIVA PARA CELULARES (TELAS ATÉ 600PX)
==================================================== */
@media (max-width: 600px) {
    /* 1. Ajuste da Navbar para não esmagar os botões */
    .nav-container {
        flex-direction: column;
        gap: 12px;
        padding: 10px;
    }
    .nav-links {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .nav-links a {
        font-size: 12px;
    }
    .nav-terminal-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    .nav-auth {
        margin-top: 2px;
    }

    /* 2. Ajuste do topo (Hero) para compensar a navbar mais alta */
    .portal-hero {
        margin-top: 110px; /* Dá espaço para a navbar que agora tem mais linhas */
        padding: 40px 15px;
    }
    .hero-text h1 {
        font-size: 28px; /* Diminuiu de 48px para 28px */
        text-align: center;
    }
    .hero-text p {
        font-size: 15px;
        text-align: center;
    }
    .hero-visual video {
        width: 120px;
        height: 120px;
    }

    /* 3. Ajuste dos Cards de Notícias */
    .portal-container {
        margin: 20px auto;
        padding: 0 10px;
    }
    .news-img {
        height: 180px; /* Diminui a imagem para focar no texto */
    }
    .news-body {
        padding: 15px; /* Reduz a folga interna para sobrar espaço para o texto */
    }
    .news-body h3 {
        font-size: 20px; /* Diminuiu de 26px para 20px */
        line-height: 1.3;
    }
    .news-body p {
        font-size: 14px;
    }

    /* 4. Ajustes de anúncios no mobile */
    .main-ad {
        height: 100px;
    }
}