/* =========================================================
   ESTILO PRINCIPAL DO EDITOR GΞΞK CΦDΞ
   ========================================================= */

/* ===== Reset e base ===== */
body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background-color: #1e1e1e;
  color: #f8f8f2;
}

header, footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #282a36;
  padding: 10px 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

header h1 {
  margin: 0;
  font-size: 1.6em;
}

button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 5px;
  transition: transform 0.2s ease;
}

button:hover {
  transform: scale(1.1);
}

/* ===== Área do editor ===== */
.editor-area {
  display: flex;
  height: calc(100vh - 140px);
}

.line-numbers {
  width: 50px;
  background-color: #21222c;
  color: #6272a4;
  text-align: right;
  padding: 10px;
  user-select: none;
}

.editor-wrapper {
  flex: 1;
  position: relative;
}

textarea#editor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  color: transparent;
  caret-color: #50fa7b;
  resize: none;
  border: none;
  outline: none;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 16px;
  line-height: 1.4;
  z-index: 2;
}

pre#highlighting-area {
  margin: 0;
  height: 100%;
  overflow: auto;
  background-color: #282a36;
  color: #f8f8f2;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 16px;
  line-height: 1.4;
  white-space: pre;
  word-wrap: normal;
  z-index: 1;
}

/* ===== Barra de status ===== */
footer {
  justify-content: space-between;
  padding: 8px 15px;
  font-size: 0.9em;
  color: #bd93f9;
}

.status-item {
  margin-right: 10px;
}

.status-center .help-hint {
  color: #6272a4;
}

/* ===== Modais e barras ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 100;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #282a36;
  padding: 20px;
  border-radius: 12px;
  width: 80%;
  max-width: 600px;
  color: #f8f8f2;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

.modal-footer {
  text-align: right;
  margin-top: 15px;
}

button.primary {
  background-color: #50fa7b;
  border-radius: 8px;
  padding: 8px 16px;
  color: #282a36;
  font-weight: bold;
  transition: 0.2s;
}

button.primary:hover {
  background-color: #40e07a;
}

/* =========================================================
   LOGO GΞΞK CΦDΞ - NEON
   ========================================================= */

header h1 .logo-text {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 2em;
  font-weight: bold;
  letter-spacing: 1px;
  color: transparent; /* evita herança do branco */
  user-select: none;
}

header h1 .logo-text .geek {
  color: #50fa7b !important;
  text-shadow: 0 0 6px #50fa7b, 0 0 12px #50fa7b, 0 0 20px #50fa7b;
  animation: glowGreen 3s infinite alternate;
}

header h1 .logo-text .code {
  color: #ff79c6 !important;
  text-shadow: 0 0 6px #ff79c6, 0 0 12px #ff79c6, 0 0 20px #ff79c6;
  animation: glowPink 3s infinite alternate;
}

/* Corrige interferência do tema */
header h1, header h1 * {
  color: inherit !important;
}

/* ===== Efeitos de brilho suave ===== */
@keyframes glowGreen {
  0% { text-shadow: 0 0 6px #50fa7b, 0 0 12px #50fa7b; }
  100% { text-shadow: 0 0 12px #50fa7b, 0 0 24px #50fa7b; }
}

@keyframes glowPink {
  0% { text-shadow: 0 0 6px #ff79c6, 0 0 12px #ff79c6; }
  100% { text-shadow: 0 0 12px #ff79c6, 0 0 24px #ff79c6; }
}

/* =========================================================
   AJUSTES DE TEMA CLARO
   ========================================================= */

body.light-theme {
  background-color: #f5f5f5;
  color: #282a36;
}

body.light-theme header, body.light-theme footer {
  background-color: #e0e0e0;
  color: #282a36;
}

body.light-theme .line-numbers {
  background-color: #f0f0f0;
  color: #555;
}

/* =========================================================
   RESPONSIVIDADE
   ========================================================= */

@media (max-width: 600px) {
  header, footer {
    flex-direction: column;
    text-align: center;
  }

  .logo-text {
    font-size: 1.6em;
  }

  .toolbar {
    flex-wrap: wrap;
    justify-content: center;
  }
}
