html, body {
  height: 100%;
  margin: 0;
}

/* CSS Custom Properties for theming */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --bg-tertiary: #e0e0e0;
  --text-primary: #000000;
  --text-secondary: #333333;
  --modal-bg: #ffffff;
  --modal-text: #000000;
}

body.dark-mode {
  --bg-primary: #1e1e1e;
  --bg-secondary: #2d2d2d;
  --bg-tertiary: #3e3e3e;
  --text-primary: #ffffff;
  --text-secondary: #e0e0e0;
  --modal-bg: #2d2d2d;
  --modal-text: #ffffff;
}

.main-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.mdc-top-app-bar {
  z-index: 2000;
}

.editor {
  flex: 1 1 auto;
  min-height: 0;
}

.bottom-pane {
  flex: 0 0 25%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.console-controls {
  display: flex;
  justify-content: flex-end;
  background: var(--bg-secondary);
}

.control-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 2px 4px;
  color: var(--text-primary);
}

.tabs {
  display: flex;
  background: var(--bg-secondary);
}

.tab {
  flex: 1;
  padding: 4px 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-primary);
}

.tab.active {
  background: var(--bg-tertiary);
}

.panel {
  flex: 1;
  display: none;
  overflow: auto;
  background: #121212;
  color: #ffffff;
  min-height: 0;
}

.panel.active {
  display: block;
}

#inputs-panel {
  overflow: hidden;
}

#output {
  padding: 8px;
  white-space: pre-wrap;
}

#console-panel {
  position: relative;
  font: 14px/1.4 monospace;
}

.stdin-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 8px 8px;
  font: inherit;
}

.stdin-input {
  flex: 1 1 auto;
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
  caret-color: currentColor;
  font: inherit;
  padding: 0;
  margin: 0;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--modal-bg);
  padding: 16px;
  border-radius: 4px;
  color: var(--modal-text);
  width: 420px;
  max-width: 90%;
}

.modal-actions {
  margin-top: 12px;
  text-align: right;
}

.modal-header {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.modal-header--credits {
  margin-top: 16px;
}

.credits-text {
  font-size: 0.875rem;
  line-height: 1.4;
  margin: 0;
}

.modal-option {
  display: block;
  margin-bottom: 8px;
}

.inputs-area {
  width: 100%;
  height: 100%;
  background: transparent;
  color: #ffffff;
  border: none;
  resize: none;
  padding: 8px;
  font: 14px/1.4 monospace;
  box-sizing: border-box;
  overflow: auto;
}
