/* ===========================
   ArktixAI App CSS (app.css)
   =========================== */

/* --- Theme tokens --- */
:root{
  --bg: #0b1020;
  --bg-2: #0f1630;
  --fg: #e7ecf7;
  --muted: #a9b3c7;
  --primary: #6aa9ff;
  --primary-600: #4a90ff;
  --accent: #7dd3fc;

  --glass-bg: rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.14);
  --card-bg: rgba(17,25,40,0.55);
  --border: rgba(255,255,255,0.12);

  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

/* --- Reset / Base --- */
*{ box-sizing:border-box; }
html, body{
  height:100%;
  scroll-behavior: smooth;
}
body{
  margin:0;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji','Segoe UI Emoji', 'Segoe UI Symbol';
  color:var(--fg);
  background:
    radial-gradient(1200px 800px at 85% -10%, #14325f44 0%, transparent 60%),
    radial-gradient(1000px 600px at -10% 10%, #0b4a7744 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

/* -------------------
   Layout primitives
   ------------------- */
.container{
  width:100%;
  max-width: 1100px;
  margin:0 auto;
  padding: 0 16px;
}
.grid-2{
  display:grid;
  grid-template-columns: 1.4fr 1fr;
  gap:24px;
}
@media (max-width: 930px){
  .grid-2{ grid-template-columns: 1fr; }
}

/* Scroll snap (optional nice-to-have) */
.snap-container{
  scroll-snap-type: y proximity;
}
.snap-section{
  scroll-snap-align: start;
  padding: 96px 0 72px;
}
.section.alt{
  background: linear-gradient(180deg, #0b102000 0%, rgba(255,255,255,0.02) 100%);
}

/* -------------
   Top Nav
   ------------- */
.nav{
  position: sticky;
  top:0; left:0; right:0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(9,12,24,0.55);
  border-bottom: 1px solid var(--glass-border);
}
.nav-inner{
  height:64px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap:14px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--fg);
  text-decoration:none;
  font-weight:800;
  letter-spacing: .2px;
}
.logo{
  width:32px; height:32px;
  object-fit:cover;
  border-radius:8px;
  border:1px solid var(--glass-border);
}
.menu{
  display:flex;
  align-items:center;
  gap:14px;
}
.menu a{
  color:var(--fg);
  text-decoration:none;
  padding:8px 10px;
  border-radius:10px;
  opacity:.9;
}
.menu a:hover{ background:rgba(255,255,255,0.06); }
.lang-switch{
  background: transparent;
  color: var(--fg);
  border:1px solid var(--glass-border);
  border-radius: 10px;
  padding:6px 10px;
}

/* -------------
   Cards / Glass
   ------------- */
.card{
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.glass{ backdrop-filter: blur(10px); }

/* -------------
   Typography
   ------------- */
h1{ font-size: clamp(28px, 4vw, 36px); margin:0 0 8px; }
h2{ font-size: clamp(22px, 3vw, 28px); margin:0 0 10px; }
h3{ font-size: clamp(18px, 2.4vw, 20px); margin:0 0 10px; }

.muted{ color: var(--muted); }
.max-600{ max-width: 600px; }

/* -------------
   Buttons
   ------------- */
.btn{
  appearance:none; border:none;
  padding:10px 14px;
  border-radius:12px;
  cursor:pointer;
  color:#0b1020;
  background:#e8eefb;
  font-weight:600;
  transition: transform .05s ease, background .2s ease, opacity .2s ease;
}
.btn:hover{ transform: translateY(-1px); }
.btn:disabled{ opacity:.6; cursor:not-allowed; }

.btn-primary{
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-600) 100%);
  color:#05122e;
  box-shadow: 0 6px 20px rgba(74,144,255,.35);
}
.btn-outline{
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--glass-border);
}
.btn-ghost{
  background: transparent;
  color: var(--fg);
  opacity:.85;
}
.actions{ display:flex; gap:10px; flex-wrap: wrap; }

/* -------------
   Forms
   ------------- */
.form label{
  display:block;
  font-weight:600;
  margin:10px 0 6px;
}
.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form textarea,
.form select{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid var(--glass-border);
  background: rgba(255,255,255,0.05);
  color: var(--fg);
  outline:none;
}
.form textarea{ resize: vertical; }
.form .tiny{ font-size: 12px; }

/* -------------
   Lists / Pills
   ------------- */
.list{ padding-left:18px; }
.list li{ margin:6px 0; }

.pill-row{
  display:flex; gap:8px; flex-wrap:wrap;
}
.pill-row > span, .as-chip{
  display:inline-flex; align-items:center; gap:6px;
  border:1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
  padding:6px 10px; border-radius:999px;
  color: var(--fg); text-decoration:none;
  font-size: 14px;
}
.as-chip{ cursor:pointer; }
.as-chip:hover{ background: rgba(255,255,255,0.08); }

/* -------------
   Chat
   ------------- */
.chat-card{
  display:flex; flex-direction:column; gap:12px;
  min-height: 420px;
}

.chat-stream{
  display:flex; flex-direction:column; gap:10px;
  height: 340px;
  overflow:auto;
  padding-right:6px;
}

/* message bubbles */
.msg{
  display:flex; gap:10px; width:100%;
}
.msg .bubble{
  max-width: 76%;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid var(--glass-border);
  line-height: 1.45;
  white-space: pre-wrap;
}
.msg.user{ justify-content: flex-end; }
.msg.user .bubble{
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-600) 100%);
  color:#07142f;
}
.msg.bot .bubble{
  background: rgba(255,255,255,0.05);
  color:var(--fg);
}

