* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background: #000;
  color: #00FF00;
  font-family: 'Courier New', monospace;
  padding: 20px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  margin-bottom: 10px;
  font-size: 24px;
  text-shadow: 0 0 10px #00FF00;
  white-space: pre;
  overflow-x: auto;
}

.grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  h1 {
    font-size: 12px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .panel {
    padding: 10px;
  }

  .control-panel {
    order: 1;
  }

  .output-panel {
    order: 2;
    min-height: 400px;
  }

  .button-group {
    flex-direction: row;
  }

  button {
    padding: 8px;
    font-size: 12px;
  }

  h2 {
    font-size: 14px;
  }

  .info-box {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 12px;
  }

  .button-group {
    flex-direction: column;
  }

  button {
    font-size: 11px;
    padding: 6px;
  }

  .file-input-label {
    font-size: 12px;
    padding: 6px;
  }

  select {
    font-size: 12px;
    padding: 6px;
  }

  .output-panel {
    min-height: 300px;
  }

  pre {
    font-size: 6px !important;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid {
    grid-template-columns: 250px 1fr;
  }

  .container {
    max-width: 100%;
    padding: 0 10px;
  }
}

.panel {
  border: 2px solid #00FF00;
  padding: 15px;
}

.control-panel {
  background: #001100;
}

.output-panel {
  background: #000;
  min-height: 600px;
  overflow: auto;
}

h2 {
  margin-top: 0;
  font-size: 16px;
  margin-bottom: 15px;
}

.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
}

.file-input-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #00FF00;
  cursor: pointer;
  background: #002200;
}

.file-input-label:hover {
  background: #003300;
  box-shadow: 0 0 10px #00FF00;
}

input[type="file"] {
  display: none;
}

select {
  width: 100%;
  padding: 8px;
  background: #000;
  color: #00FF00;
  border: 1px solid #00FF00;
  font-family: inherit;
  font-size: 14px;
}

select:focus {
  outline: 2px solid #00FF00;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

button {
  padding: 10px;
  background: #002200;
  color: #00FF00;
  border: 1px solid #00FF00;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  font-family: inherit;
  font-size: 14px;
}

button:disabled {
  background: #001100;
  color: #005500;
  cursor: not-allowed;
}

button:not(:disabled):hover {
  background: #003300;
  box-shadow: 0 0 10px #00FF00;
}

button:focus {
  outline: 2px solid #00FF00;
}

.donate-box {
  margin-top: 20px;
  padding: 10px;
  border: 1px solid #00FF00;
  text-align: center;
  overflow: visible;
}

.donate-box form {
  display: block;
  min-height: 40px;
}

.promo-box {
  margin-top: 20px;
  padding: 10px;
  border: 1px solid #00FF00;
  text-align: center;
  overflow: visible;
}

.promo-box form {
  display: block;
  min-height: 40px;
}

.info-box {
  margin-top: 20px;
  padding: 10px;
  border: 1px solid #00FF00;
  font-size: 11px;
  line-height: 1.4;
}

.empty-state, .processing {
  text-align: center;
  padding: 40px;
  opacity: 0.5;
}

.processing {
  font-size: 20px;
  animation: blink 1s infinite;
}

.empty-icon {
  font-size: 48px;
  margin: 0 auto 20px;
}

pre {
  margin: 0;
  line-height: 1;
  white-space: pre;
  overflow: auto;
  letter-spacing: -0.2em;
}

canvas {
  display: none;
}

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

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #000;
}

::-webkit-scrollbar-thumb {
  background: #00FF00;
  border: 1px solid #000;
}

.status-bar {
  margin-bottom: 10px;
  min-height: 18px;
  font-size: 12px;
  color: #FF5555;
}

/* DOS-style processing popup overlay */
#dosPopup {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.75);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

#dosPopup.active {
  display: flex;
}

.dos-popup-box {
  border: 3px double #00FF00;
  background: #000;
  padding: 0;
  min-width: 340px;
  max-width: 90vw;
  box-shadow: 0 0 32px #00FF00, inset 0 0 8px #002200;
  font-family: 'Courier New', monospace;
}

.dos-popup-title {
  background: #00FF00;
  color: #000;
  padding: 4px 10px;
  font-weight: bold;
  font-size: 13px;
  letter-spacing: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dos-popup-body {
  padding: 20px 24px 18px 24px;
  color: #00FF00;
}

.dos-popup-body p {
  margin-bottom: 10px;
  font-size: 13px;
  letter-spacing: 1px;
}

.dos-progress-bar {
  border: 1px solid #00FF00;
  height: 16px;
  background: #001100;
  margin: 10px 0 6px 0;
  overflow: hidden;
  position: relative;
}

.dos-progress-fill {
  height: 100%;
  background: repeating-linear-gradient(
    90deg, #00FF00 0px, #00FF00 10px, #005500 10px, #005500 14px
  );
  width: 0%;
  transition: width 0.3s linear;
}

.dos-progress-label {
  font-size: 11px;
  color: #00CC00;
  text-align: center;
  letter-spacing: 1px;
}

.dos-blink {
  animation: blink 1s infinite;
}

/* DOS-style color-switch popup overlay */
#dosColorPopup {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.75);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

#dosColorPopup.active {
  display: flex;
}

