:root {
  --bg:      #070c14;
  --surface: #0e1a29;
  --panel:   #142639;
  --border:  rgba(150,214,232,.16);
  --accent:  #22e0c6;
  --accent2: #38bdf8;
  --amber:   #ffcf6b;
  --text:    #e7f2f7;
  --muted:   #6f93a3;
  --font-display: 'Orbitron', sans-serif;
  --font-body:    'Exo 2', sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;
}

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    position: relative;
  }

body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background-image:
    linear-gradient(rgba(150,214,232,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150,214,232,.035) 1px, transparent 1px);
  background-size: 52px 52px;
}
  
  .layout {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
    width: 100%;
  }
  
  
  .left-panel,
  .right-panel {
    flex: 0 0 200px;
    min-width: 150px;
    max-width: 240px;
    padding: 1rem;
    font-size: 0.65rem;
    background: var(--surface);
    border-right: 1px solid var(--border);
    color: var(--text);
    overflow-y: auto;
    box-sizing: border-box;
    /* 🟧 NEW */
    display: flex;
    flex-direction: column;
  }

  .right-panel {
    border-right: none;
    border-left: 1px solid var(--border);
  }
  

  
  
  
  .left-panel img {
    width: 100%;
    border-radius: 8px;
  }
  
  main {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    background-color: var(--bg); /* Slightly lighter than side panels */
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
    min-width: 0;
  }

  .main-navbar {
    background-color: rgba(7,12,20,0.94);
    backdrop-filter: blur(12px);
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    font-family: var(--font-display);
    font-size: 0.8rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    position: sticky;
    top: 0;
  }

  .main-navbar::after {
    content: '';
    position: absolute; bottom: -1px; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg,transparent,var(--accent),var(--accent2),var(--amber),var(--accent),transparent);
    background-size: 300% 100%;
    animation: navscan 7s linear infinite;
    opacity: .8;
    /* Isolate this element's paint so the game's own frequent repaints
       (queries, drag interactions, mousemove) don't interrupt the
       gradient mid-cycle and make it look like it's flashing instead
       of fading smoothly. */
    contain: paint;
    will-change: background-position;
  }
  @keyframes navscan { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }

  .nav-title {
    font-size: 1rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .nav-links {
    display: flex;
    gap: 2rem;
  }

  .nav-links a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
  }

  .nav-links a:hover {
    color: var(--accent);
    text-shadow: 0 0 4px rgba(34,224,198,.5);
  }


  h1 {
    margin-bottom: 1rem;
    color: var(--text);
    font-family: var(--font-display);
  }

  .query-box input {
    width: 350px;
    padding: 0.6rem;
    background-color: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    margin-right: 0.5rem;
  }

  .query-box button {
    padding: 0.6rem 1rem;
    background: var(--accent2);
    color: var(--bg);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 700;
    transition: background-color 0.2s ease-in-out;
  }

  .query-box button:hover {
    background-color: var(--amber);
  }

  .query-section {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
  }
  
  .query-section input,
  .query-section select,
  .query-section button {
    flex: 1 1 100%;
    max-width: 300px;
  }
  
  
  .mode-box {
    margin: 1rem 0;
    font-size: 0.7rem;
  }
  
  
  
  /* Adjust character card size and layout */
  .character-card {
    background: #ffffff;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 0.8rem;
    width: 100%;
    max-width: 180px;
    text-align: left;
    font-family: Arial, sans-serif;
    font-size: 0.75rem;
    transition: all 0.2s ease-in-out;
    color: #000;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); /* stronger shadow */
    word-wrap: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
  }


  .character-card img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    object-fit: cover;
  }

  /* Optional: Hover effect */
  .character-card:hover {
    transform: scale(1.03);
    box-shadow:
      0 0 10px rgba(255, 255, 255, 0.2),
      0 0 20px rgba(56, 189, 248, 0.4),
      0 6px 12px rgba(0, 0, 0, 0.25);
    border-color: var(--accent2);
  }


  .right-panel ul {
    list-style: none;
    padding: 0;
  }

  .right-panel li {
    background: white;
    margin-bottom: 0.4rem;
    padding: 0.3rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: center;
    color: #003858;
  }

  /* Filter accordion items manage their own background via .filter-header/.filter-content —
     override the generic white li box above so it doesn't wash out their text. */
  .right-panel .filter-item {
    background: transparent;
    margin-bottom: 0.4rem;
    padding: 0;
    border: none;
    border-radius: 0;
    text-align: left;
  }

  .new-round {
    margin: 1rem 0;
  }

  .new-round button {
    background: var(--accent2);
    color: var(--bg);
    border: none;
    padding: 0.6rem 1rem;
    font-family: var(--font-display);
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
  }

  .new-round button:hover {
    background: var(--amber);
  }

  .banner {
    background-color: var(--panel);
    border: 1px solid rgba(56,189,248,.35);
    padding: 1rem 2rem;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 1rem;
    width: 100%;
    max-width: 700px;
  }

  .banner h1 {
    color: var(--accent2);
    font-size: 1.2rem;
    margin: 0;
    font-family: var(--font-display);
  }
  
  @media (max-width: 768px) {
    .layout {
      flex-direction: column;
    }
  
    .left-panel, .right-panel {
      width: 100%;
      flex: none;
      max-height: 150px;
    }
  
    main {
      padding: 1rem;
    }
  }

  @media (max-width: 480px) {
    .character-card {
      font-size: 0.6rem;
    }
  
    #queryFeedback,
    #queryLog {
      font-size: 0.75rem;
    }
  }
  
  
  #promptInstruction {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    background-color: var(--panel);
    border: 1px dashed var(--amber);
    padding: 0.5rem;
    border-radius: 6px;
    transition: opacity 0.3s ease;

  }
  
  #characters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1rem;
    padding: 1rem;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    box-sizing: border-box;
  }


  
  
  @media (max-width: 768px) {
    .layout {
      flex-direction: column;
    }
  
    .left-panel,
    .right-panel {
      width: 100%;
      max-height: none;
      order: 0;
    }
  
    main {
      order: 1;
      width: 100%;
    }
  }
  
  .page-content {
    max-width: 700px;
    width: 90%;
    margin: 0 auto;
    text-align: left;
    overflow-wrap: break-word;
    word-wrap: break-word;
    padding: 1rem;
    box-sizing: border-box;
  }
  
  .page-content pre {
    background-color: var(--bg);
    padding: 0.8rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    white-space: pre-wrap;
    overflow-x: auto;
  }
  
  @media (max-width: 768px) {
    .main-navbar {
      flex-direction: column;
      align-items: flex-start;
      padding: 1rem;
    }
  
    .nav-links {
      flex-direction: column;
      gap: 0.5rem;
    }
  
    .page-content {
      padding: 1rem;
      font-size: 0.85rem;
    }
  
    .banner h1 {
      font-size: 1rem;
    }
  }
  
 
