/* Mobile First Editor Styles */
:root {
  --bg-color: #121212;
  --surface-color: #1e1e1e;
  --primary-color: #0d47a1;
  /* Dark Blue */
  --accent-color: #2196f3;
  /* Blue */
  --text-main: #e0e0e0;
  --text-dim: #a0a0a0;
  --code-font: 'Courier New', Courier, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Prevent scrolling body, scroll areas instead */
}

.mobile-header {
  background-color: var(--surface-color);
  padding: 10px 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.branding {
  display: flex;
  flex-direction: column;
}

.logo {
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--accent-color);
}

.credits {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: -2px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.2rem;
  margin-left: 15px;
  cursor: pointer;
}

.editor-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.code-area {
  flex: 1;
  /* Takes up remaining space */
  display: flex;
  background-color: var(--bg-color);
}

textarea#code {
  width: 100%;
  height: 100%;
  background-color: transparent;
  color: var(--text-main);
  border: none;
  padding: 15px;
  font-family: var(--code-font);
  font-size: 16px;
  /* Prevents iOS zoom on focus */
  resize: none;
  outline: none;
  line-height: 1.5;
}

.output-area {
  height: 35vh;
  /* Fixed height for output at bottom */
  background-color: var(--surface-color);
  border-top: 1px solid #333;
  display: flex;
  flex-direction: column;
}

.output-header {
  padding: 5px 15px;
  background-color: #252525;
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.clear-btn {
  background: none;
  border: 1px solid #444;
  color: var(--text-dim);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.7rem;
}

#output {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  font-family: var(--code-font);
  font-size: 0.9rem;
  color: #4caf50;
  /* Terminal green */
  white-space: pre-wrap;
}

#output input {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: transparent;
  border: none;
  border-bottom: 1px solid #4caf50;
  outline: none;
  width: 50%;
}

#loading-message {
  padding: 10px 15px;
  color: var(--accent-color);
  font-style: italic;
}

.fab-container {
  position: absolute;
  bottom: 37vh;
  /* Just above output area */
  right: 20px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.fab-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fab-mini {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--surface-color);
  color: var(--text-main);
  border: 1px solid #444;
  font-size: 0.9rem;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.fab-mini:active {
  transform: scale(0.95);
  background-color: #333;
}

.fab-run {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--accent-color);
  color: white;
  border: none;
  font-size: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  padding-left: 5px;
  /* Visual optical alignment for play triangle */
  cursor: pointer;
  transition: transform 0.2s;
}

.fab-run:active {
  transform: scale(0.95);
}