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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f5f7;
  color: #1d1d1f;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  padding: 35px;
  border-radius: 16px;
  margin-bottom: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.2);
}

h1 {
  font-size: 28px;
  font-weight: 600;
}

.project-selector {
  display: flex;
  gap: 15px;
  align-items: center;
}

.project-selector select {
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 200px;
}

.project-selector select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.project-selector select:hover {
  border-color: #c1c8cd;
}

.btn-new-project {
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-new-project::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn-new-project:hover::before {
  left: 100%;
}

.btn-new-project:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-new-project:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  color: #0066cc;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 14px;
  color: #86868b;
}

.insights-section, .install-section {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  padding: 35px;
  border-radius: 16px;
  margin-bottom: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid rgba(255,255,255,0.2);
}

h2 {
  font-size: 22px;
  margin-bottom: 20px;
  font-weight: 600;
}

.insights-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.insight-card {
  border: 1px solid #d2d2d7;
  border-radius: 10px;
  padding: 20px;
  transition: all 0.2s;
}

.insight-card:hover {
  border-color: #0066cc;
  box-shadow: 0 4px 12px rgba(0,102,204,0.1);
}

.insight-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 10px;
}

.insight-title {
  font-size: 16px;
  font-weight: 600;
  color: #1d1d1f;
}

.severity-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.severity-high {
  background: #ff3b30;
  color: white;
}

.severity-medium {
  background: #ff9500;
  color: white;
}

.severity-low {
  background: #34c759;
  color: white;
}

.insight-description {
  color: #515154;
  font-size: 14px;
  margin-bottom: 10px;
}

.insight-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: #86868b;
}

.loading, .empty-state {
  text-align: center;
  padding: 40px;
  color: #86868b;
}

.code-block {
  position: relative;
  background: #1d1d1f;
  color: #f5f5f7;
  padding: 20px;
  border-radius: 8px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  overflow-x: auto;
}

.copy-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 3px 12px rgba(240, 147, 251, 0.3);
  position: relative;
  overflow: hidden;
}

.copy-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.copy-btn:hover::before {
  left: 100%;
}

.copy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(240, 147, 251, 0.4);
}

.copy-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(240, 147, 251, 0.3);
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 20px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
/* Welcome Screen */
.welcome-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
}

.welcome-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #1d1d1f;
}

.welcome-content p {
  font-size: 1.2rem;
  color: #86868b;
  margin-bottom: 2rem;
}

.btn-large {
  padding: 16px 32px;
  font-size: 18px;
}

/* Create Project Screen */
.create-project-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.form-container {
  max-width: 500px;
  width: 100%;
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #1d1d1f;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fafbfc;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.form-group input:hover {
  border-color: #c1c8cd;
  background: white;
}

/* Installation Screen */
.installation-screen {
  padding: 40px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.success-header {
  text-align: center;
  margin-bottom: 40px;
}

.success-header h1 {
  color: #34c759;
  margin-bottom: 10px;
}

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.step-number {
  background: #0066cc;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-content h3 {
  margin-bottom: 10px;
  color: #1d1d1f;
}

.step-content ul {
  margin: 10px 0;
  padding-left: 20px;
}

.step-content li {
  margin-bottom: 5px;
  color: #515154;
}

/* Dashboard Screen */
.dashboard-screen {
  display: block;
}

/* Primary Button Styles */
.btn-primary {
  padding: 14px 28px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  color: white;
  text-decoration: none;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

/* Large Button Variant */
.btn-large {
  padding: 18px 36px;
  font-size: 18px;
  border-radius: 16px;
  min-width: 200px;
}

/* Secondary Button Styles */
.btn-secondary {
  padding: 12px 24px;
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  color: #8b4513;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(252, 182, 159, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.btn-secondary:hover::before {
  left: 100%;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(252, 182, 159, 0.4);
}

/* Success Button Styles */
.btn-success {
  padding: 12px 24px;
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  color: #2d5a27;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(168, 237, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(168, 237, 234, 0.4);
}

/* Danger Button Styles */
.btn-danger {
  padding: 12px 24px;
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
  color: #8b1538;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(255, 154, 158, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 154, 158, 0.4);
}

/* Outline Button Styles */
.btn-outline {
  padding: 12px 24px;
  background: transparent;
  color: #667eea;
  border: 2px solid #667eea;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-outline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.btn-outline:hover::before {
  width: 100%;
}

.btn-outline:hover {
  color: white;
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Button Group Styles */
.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-group .btn-primary,
.btn-group .btn-secondary,
.btn-group .btn-outline {
  margin: 0;
}

/* Responsive Button Styles */
@media (max-width: 768px) {
  .btn-primary,
  .btn-secondary,
  .btn-outline {
    width: 100%;
    justify-content: center;
  }
  
  .btn-group {
    flex-direction: column;
  }
  
  .btn-large {
    padding: 16px 32px;
    font-size: 16px;
  }
}