* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background: rgba(10, 10, 10, 0.5);
  color: #e0e0e0;
  height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
  overflow: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
/* Sidebar */
.sidebar {
  background: #1a1a1a;
  border-right: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
}

.logo-icon {
  font-size: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 1.5rem;
}

.nav-section-title {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #666;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #b0b0b0;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  font-size: 0.9rem;
}

.nav-item:hover {
  background: #252525;
  color: #fff;
}

.nav-item.active {
  background: #667eea15;
  color: #667eea;
  border-left: 3px solid #667eea;
}

.icon-btn {
  background: transparent;
  border: 1px solid #2a2a2a;
  color: #b0b0b0;
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn:hover {
  background: #252525;
  color: #fff;
}

/* Main Content */
.main-content {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #0a0a0a;
}

.top-bar {
  background: #1a1a1a;
  border-bottom: 1px solid #2a2a2a;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #666;
  font-size: 0.85rem;
}

.crumb-item {
  color: #666;
  text-decoration: none;
}

.crumb-item.active {
  color: #fff;
}

.top-bar-actions {
  margin-left: auto;
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Editor Area */
.editor-container {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  overflow: hidden;
}

.editor, .code-panel, .preview-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #2a2a2a;
}

.panel-header {
  background: #1a1a1a;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.tabs {
  display: flex;
  gap: 0.5rem;
}

.tab {
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  font-size: 0.85rem;
}

.tab.active {
  color: #667eea;
  border-bottom-color: #667eea;
}

.code-editor {
  flex: 1;
  background: #0f0f0f;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.code-editor textarea {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #e0e0e0;
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  resize: none;
  padding: 1rem;
}

/* Preview Panel */
.preview-panel {
  background: #0a0a0a;
}

.preview-content {
  flex: 1;
  background: #fff;
  overflow: auto;
}

.preview-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #444;
}

/* Responsive */
@media (max-width: 1200px) {
  .editor-container {
    grid-template-columns: 1fr 1fr;
  }
  .editor {
    display: none;
  }
}

@media (max-width: 768px) {
  body {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    display: none;
  }
  
  .editor-container {
    grid-template-columns: 1fr;
  }
}