/* ---------------------------------------------------------
   QUANTUM CORE (Variables + Resets)
   --------------------------------------------------------- */
:root {
  --bg-0: #010409;
  --bg-1: #0A0F1A;
  --bg-2: #111827;
  --glass: rgba(255,255,255,0.06);

  --accent-1: #3B82F6;
  --accent-2: #60A5FA;
  --accent-3: #93C5FD;

  --text-1: #F8FAFC;
  --text-2: #CBD5E1;
  --text-3: #64748B;

  --border: rgba(148,163,184,0.18);
  --shadow-1: 0 20px 60px rgba(0,0,0,0.55);

  --radius: 18px;
  --transition: 0.25s ease;
}

/* GLOBAL RESET */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: "Inter", sans-serif;
}

/* ---------------------------------------------------------
   PAGE BACKGROUND — Quantum Glow
   --------------------------------------------------------- */
body {
  background:
    radial-gradient(circle at 20% 20%,
      rgba(59,130,246,0.12),
      rgba(147,197,253,0.06),
      transparent 70%
    ),
    var(--bg-0);
  color: var(--text-1);
}

/* ---------------------------------------------------------
   HEADER
   --------------------------------------------------------- */
.jcoder-header {
  text-align: center;
  margin-top: 90px;
  margin-bottom: 40px;
  padding: 0 20px;
  animation: fade-in 0.6s ease;
}

.jcoder-header h1 {
  font-size: 46px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent-2), var(--accent-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.jcoder-header p {
  font-size: 17px;
  color: var(--text-2);
}

/* ---------------------------------------------------------
   MAIN GRID
   --------------------------------------------------------- */
.jcoder-container {
  max-width: 1300px;
  margin: auto;
  padding: 0 40px 80px;
}

.jcoder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

/* LEFT + RIGHT PANELS */
.jcoder-left,
.jcoder-right {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* ---------------------------------------------------------
   CARDS
   --------------------------------------------------------- */
.jcoder-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow-1);
  transition: var(--transition);
}

.jcoder-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-1);
}

.jcoder-card h3 {
  margin-bottom: 12px;
  font-size: 20px;
}

/* ---------------------------------------------------------
   INPUTS
   --------------------------------------------------------- */
.jcoder-input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--text-1);
  font-size: 15px;
  backdrop-filter: blur(14px);
  transition: var(--transition);
}

.jcoder-input:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 14px rgba(96,165,250,0.4);
}

textarea.jcoder-input {
  resize: vertical;
}

/* ---------------------------------------------------------
   RUN BUTTON
   --------------------------------------------------------- */
.jcoder-run-btn {
  width: 100%;
  padding: 16px;
  font-size: 18px;
}

/* ---------------------------------------------------------
   LOADER
   --------------------------------------------------------- */
.quantum-bar {
  height: 6px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent-3));
  border-radius: 6px;
  animation: glow 1.2s infinite ease-in-out;
}

@keyframes glow {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* ---------------------------------------------------------
   OUTPUT
   --------------------------------------------------------- */
#output {
  white-space: pre-wrap;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: var(--radius);
  color: var(--text-2);
  line-height: 1.55;
  font-size: 15px;
  font-family: "JetBrains Mono", monospace;
}

/* ---------------------------------------------------------
   ANIMATIONS
   --------------------------------------------------------- */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------
   RESPONSIVE — Hybrid Layout
   --------------------------------------------------------- */
@media (max-width: 1000px) {
  .jcoder-grid {
    grid-template-columns: 1fr;
  }

  .jcoder-right {
    order: -1;
  }
}

@media (max-width: 600px) {
  .jcoder-header h1 {
    font-size: 32px;
  }

  .jcoder-container {
    padding: 0 20px 60px;
  }

  .jcoder-card {
    padding: 22px;
  }

  .jcoder-input {
    font-size: 14px;
  }
}
/* ---------------------------------------------------------
   TOP NAV — Quantum UI (Self‑Contained for Chat Page)
   --------------------------------------------------------- */
.top-nav {
  width: 100%;
  height: 64px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid rgba(148,163,184,0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
}

/* LEFT SIDE */
.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #93C5FD; /* accent-3 */
}

/* RIGHT SIDE */
.nav-link {
  color: #CBD5E1; /* text-2 */
  text-decoration: none;
  font-size: 1rem;
  transition: 0.25s ease;
}

.nav-link:hover {
  color: #3B82F6; /* accent-1 */
}

.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 0 8px rgba(0,0,0,0.4);
}

/* ---------------------------------------------------------
   HAMBURGER ICON
   --------------------------------------------------------- */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 2000;
}

.hamburger span {
  width: 26px;
  height: 3px;
  background: white;
  border-radius: 3px;
}

/* ---------------------------------------------------------
   MOBILE MENU
   --------------------------------------------------------- */
.mobile-top-menu {
  display: none;
  flex-direction: column;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 20px;
  border-radius: 12px;
  margin: 10px 20px;
}

.mobile-top-menu.show {
  display: flex !important;
}

.mobile-top-menu a {
  padding: 12px 0;
  color: #CBD5E1;
  text-decoration: none;
  font-size: 16px;
  transition: 0.25s ease;
}

.mobile-top-menu a:hover {
  color: white;
}

/* ---------------------------------------------------------
   RESPONSIVE NAV
   --------------------------------------------------------- */
@media (max-width: 900px) {
  .nav-right {
    display: none;
  }

  #hamburger-menu {
    display: none !important;
  }

  .hamburger {
    display: flex !important;
  }
}

@media (max-width: 480px) {
  .nav-title {
    font-size: 1.2rem;
  }

  .nav-avatar {
    width: 32px;
    height: 32px;
  }
}