/* DOS-style error popup overlay */
#dosErrorPopup {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.80);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

#dosErrorPopup.active {
  display: flex;
}

.dos-error-box {
  border: 3px double #FF5555;
  background: #000;
  padding: 0;
  min-width: 360px;
  max-width: 92vw;
  box-shadow: 0 0 32px #FF0000, inset 0 0 8px #220000;
  font-family: 'Courier New', monospace;
}

.dos-error-title {
  background: #FF5555;
  color: #000;
  padding: 4px 10px;
  font-weight: bold;
  font-size: 13px;
  letter-spacing: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dos-error-body {
  padding: 18px 24px 16px 24px;
  color: #FF5555;
}

.dos-error-body p {
  margin-bottom: 12px;
  font-size: 13px;
  letter-spacing: 1px;
  line-height: 1.6;
  white-space: pre-line;
}

.dos-error-divider {
  color: #880000;
  font-size: 12px;
  margin-bottom: 14px;
  letter-spacing: 0;
  overflow: hidden;
}

.dos-error-btns {
  display: flex;
  justify-content: center;
}

.dos-error-btn {
  background: #000;
  color: #FF5555;
  border: 2px solid #FF5555;
  padding: 6px 28px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.dos-error-btn:hover,
.dos-error-btn:focus {
  background: #FF5555;
  color: #000;
  outline: none;
}

/* AI cooldown bar */
#cooldownBar {
  display: none;
  margin-top: 8px;
  padding: 6px 8px;
  border: 1px solid #00FF00;
  background: #001100;
  font-size: 11px;
  color: #00CC00;
}

#cooldownBar.active {
  display: block;
}

.cooldown-track {
  border: 1px solid #005500;
  height: 8px;
  background: #000;
  margin-top: 4px;
  overflow: hidden;
}

.cooldown-fill {
  height: 100%;
  background: #00FF00;
  transition: width 1s linear;
}

/* ENTER / Generate button — primary action */
#generateBtn {
  border: 2px solid #00FF00;
  font-weight: bold;
  letter-spacing: 2px;
  font-size: 15px;
  background: #002800;
}

#generateBtn:not(:disabled):hover {
  background: #004400;
  box-shadow: 0 0 16px #00FF00, 0 0 4px #00FF00 inset;
}

#generateBtn:disabled {
  border-color: #005500;
  color: #005500;
  letter-spacing: 2px;
}

/* ─── DOS SOUNDS toggle ─────────────────────────── */
.dos-sounds-group {
  margin-bottom: 14px;
}

.dos-sounds-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 2px;
  color: #00CC00;
  user-select: none;
  padding: 4px 0;
}

.dos-sounds-label:hover {
  color: #00FF00;
  text-shadow: 0 0 6px #00FF00;
}

.dos-checkbox {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  letter-spacing: 0;
  color: #007700;
  transition: color 0.15s;
}

.dos-checkbox.dos-sounds-on {
  color: #00FF00;
  text-shadow: 0 0 8px #00FF00;
}

/* ─── DOS Game-style buttons ────────────────────── */
.dos-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 12px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  letter-spacing: 1px;
  border: 1px solid #00FF00;
  background: #002200;
  color: #00FF00;
  cursor: pointer;
  width: 100%;
  text-transform: uppercase;
  transition: background 0.1s, box-shadow 0.1s;
}

.dos-btn-primary {
  border: 2px solid #00FF00;
  font-size: 15px;
  font-weight: bold;
  background: #002800;
  letter-spacing: 2px;
}

.dos-btn-secondary {
  border: 1px solid #005500;
  font-size: 13px;
  background: #001800;
  color: #00CC00;
}

.dos-btn:not(:disabled):hover {
  background: #003300;
  box-shadow: 0 0 12px #00FF00, 0 0 4px #00FF00 inset;
  color: #00FF00;
}

.dos-btn-primary:not(:disabled):hover {
  background: #004400;
  box-shadow: 0 0 18px #00FF00, 0 0 6px #00FF00 inset;
}

.dos-btn:disabled {
  background: #001100;
  color: #004400;
  border-color: #003300;
  cursor: not-allowed;
  box-shadow: none;
}

.dos-btn-key {
  font-weight: bold;
  letter-spacing: 0;
  font-size: 12px;
  background: #003300;
  padding: 1px 5px;
  border: 1px solid #00AA00;
  border-radius: 2px;
  white-space: nowrap;
}

.dos-btn:disabled .dos-btn-key {
  background: #001a00;
  border-color: #002800;
  color: #004400;
}

.dos-btn-label {
  flex: 1;
  text-align: left;
}

/* ── DOS Footer ── */
#dos-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  padding: 12px 16px;
  border-top: 1px solid #003300;
  font-family: 'Courier New', monospace;
  font-size: clamp(10px, 2.5vw, 12px);
  color: #005500;
  text-align: center;
}

