:root {
  --bg: #0a0f1a;
  --card-bg: #0f1526;
  --text: #e0f0ff;
  --accent: #4deeea;
  --console-bg: #001122;
  --sidebar-width: 260px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  display: flex;
  position: relative;
}

#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--card-bg);
  padding: 20px 0;
  transform: translateX(calc(-1 * var(--sidebar-width)));
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
  z-index: 1000;
  overflow-y: auto;
}

#sidebar.active {
  transform: translateX(0);
}

.menu-section {
  margin-top: 20px;
}

.menu-section h3 {
  padding: 10px 20px;
  font-size: 14px;
  color: #88a;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.menu-section h3:hover {
  color: var(--accent);
}

.menu-section ul {
  list-style: none;
  padding: 0 10px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.menu-section.active ul {
  max-height: 300px;
}

.menu-item {
  padding: 12px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
  font-size: 15px;
  border-radius: 0 6px 6px 0;
}

.menu-item:hover {
  background: rgba(77, 238, 234, 0.08);
  color: var(--accent);
}

.menu-item.active {
  border-left-color: var(--accent);
  background: rgba(77, 238, 234, 0.15);
  color: var(--accent);
  font-weight: 600;
}

#header-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-bottom: 20px;
  width: 100%;
}

#main-header,
.time-display {
  text-align: left;
  width: fit-content;
  padding-right: 20px;
}

#main-header {
  margin: 0;
  font-size: 28px;
  font-weight: bold;
  color: var(--accent);
}

.time-display {
  margin-top: 4px;
  font-size: 16px;
  opacity: 0.9;
  color: var(--text);
}

#main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-left: 0;
  transition: margin-left 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
  padding: 20px;
  padding-bottom: 70px;
  min-height: 100vh;
  overflow-y: auto;
}

#sidebar.active ~ #main-container {
  margin-left: var(--sidebar-width);
}

#cen-frame {
  width: 100%;
  height: 400px;
  min-height: 400px;
  background: #000;
  border-radius: 12px;
  margin: 20px 0;
  overflow: hidden;
  position: relative;
}

#cen-frame.dim {
  opacity: 0.3;
}

.console {
  background: var(--console-bg);
  padding: 15px;
  border-radius: 8px;
  height: 200px;
  overflow-y: auto;
  font-family: monospace;
  white-space: pre-wrap;
  margin-top: 20px;
}

.input-area {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

#user-input {
  flex: 1;
  padding: 10px;
  background: #111;
  color: #aaa;
  border: 1px solid #444;
  border-radius: 6px;
  font-family: monospace;
}

#send-btn {
  padding: 10px 20px;
  background: #333;
  color: #666;
  border: none;
  border-radius: 6px;
  cursor: not-allowed;
}

.status-bar {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: rgba(6, 10, 18, 0.95);
  padding: 10px 15px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  font-family: monospace;
  display: flex;
  justify-content: space-between;
  z-index: 900;
  transition: left 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

#sidebar.active ~ .status-bar {
  left: calc(20px + var(--sidebar-width));
}

#toggle-btn {
  position: fixed;
  top: 8px;
  left: 8px;
  width: 16px;
  height: 16px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0;
  transition: left 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

#toggle-btn::before,
#toggle-btn::after,
#toggle-btn span {
  content: "";
  display: block;
  width: 8px;
  height: 1px;
  background: var(--accent);
  margin: 0.8px 0;
  border-radius: 1px;
}

#sidebar.active ~ #toggle-btn {
  left: calc(8px + var(--sidebar-width));
}

@media (max-width: 900px) {
  #sidebar.active ~ #main-container {
    margin-left: 0;
  }
  #sidebar.active ~ .status-bar,
  #sidebar.active ~ #toggle-btn {
    left: 8px;
  }
  .status-bar {
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
  }
}
