* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background: #0f1115;
  color: #e7e9ef;
  height: 100vh;
  overflow: hidden;
}

.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: 100vh;
}

.sidebar {
  background: #171a21;
  border-right: 1px solid #242836;
  padding: 24px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

.sidebar-header {
  margin-bottom: 24px;
}

.sidebar-header .title {
  font-size: 20px;
  font-weight: 600;
}

.sidebar-header .subtitle {
  margin-top: 6px;
  font-size: 12px;
  color: #9aa2b1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-folder {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-folder-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: #9aa2b1;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-folder-title:hover {
  background: rgba(255, 255, 255, 0.05);
}

.nav-children {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-left: 12px;
}

.nav-folder.collapsed .nav-children {
  display: none;
}

.nav-file {
  background: none;
  border: none;
  color: #cdd4e1;
  text-align: left;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-file:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-file.active {
  background: #2b3250;
  color: #f7f8fb;
}

.main {
  padding: 32px 48px;
  background: #0f1115;
  overflow-y: auto;
  min-height: 0;
}

.content {
  max-width: 920px;
  margin: 0 auto;
  line-height: 1.65;
}

.content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 18px 0;
  display: block;
  cursor: pointer;
}

.content video {
  max-width: 100%;
  border-radius: 8px;
  margin: 18px 0;
  display: block;
  cursor: pointer;
}

.content .presenting {
  outline: 2px solid #4aa3ff;
  outline-offset: 4px;
}

.media-controls {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  gap: 10px;
  background: rgba(20, 24, 32, 0.9);
  border: 1px solid rgba(74, 163, 255, 0.4);
  border-radius: 12px;
  padding: 10px;
  z-index: 100;
}

.media-controls.hidden {
  display: none;
}

.media-control-button {
  border: none;
  background: #1f2633;
  color: #e7e9ef;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
}

.media-control-button:hover {
  background: #2a3344;
}

.prompt-editor {
  margin: 12px 0 20px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #2a2f3f;
  background: rgba(255, 255, 255, 0.02);
}

.prompt-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9aa2b1;
  margin-bottom: 8px;
}

.prompt-textarea {
  width: 100%;
  background: #11141b;
  color: #e7e9ef;
  border: 1px solid #2a2f3f;
  border-radius: 8px;
  padding: 10px;
  font-family: inherit;
  resize: vertical;
}

.prompt-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.prompt-message {
  margin: 12px 0 20px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 90, 90, 0.1);
  border: 1px solid rgba(255, 90, 90, 0.35);
  color: #ffb4b4;
}

.prompt-action {
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  background: #2b3250;
  color: #f7f8fb;
  cursor: pointer;
}

.prompt-action.secondary {
  background: #1f2633;
  color: #cdd4e1;
}

.generation-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 12px 0 20px;
}

.generation-option {
  border: 2px solid transparent;
  background: #10141c;
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
}

.generation-option:hover {
  border-color: #4aa3ff;
}

.generation-option img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 0;
}

.content h1,
.content h2,
.content h3,
.content h4 {
  color: #f7f8fb;
  margin-top: 28px;
}

.content a {
  color: #8ab4ff;
}

.content pre {
  background: #1a1f2b;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
}

.content code {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 4px;
  border-radius: 4px;
}

.empty-state,
.error {
  padding: 32px;
  border: 1px dashed #2a2f3f;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.error {
  color: #ffb4b4;
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid #242836;
  }

  .main {
    padding: 24px;
  }
}
