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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f0f1a;
  color: #e0e0e0;
  height: 100vh;
  overflow: hidden;
}

.container {
  display: flex;
  height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: #1a1a2e;
  border-right: 1px solid #2a2a4a;
  padding: 24px;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: #fff;
}

.subtitle {
  color: #888;
  font-size: 0.875rem;
  margin-bottom: 24px;
}

#project-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-group {
  display: flex;
  flex-direction: column;
}

.project-item {
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #ccc;
  cursor: pointer;
  text-align: left;
  font-size: 0.9rem;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.project-item:hover {
  background: #2a2a4a;
  color: #fff;
}

.project-item.active {
  background: #3a3a6a;
  color: #fff;
}

.expand-icon {
  font-size: 0.7rem;
  width: 12px;
  color: #666;
}

.screen-list {
  display: none;
  flex-direction: column;
  margin-left: 20px;
  margin-top: 2px;
  gap: 2px;
}

.screen-list.visible {
  display: flex;
}

.screen-item {
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #999;
  cursor: pointer;
  text-align: left;
  font-size: 0.85rem;
  transition: all 0.15s ease;
  border-left: 2px solid #2a2a4a;
}

.screen-item:hover {
  background: #252545;
  color: #ddd;
  border-left-color: #4a4a7a;
}

.screen-item.active {
  background: #3a3a6a;
  color: #fff;
  border-left-color: #6a6aba;
}

.loading {
  color: #666;
  font-size: 0.875rem;
  padding: 12px;
}

/* Main content */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  background: #1a1a2e;
  border-bottom: 1px solid #2a2a4a;
}

.tab {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid #3a3a5a;
  border-radius: 6px;
  color: #999;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.tab:hover {
  background: #2a2a4a;
  color: #fff;
  border-color: #4a4a7a;
}

.tab.active {
  background: #4a4a8a;
  color: #fff;
  border-color: #6a6aba;
}

.tab.unavailable {
  opacity: 0.4;
  cursor: not-allowed;
}

.tab.unavailable:hover {
  background: transparent;
  color: #999;
  border-color: #3a3a5a;
}

/* Preview area */
.preview-container {
  flex: 1;
  padding: 0;
  display: none;
  background: #0f0f1a;
  overflow: auto;
}

.preview-container.visible {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* Mobile phone frame */
.preview-container.mobile {
  background: #0f0f1a;
  padding: 40px;
}

.preview-container.mobile #preview {
  width: 390px;
  height: 844px;
  border-radius: 40px;
  box-shadow: 
    0 0 0 12px #1a1a2e,
    0 0 0 14px #3a3a5a,
    0 25px 50px rgba(0,0,0,0.5);
}

/* Notch indicator for mobile */
.preview-container.mobile::before {
  content: '';
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 30px;
  background: #1a1a2e;
  border-radius: 0 0 20px 20px;
  z-index: 10;
  display: none; /* Enable if you want notch */
}

/* No project placeholder */
.no-project {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.no-project.hidden {
  display: none;
}

.placeholder {
  text-align: center;
  color: #666;
}

.placeholder h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: #888;
}

.placeholder p {
  font-size: 0.95rem;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
  background: #3a3a5a;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4a4a6a;
}
