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

:root {
  --navy-deep: #020c1b;
  --navy-main: #0a192f;
  --navy-light: #112240;
  --navy-accent: #64ffda;
  --status-blue: #007acc;
}

body {
  background: var(--navy-deep);
  color: #e6f1ff;
  font-family: Arial, sans-serif;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.header {
  height: 32px;
  background: var(--navy-deep);
  border-bottom: 1px solid #112240;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 12px;
  color: #888;
}

.main-container {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.sidebar {
  width: 48px;
  background: var(--navy-deep);
  border-right: 1px solid #112240;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 12px;
}

.sidebar-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #888;
  border-radius: 4px;
  margin-bottom: 8px;
  transition: all 0.2s;
  font-size: 18px;
}

.sidebar-icon:hover {
  background: var(--navy-light);
  color: var(--navy-accent);
}

.sidebar-icon.active {
  color: var(--navy-accent);
}

.explorer {
  width: 200px;
  background: var(--navy-main);
  border-right: 1px solid #112240;
  padding: 0;
  transition:
    margin-left 0.3s ease,
    opacity 0.3s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.explorer.hidden {
  margin-left: -200px;
  opacity: 0;
  pointer-events: none;
}

.explorer-header {
  padding: 12px;
  font-size: 10px;
  font-weight: bold;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #112240;
}

.explorer-actions {
  display: flex;
  gap: 8px;
}

.explorer-btn {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
}

.explorer-btn:hover {
  background: var(--navy-light);
  color: var(--navy-accent);
}

.file-tree {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.file-item {
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d4d4d4;
  user-select: none;
}

.file-item:hover {
  background: var(--navy-light);
}

.file-item.active {
  background: var(--navy-light);
  color: var(--navy-accent);
}

.editor-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--navy-main);
}

.tabs {
  height: 36px;
  background: var(--navy-deep);
  display: flex;
  align-items: center;
  font-size: 13px;
}

.tab {
  padding: 8px 16px;
  cursor: pointer;
  background: var(--navy-deep);
  color: #888;
  border-top: 2px solid transparent;
  user-select: none;
}

.tab:hover {
  background: var(--navy-light);
}

.tab-action-btn {
  margin-left: auto;
  background: transparent;
  border: none;
  color: #888;
  font-size: 16px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 4px;
  transition:
    background 0.2s,
    color 0.2s;
}

.tab-action-btn:hover {
  background: var(--navy-light);
  color: var(--navy-accent);
}

.tab-action-btn.hidden {
  display: none;
}

.tab.active {
  background: var(--navy-main);
  border-top: 2px solid var(--navy-accent);
  color: #e6f1ff;
}

.content {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.editor-panel {
  width: 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #112240;
  transition: width 0.3s ease;
}

.monaco-container {
  flex: 1;
  width: 100%;
  position: relative;
}

.js-console-container {
  display: flex;
  flex-direction: row;
  height: 100%;
  min-height: 0;
}

.js-editor-area {
  flex: 1;
  min-height: 0;
  min-width: 0;
}

.js-console-area {
  width: 360px;
  min-width: 320px;
  max-width: 45%;
  height: 100%;
  background: #1e1e1e;
  border-left: 1px solid #112240;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.js-console-area.hidden {
  display: none !important;
}

.console-header {
  background: #1e1e1e;
  padding: 8px 12px;
  border-bottom: 1px solid #007acc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.console-title {
  color: #007acc;
  font-weight: bold;
  font-size: 12px;
}

.console-clear-btn {
  background: #007acc;
  color: white;
  border: none;
  padding: 5px 15px;
  cursor: pointer;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
}

.console-clear-btn:hover {
  background: #005a9e;
}

.console-content {
  padding: 8px 12px;
  font-family: "Courier New", monospace;
  font-size: 13px;
  color: #d4d4d4;
}

.console-line {
  padding: 4px 0;
  border-bottom: 1px solid #333;
  line-height: 1.4;
}

.console-log {
  color: #d4d4d4;
}
.console-error {
  color: #f48771;
}
.console-warn {
  color: #dcdcaa;
}

.console-table {
  margin: 8px 0;
  border-collapse: collapse;
  background: #252526;
}

.console-table th {
  background: #1e1e1e;
  color: #007acc;
  padding: 6px 12px;
  text-align: left;
  border: 1px solid #444;
  font-weight: bold;
}

.console-table td {
  padding: 6px 12px;
  border: 1px solid #444;
  color: #d4d4d4;
}

.hidden {
  display: none !important;
}

.preview-panel {
  width: 50%;
  height: 100%;
  position: relative;
  background: white;
}

.preview-label {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  font-size: 10px;
  border-radius: 3px;
  z-index: 100;
}

#preview {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
}

.status-bar {
  height: 24px;
  background: var(--status-blue);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 11px;
  color: white;
}