/* Accordion layout */
#filterList {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Filter header (clickable area) */
.filter-header {
  background-color: var(--panel); /* Match main panel */
  color: var(--text);
  border: 1px solid var(--accent2);
  border-radius: 2px;
  font-family: var(--font-body);
  font-weight: bold;
  font-size: 0.75rem;
  padding: 0.5rem 0.6rem;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.filter-header:hover {
  background-color: var(--surface);
}

/* Filter content (expandable box) */
.filter-content {
  background: var(--surface);
  color: var(--accent2);
  font-size: 0.7rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--accent2);
  border-top: none;
  border-radius: 0 0 6px 6px;
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

.heading{
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: .5px;
}

#targetDisplay {
  font-weight: bold;
  text-align: center;
  color: white;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.query-block {
  background-color: var(--bg);
  border-radius: 5px;
  padding: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: white;
}

.query-line {
  margin-bottom: 0.2rem;
}

.query-note {
  font-style: italic;
  font-size: 0.85rem;
  color: #c0c0c0;
  margin-bottom: 0.6rem;
  padding-left: 1rem;
}

.instruction-panel {
  background: var(--panel);
  color: var(--text);
  font-size: 0.85rem;
  padding: 1.2rem;
  box-sizing: border-box;
}

.instruction-panel h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--accent2);
}

.instruction-list {
  padding-left: 1rem;
  list-style: square;
}

.instruction-main {
  flex: 1;
  padding: 2rem;
  background-color: var(--bg);
  color: white;
  overflow-y: auto;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.character-card div {
  line-height: 1.4;
  margin-bottom: 0.2rem;
}
 