.chat-form{
  display:flex; gap:10px; align-items:flex-end;
}
.chat-form textarea{
  flex:1; min-height:42px;
}

/* typing indicator */
.typing{
  width: 40px; height: 18px;
  display:inline-flex; align-items:center; justify-content: space-between;
}
.typing span{
  width:6px; height:6px; border-radius:999px;
  background: #cfe0ff;
  animation: blink 1s infinite ease-in-out;
}
.typing span:nth-child(2){ animation-delay: .15s; }
.typing span:nth-child(3){ animation-delay: .3s; }
@keyframes blink{
  0%, 80%, 100% { opacity:.2; transform: translateY(0); }
  40% { opacity:1; transform: translateY(-2px); }
}

/* -------------
   Meter (progress/score)
   ------------- */
.meter{
  width:100%;
  height:12px;
  background: rgba(255,255,255,0.05);
  border:1px solid var(--glass-border);
  border-radius:999px;
  overflow:hidden;
  margin: 6px 0 10px;
}
.meter-bar{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, #72d6ff, #4a90ff);
  transition: width .35s ease;
}

/* -------------
   Reports list
   ------------- */
.table.like-list{
  display:grid;
  gap:8px;
  margin-top:10px;
}
.row{
  display:grid;
  grid-template-columns: 1fr auto auto;
  gap:10px;
  align-items:center;
  padding:10px;
  border:1px solid var(--glass-border);
  border-radius:12px;
  background: rgba(255,255,255,0.03);
}
.row .meta{ color: var(--muted); font-size: 14px; }

/* -------------
   Footer
   ------------- */
.footer{
  border-top:1px solid var(--glass-border);
  background: rgba(9,12,24,0.55);
  backdrop-filter: blur(10px);
}
.foot{
  height:64px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap:12px;
  color: var(--muted);
}
.foot a{ color: var(--fg); opacity:.85; text-decoration:none; }
.foot a:hover{ opacity:1; }

/* -------------
   Utilities
   ------------- */
.link{
  color: var(--accent);
  background:none; border:none; padding:0;
  text-decoration: underline; cursor:pointer;
}
.tiny{ font-size: 12px; }
.max-400{ max-width: 400px; }
/* Modal base (hidden) */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

/* When opened */
.modal.open {
    display: flex !important;
}

/* Backdrop */
.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
}

/* Dialog box */
.modal__dialog {
    position: relative;
    z-index: 2;
    padding: 24px;
    border-radius: 16px;
    background: var(--glass-bg, rgba(255,255,255,0.1));
}

/* Close button */
.modal__close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;
}

/* -------------
   Responsive tweaks
   ------------- */
@media (max-width: 640px){
  .nav-inner{ height:58px; }
  .menu{ gap:10px; }
  .btn{ padding:9px 12px; }
  .chat-stream{ height: 300px; }
  .msg .bubble{ max-width: 86%; }
}

/* End */
