* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background: #0f172a;
  color: #e0e0e0;
  margin: 0;
  padding: 20px;
  line-height: 1.6;
}

.app {
  max-width: 1000px;
  margin: auto;
}

.header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
}

.header h1 {
  margin: 0;
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
}

.subtitle {
  color: #94a3b8;
  font-size: 1.1rem;
  margin-top: 8px;
}

.card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  padding: 24px;
  border-radius: 12px;
  margin: 20px 0;
  border: 1px solid #334155;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

textarea {
  width: 100%;
  height: 200px;
  padding: 16px;
  border-radius: 8px;
  border: 2px solid #334155;
  background: #0f172a;
  color: #fff;
  font-family: 'Fira Code', monospace;
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.3s;
}

textarea:focus {
  outline: none;
  border-color: #3b82f6;
}

.editor-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  padding: 12px 20px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

button:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Stats Grid */
.stats-grid, .insights-grid, .social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.stats-grid li, .insight-box, .social-box {
  background: #1a2332;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #3b82f6;
}

.stats-grid li {
  list-style: none;
  display: flex;
  justify-content: space-between;
}

.insight-label, .social-name {
  font-size: 0.9rem;
  color: #94a3b8;
  font-weight: 500;
  margin-bottom: 5px;
}

.insight-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #3b82f6;
}

.social-count {
  font-size: 1.2rem;
  color: #60a5fa;
  margin: 8px 0;
}

small {
  display: block;
  color: #64748b;
  font-size: 0.8rem;
  margin-top: 5px;
}

/* Keyword Density */
.keyword-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.keyword-item {
  background: #1a2332;
  padding: 10px;
  border-radius: 6px;
  text-align: center;
  border: 1px solid #334155;
}

.keyword-word {
  font-weight: 600;
  color: #fff;
  margin-bottom: 5px;
}

.keyword-percent {
  color: #60a5fa;
  font-size: 0.9rem;
}

.empty-state {
  color: #64748b;
  text-align: center;
  padding: 20px;
  grid-column: 1 / -1;
}

/* Progress Bars */
.progress-bar {
  width: 100%;
  height: 6px;
  background: #334155;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.progress {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  transition: width 0.3s;
}

/* Recommendations */
.recommendations-list {
  list-style: none;
  padding: 0;
  margin: 15px 0;
}

.rec-item {
  padding: 12px;
  margin: 8px 0;
  border-radius: 6px;
  border-left: 4px solid;
  display: flex;
  align-items: center;
}

.rec-item.success {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
  color: #86efac;
}

.rec-item.warning {
  background: rgba(250, 204, 21, 0.1);
  border-color: #facc15;
  color: #fef08a;
}

.rec-item.danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #fca5a5;
}

.rec-item.neutral {
  background: rgba(148, 163, 184, 0.1);
  border-color: #94a3b8;
  color: #cbd5e1;
}

.rec-item::before {
  content: '• ';
  margin-right: 8px;
  font-weight: bold;
}

/* History */
.history ul {
  list-style: none;
  padding: 0;
}

.history li {
  background: #1a2332;
  margin: 8px 0;
  padding: 10px;
  border-radius: 6px;
  border-left: 3px solid #3b82f6;
  font-size: 0.9rem;
  color: #cbd5e1;
}

/* Ad Space */
.ad-space {
  margin: 30px 0;
  padding: 20px;
  background: #1a2332;
  border-radius: 12px;
  border: 1px dashed #334155;
  text-align: center;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  color: #64748b;
  border-top: 1px solid #334155;
}

/* Responsive */
@media (max-width: 768px) {
  .header h1 {
    font-size: 1.8rem;
  }
  
  .stats-grid, .insights-grid, .social-grid {
    grid-template-columns: 1fr;
  }
  
  .editor-actions {
    flex-direction: column;
  }
  
  button {
    width: 100%;
  }
}


