:root {
  --bg: #000;
  --fg: #d6d6d6;
  --muted: #8a8a8a;
  --cursor: #d6d6d6;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
}

body {
  overflow: hidden;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

#app.layout {
  width: 100%;
  height: 100vh;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  overflow: hidden;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.panel {
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

#left-panel {
  padding-right: 12px;
}

#right-panel {
  border-left: 1px solid #2a2f3a;
  padding-left: 24px;
  background: #11151c;
}

.ayah-card {
  position: sticky;
  top: 0;
  padding: 1.5rem;
  border: 1px solid #2a2f3a;
  border-radius: 12px;
  background: #0f1320;
}

.ayah-label {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9aa4b2;
  margin-bottom: 1rem;
}

.ayah-arabic {
  font-size: 1.5rem;
  line-height: 2;
  margin-bottom: 1rem;
  direction: rtl;
  text-align: right;
}

.ayah-translation {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--fg);
}

.ayah-info {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.prompt-line {
  display: flex;
  align-items: center;
  white-space: pre;
  font-size: 18px;
  line-height: 1.4;
}

.prompt-text {
  color: var(--fg);
}

.mode {
  color: var(--muted);
}

.input {
  outline: none;
  border: none;
  background: transparent;
  color: var(--fg);
  font: inherit;
  caret-color: transparent;
  min-width: 1px;
}

.cursor {
  display: inline-block;
  width: 0.65ch;
  color: var(--cursor);
  animation: blink 1s steps(1, end) infinite;
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.terminal {
  width: 100%;
}

.history-line {
  display: flex;
  align-items: center;
  white-space: pre-wrap;
  font-size: 18px;
  line-height: 1.4;
}

.history-value {
  color: var(--fg);
}

@media (max-width: 900px) {
  #app.layout {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  #right-panel {
    border-left: none;
    border-top: 1px solid #2a2f3a;
    padding-left: 0;
    padding-top: 24px;
  }

  .ayah-card {
    position: static;
  }
}
