/* Reset */
* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family:'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  /* Background statis ringan */
  background: radial-gradient(1200px 800px at 20% 20%, #0b1220 0%, #060a12 40%, #03060d 100%);
  color:#fff; line-height:1.6; overflow-x:hidden; position:relative;
}

/* HAPUS: .space-canvas, .space-background, .stars-layer, .nebula-layer, .floating-orbs, .grid-overlay, aurora, parallax, dan keyframes terkait */

/* News Portal */
.news-portal { min-height:100vh; display:flex; flex-direction:column; position:relative; }

/* Header: kurangi blur/shadow berat */
.portal-header {
  background: linear-gradient(135deg, rgba(15,20,25,0.96), rgba(30,64,175,0.86));
  border-bottom: 1px solid rgba(0, 255, 255, 0.18);
  color:#fff; padding:1rem 0; position:sticky; top:0; z-index:100;
}
.header-container { max-width:1200px; margin:0 auto; display:flex; justify-content:space-between; align-items:center; padding:0 2rem; }
.logo { display:flex; align-items:center; gap:.75rem; font-size:1.5rem; font-weight:700; }
.logo i { font-size:2rem; }
.main-nav { display:flex; gap:2rem; }
.nav-link { color:rgba(255,255,255,0.9); text-decoration:none; font-weight:600; padding:.5rem 1rem; border-radius:.5rem; transition:background .2s ease; }
.nav-link:hover, .nav-link.active { background:rgba(255,255,255,0.16); color:#fff; }

/* Breaking News (lebih ringan) */
.breaking-news {
  background: linear-gradient(90deg, rgba(220,38,38,0.9), rgba(239,68,68,0.9));
  border-top:1px solid rgba(255,0,0,0.3); border-bottom:1px solid rgba(255,0,0,0.3);
  color:#fff; display:flex; align-items:center; overflow:hidden; height:48px;
}
.breaking-label { background:#991b1b; padding:0 1.2rem; height:100%; display:flex; align-items:center; gap:.5rem; font-weight:700; font-size:.85rem; white-space:nowrap; }
.breaking-ticker { flex:1; overflow:hidden; }
.breaking-item { padding:0 2rem; white-space:nowrap; font-weight:600; animation: scroll-breaking 22s linear infinite; }
@keyframes scroll-breaking { 0%{transform:translateX(100%);} 100%{transform:translateX(-100%);} }

/* Layout */
.main-content { max-width:1200px; margin:0 auto; padding:2rem; flex:1; }
.section-title { display:flex; align-items:center; gap:1rem; margin-bottom:2rem; }
.section-title h2 { font-size:2rem; font-weight:800; color:#fff; text-shadow:0 0 8px rgba(0,255,255,0.35); }
.section-line { flex:1; height:3px; background:linear-gradient(90deg, rgba(0,255,255,0.7), rgba(59,130,246,0.5), rgba(147,197,253,0.35)); border-radius:2px; }

/* Featured */
.featured-grid { display:grid; grid-template-columns:2fr 1fr; gap:2rem; margin-bottom:3rem; }
.featured-main {
  position:relative; border-radius:1rem; overflow:hidden;
  background: rgba(255,255,255,0.04); border:1px solid rgba(0,255,255,0.16);
  box-shadow: 0 6px 24px rgba(0,0,0,0.35); cursor:pointer; transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.featured-main:hover { transform:translateY(-4px); box-shadow:0 10px 32px rgba(0,0,0,0.4); border-color:rgba(0,255,255,0.28); }
.featured-image { width:100%; height:300px; object-fit:cover; transition:transform .25s ease; }
.featured-main:hover .featured-image { transform:scale(1.03); }
.featured-overlay { position:absolute; inset:auto 0 0 0; background:linear-gradient(transparent, rgba(0,0,0,0.78)); color:#fff; padding:1.5rem; }
.featured-category { background:#3b82f6; color:#fff; padding:.25rem .75rem; border-radius:1rem; font-size:.75rem; font-weight:700; text-transform:uppercase; margin-bottom:.75rem; display:inline-block; }
.featured-title { font-size:1.5rem; font-weight:800; margin-bottom:.5rem; line-height:1.3; }
.featured-excerpt { font-size:.9rem; opacity:.92; line-height:1.5; }
.featured-sidebar { display:flex; flex-direction:column; gap:1.2rem; }
.featured-item {
  background: rgba(255,255,255,0.04); border:1px solid rgba(0,255,255,0.14);
  border-radius:.9rem; overflow:hidden; box-shadow:0 4px 14px rgba(0,0,0,0.28);
  cursor:pointer; transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.featured-item:hover { transform:translateY(-2px); box-shadow:0 8px 22px rgba(0,0,0,0.32); border-color:rgba(0,255,255,0.26); }
.featured-item-image { width:100%; height:120px; object-fit:cover; }
.featured-item-content { padding:1rem; }
.featured-item-title { font-size:.95rem; font-weight:700; color:#fff; margin-bottom:.5rem; line-height:1.4; }
.featured-item-meta { font-size:.78rem; color:rgba(255,255,255,0.72); display:flex; align-items:center; gap:.5rem; }

/* Latest */
.latest-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(300px,1fr)); gap:2rem; }
.news-card {
  background: rgba(255,255,255,0.04); border:1px solid rgba(0,255,255,0.14);
  border-radius:1rem; overflow:hidden; box-shadow:0 4px 15px rgba(0,0,0,0.28);
  cursor:pointer; transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.news-card:hover { transform:translateY(-4px); box-shadow:0 10px 26px rgba(0,0,0,0.36); border-color:rgba(0,255,255,0.26); }
.news-image { width:100%; height:200px; object-fit:cover; transition:transform .25s ease; }
.news-card:hover .news-image { transform:scale(1.03); }
.news-content { padding:1.25rem; }
.news-category { color:#3b82f6; font-size:.75rem; font-weight:800; text-transform:uppercase; margin-bottom:.5rem; }
.news-title { font-size:1.1rem; font-weight:800; color:#fff; margin-bottom:.7rem; line-height:1.4; }
.news-excerpt { color:rgba(255,255,255,0.78); font-size:.9rem; margin-bottom:1rem; line-height:1.55; }
.news-meta { display:flex; align-items:center; justify-content:space-between; font-size:.8rem; color:rgba(255,255,255,0.65); }
.news-author { display:flex; align-items:center; gap:.5rem; }

/* AI Chat Section (tanpa blur berat) */
.ai-chat-section { margin:3rem 0 4rem; }
.ai-chat-container {
  max-width:800px; margin:0 auto; background:rgba(15,20,25,0.96);
  border:1px solid rgba(0,255,255,0.18); border-radius:1.25rem;
  box-shadow: 0 14px 40px rgba(0,0,0,0.38); overflow:hidden;
}
.chat-header-main {
  background: linear-gradient(135deg, rgba(30,64,175,0.86), rgba(59,130,246,0.86));
  color:#fff; padding:1.25rem 1.6rem; display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid rgba(0,255,255,0.18);
}
.chat-title-main { display:flex; align-items:center; gap:1rem; font-weight:700; font-size:1.05rem; }
.status-dot-main { width:10px; height:10px; background:#22c55e; border-radius:50%; animation:pulse 2s infinite; }
.chat-actions-main { display:flex; gap:.6rem; }
.action-btn-main { width:36px; height:36px; background:rgba(255,255,255,0.18); border:none; border-radius:.5rem; color:#fff; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background .2s ease; }
.action-btn-main:hover { background:rgba(255,255,255,0.26); }

.chat-messages-main { padding:1.5rem; min-height:360px; max-height:480px; overflow-y:auto; display:flex; flex-direction:column; gap:1.2rem; }
.ai-message-main, .user-message-main { display:flex; gap:1rem; animation: messageSlide .25s ease; }
.user-message-main { flex-direction:row-reverse; }
.message-avatar-main { width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0; }
.ai-message-main .message-avatar-main { background:linear-gradient(135deg, #10b981, #059669); color:#fff; }
.user-message-main .message-avatar-main { background:linear-gradient(135deg, #3b82f6, #1e40af); color:#fff; }
.message-content-main { max-width:75%; font-size:.95rem; line-height:1.55; color:rgba(255,255,255,0.92); word-wrap:break-word; }
.user-message-main .message-content-main { text-align:right; }
.typing-indicator-main { padding:0 1.5rem 1rem; display:flex; align-items:center; gap:1rem; }
.typing-dots-main { display:flex; gap:.25rem; }
.typing-dots-main span { width:8px; height:8px; background:rgba(0,255,255,0.7); border-radius:50%; animation:typing 1.4s infinite ease-in-out; }
.typing-dots-main span:nth-child(2){ animation-delay:.2s; } .typing-dots-main span:nth-child(3){ animation-delay:.4s; }
.typing-text-main { color:rgba(255,255,255,0.6); font-size:.88rem; font-style:italic; }

.chat-input-main { padding:1.5rem; border-top:1px solid rgba(0,255,255,0.18); }
.input-wrapper-main {
  display:flex; align-items:flex-end; gap:1rem; background:rgba(0,0,0,0.25);
  border:1px solid rgba(0,255,255,0.26); border-radius:1rem; padding:1rem 1.1rem;
}
#messageInputMain {
  flex:1; border:none; background:none; outline:none; resize:none; font-family:inherit; font-size:.95rem; line-height:1.5; color:#fff; max-height:120px; min-height:24px;
}
#messageInputMain::placeholder { color:rgba(255,255,255,0.55); }
.input-actions-main { display:flex; align-items:center; gap:.6rem; }
.attachment-btn-main, .send-btn-main { width:40px; height:40px; border:none; border-radius:.7rem; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:16px; }
.attachment-btn-main { background:transparent; color:rgba(255,255,255,0.7); }
.attachment-btn-main:hover { background:rgba(255,255,255,0.1); color:rgba(0,255,255,0.85); }
.send-btn-main { background:linear-gradient(135deg, #3b82f6, #1e40af); color:#fff; }
.send-btn-main:disabled { background:rgba(100,100,100,0.35); color:rgba(255,255,255,0.5); cursor:not-allowed; }
.input-footer-main { display:flex; justify-content:space-between; margin-top:1rem; font-size:.82rem; color:rgba(255,255,255,0.6); }
.char-counter-main { font-variant-numeric: tabular-nums; }
.model-info-main { display:flex; align-items:center; gap:.5rem; }

/* Scrollbar halus */
.chat-messages-main::-webkit-scrollbar { width:6px; }
.chat-messages-main::-webkit-scrollbar-track { background:rgba(0,0,0,0.2); }
.chat-messages-main::-webkit-scrollbar-thumb { background:rgba(0,255,255,0.3); border-radius:3px; }
.chat-messages-main::-webkit-scrollbar-thumb:hover { background:rgba(0,255,255,0.46); }

@keyframes typing { 0%,80%,100%{ transform:translateY(0);} 40%{ transform:translateY(-2px);} }
@keyframes messageSlide { from{ transform:translateY(6px); opacity:0;} to{ transform:translateY(0); opacity:1;} }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.55;} }

/* Chat Widget (tetap) */
.chat-widget { position:fixed; bottom:20px; right:20px; z-index:1000; display:none; }
.chat-toggle {
  width:60px; height:60px; background:linear-gradient(135deg, #3b82f6, #1e40af);
  border-radius:50%; display:flex; align-items:center; justify-content:center; cursor:pointer;
  box-shadow:0 8px 22px rgba(59,130,246,0.4); transition:transform .2s ease;
  position:relative;
}
.chat-toggle:hover { transform:translateY(-2px) scale(1.05); }
.chat-toggle i { color:#fff; font-size:24px; }
.chat-badge { position:absolute; top:-5px; right:-5px; background:#dc2626; color:#fff; border-radius:50%; width:20px; height:20px; font-size:11px; font-weight:700; display:flex; align-items:center; justify-content:center; border:2px solid white; }
.chat-window {
  position:absolute; bottom:80px; right:0; width:350px; max-height:500px;
  background:rgba(15,20,25,0.96); border:1px solid rgba(0,255,255,0.18); border-radius:1rem;
  box-shadow:0 16px 48px rgba(0,0,0,0.42); display:none; flex-direction:column; overflow:hidden;
  transform:translateY(10px) scale(0.95); opacity:0; transition:all .25s ease;
}
.chat-window.active { display:flex; transform:translateY(0) scale(1); opacity:1; }
.chat-header-mini { background:linear-gradient(135deg, #3b82f6, #1e40af); color:#fff; padding:1rem; display:flex; justify-content:space-between; align-items:center; }
.chat-title { display:flex; align-items:center; gap:.5rem; font-weight:700; font-size:.9rem; }
.status-dot { width:8px; height:8px; background:#22c55e; border-radius:50%; animation:pulse 2s infinite; }
.chat-controls { display:flex; gap:.5rem; }
.control-btn { width:28px; height:28px; background:rgba(255,255,255,0.18); border:none; border-radius:.375rem; color:#fff; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:12px; transition:background .2s ease; }
.control-btn:hover { background:rgba(255,255,255,0.28); }
.chat-messages-mini { flex:1; padding:1rem; overflow-y:auto; max-height:300px; display:flex; flex-direction:column; gap:1rem; }
.ai-message, .user-message { display:flex; gap:.75rem; animation: messageSlide .25s ease; }
.message-avatar { width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg, #10b981, #059669); color:#fff; font-size:14px; }
.message-content { font-size:.92rem; line-height:1.5; color:rgba(255,255,255,0.92); }
.typing-indicator-mini { padding:.5rem 1rem; display:flex; align-items:center; gap:.5rem; }

/* Responsif */
@media (max-width: 900px){
  .featured-grid { grid-template-columns:1fr; }
}