.dos-footer-sep {
  color: #003300;
  letter-spacing: 1px;
  overflow: hidden;
  white-space: nowrap;
  max-width: 100%;
  display: block;
}

.dos-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.dos-footer-links a {
  color: #008800;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, text-shadow 0.15s;
}

.dos-footer-links a:hover {
  color: #00FF00;
  text-shadow: 0 0 6px #00FF00;
}

.dos-footer-divider {
  color: #004400;
}

.dos-footer-copy {
  color: #004400;
  font-size: clamp(9px, 2vw, 11px);
  letter-spacing: 0.5px;
}

@media (max-width: 480px) {
  .dos-footer-divider {
    display: none;
  }

  .dos-footer-links {
    flex-direction: column;
    gap: 6px;
  }
}

/* ══════════════════════════════════════
   COOKIE CONSENT POPUP
══════════════════════════════════════ */
#consentPopup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#consentPopup.active {
  display: flex;
}

.consent-box {
  border: 3px double #00FF00;
  background: #000;
  width: 100%;
  max-width: 540px;
  box-shadow: 0 0 40px #00FF00, inset 0 0 10px #002200;
  font-family: 'Courier New', monospace;
}

.consent-title {
  background: #00FF00;
  color: #000;
  padding: 5px 12px;
  font-weight: bold;
  font-size: clamp(11px, 3vw, 13px);
  letter-spacing: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.consent-body {
  padding: 18px 20px 16px;
  color: #00DD00;
}

.consent-body p {
  font-size: clamp(11px, 2.8vw, 13px);
  line-height: 1.7;
  margin-bottom: 12px;
}

.consent-hl {
  color: #00FF00;
  font-weight: bold;
}

/* Cookie category table */
.consent-table {
  border: 1px solid #005500;
  margin-bottom: 14px;
  font-size: clamp(10px, 2.5vw, 12px);
}

.consent-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1.4fr;
  gap: 6px;
  padding: 6px 10px;
  border-bottom: 1px solid #003300;
  align-items: center;
}

.consent-row:last-child {
  border-bottom: none;
}

.consent-row-header {
  background: #001a00;
  color: #00FF00;
  font-weight: bold;
  letter-spacing: 1px;
}

.consent-always {
  color: #00FF00;
  font-weight: bold;
}

.consent-basic {
  color: #00AA00;
}

.consent-on {
  color: #00FF00;
  font-weight: bold;
}

.consent-off {
  color: #555;
}

.consent-note {
  font-size: clamp(10px, 2.4vw, 11px) !important;
  color: #008800 !important;
  margin-bottom: 16px !important;
}

.consent-note a {
  color: #00BB00;
  text-decoration: underline;
}

.consent-note a:hover {
  color: #00FF00;
  text-shadow: 0 0 6px #00FF00;
}

/* Buttons */
.consent-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.consent-btn {
  flex: 1;
  min-width: 140px;
  padding: 10px 8px;
  font-family: 'Courier New', monospace;
  font-size: clamp(11px, 2.6vw, 13px);
  font-weight: bold;
  letter-spacing: 1px;
  border: 2px solid #00FF00;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  text-align: center;
}

.consent-btn-secondary {
  background: #001a00;
  color: #00AA00;
  border-color: #005500;
}

.consent-btn-secondary:hover {
  background: #002800;
  color: #00FF00;
  box-shadow: 0 0 10px #005500;
}

.consent-btn-primary {
  background: #003300;
  color: #00FF00;
}

.consent-btn-primary:hover {
  background: #005500;
  box-shadow: 0 0 14px #00FF00, 0 0 4px #00FF00 inset;
}

/* ── DOS Terminal Info Box ───────────────────────────────────────────── */
.dos-terminal-box {
  width: 100%;
  max-width: 500px;
  margin: 12px auto 0;
  border: 2px solid #00FF00;
  background: #000;
  box-shadow: 0 0 12px rgba(0, 255, 0, 0.3);
  font-family: 'Courier New', monospace;
}

.dos-terminal-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #00AA00;
  color: #000;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 8px;
  letter-spacing: 1px;
}

.dos-terminal-body {
  padding: 8px 10px;
  font-size: 12px;
  color: #00FF00;
  min-height: 36px;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px;
  word-break: break-word;
}

.dos-terminal-prompt {
  color: #00FF00;
  white-space: nowrap;
  flex-shrink: 0;
}

.dos-terminal-msg {
  color: #00CC00;
  flex: 1;
}

.dos-terminal-cursor {
  color: #00FF00;
  animation: dos-cursor-blink 0.9s step-end infinite;
  flex-shrink: 0;
}

@keyframes dos-cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@media (max-width: 520px) {
  .dos-terminal-box {
    max-width: 100%;
  }

  .dos-terminal-body {
    font-size: 11px;
  }

  .dos-terminal-titlebar {
    font-size: 10px;
  }
}

