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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow: hidden;
}

.vibe-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background 0.5s ease;
}

/* Particles */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: float linear infinite;
}

@keyframes float {
  0% {
    transform: translateY(100vh) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) translateX(100px);
    opacity: 0;
  }
}

/* Header */
.vibe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  backdrop-filter: blur(20px);
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.app-title {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
  transition: transform 0.2s;
}

.app-title:hover {
  transform: scale(1.05);
}

.vibe-meter {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vibe-orb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, #ff6b9d 0%, #c084fc 100%);
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(255, 107, 157, 0.5);
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.project-selector {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
  min-width: 200px;
}

.header-right {
  display: flex;
  gap: 0.5rem;
}

.theme-btn,
.focus-btn,
.particles-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}

.theme-btn:hover,
.focus-btn:hover,
.particles-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Main content */
.main-content {
  flex: 1;
  display: flex;
  gap: 1px;
  overflow: hidden;
  z-index: 2;
}

/* Sidebar */
.sidebar {
  width: 280px;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 0.5rem;
}

.search-input {
  flex: 1;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 0.9rem;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.new-project-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.new-project-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

.projects-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.project-card {
  padding: 1rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s;
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.project-card.active {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 107, 157, 0.5);
  box-shadow: 0 0 20px rgba(255, 107, 157, 0.2);
}

.project-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.project-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #76ff03;
  box-shadow: 0 0 8px #76ff03;
}

.project-name {
  flex: 1;
  color: white;
  font-size: 1rem;
  font-weight: 600;
}

.delete-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.delete-btn:hover {
  background: rgba(255, 0, 0, 0.3);
  color: white;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Editor */
.editor-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
}

.editor-tabs {
  display: flex;
  gap: 2px;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  overflow-x: auto;
}

.editor-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 6px 6px 0 0;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.editor-tab:hover {
  background: rgba(255, 255, 255, 0.1);
}

.editor-tab.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border-bottom: 2px solid #ff6b9d;
}

.tab-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.tab-close:hover {
  background: rgba(255, 0, 0, 0.3);
  color: white;
}

.new-file-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.new-file-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.monaco-container {
  flex: 1;
  min-height: 0;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

.auto-save {
  animation: fadeIn 2s infinite;
}

@keyframes fadeIn {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.run-btn {
  padding: 0.4rem 1rem;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.run-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

/* Right Panel */
.right-panel {
  width: 320px;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-tabs {
  display: flex;
  gap: 2px;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-tabs button {
  flex: 1;
  padding: 0.5rem;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.panel-tabs button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.panel-tabs button.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.preview-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
  border-radius: 8px;
}

.console {
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  color: #00ff00;
  background: rgba(0, 0, 0, 0.5);
  padding: 1rem;
  border-radius: 8px;
  height: 100%;
  overflow-y: auto;
}

.console-empty {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.console-line {
  margin-bottom: 0.5rem;
  word-wrap: break-word;
}

.insights {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.insight-card {
  padding: 1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.insight-card h3 {
  color: white;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.insight-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.insight-card.encouragement {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
  border-color: rgba(255, 107, 157, 0.3);
  text-align: center;
}

.insight-card.encouragement h3 {
  font-size: 1.2rem;
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Footer */
.vibe-footer {
  padding: 1rem;
  text-align: center;
  backdrop-filter: blur(20px);
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  z-index: 10;
}

.vibe-footer a {
  color: #ff6b9d;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.vibe-footer a:hover {
  color: #ec4899;
}

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

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar {
    width: 240px;
  }
  
  .right-panel {
    width: 280px;
  }
}

@media (max-width: 768px) {
  .sidebar,
  .right-panel {
    display: none;
  }
  
  .editor-panel {
    width: 100% !important;
  }
}