:root {
  --bg-color: #0f172a;
  --card-bg: #1e293b;
  --card-hover: #2dd4bf11;
  --card-border: #334155;
  --card-border-hover: #2dd4bf;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #2dd4bf;
  --accent-hover: #14b8a6;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
}

.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.dashboard-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  margin: 0;
  font-size: 2.25rem;
  color: var(--text-main);
  letter-spacing: -0.75px;
}

.subtitle {
  margin: 0.25rem 0 0 0;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
}

.header-actions {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.refresh-btn, .ai-btn {
  background-color: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.refresh-btn {
  background-color: rgba(45, 212, 191, 0.1);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 15px rgba(45, 212, 191, 0.1);
}

.refresh-btn:hover:not(:disabled) {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #0f172a;
  box-shadow: 0 0 20px rgba(45, 212, 191, 0.3);
}

.ai-btn {
  background-color: rgba(139, 92, 246, 0.1);
  border-color: #8b5cf6;
  color: #c4b5fd;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.1);
}

.ai-btn:hover:not(:disabled) {
  background-color: #8b5cf6;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.refresh-btn:disabled, .ai-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ai-analysis-panel {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  border: 1px solid #8b5cf6;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
}

.ai-analysis-panel h2 {
  margin-top: 0;
  color: #c4b5fd;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.3);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.analysis-content {
  line-height: 1.6;
  color: #e2e8f0;
  white-space: pre-wrap;
}

.analyzing-text {
  color: #a78bfa;
  font-style: italic;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.loading-state, .error-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 1.1rem;
  background-color: var(--card-bg);
  border-radius: 8px;
  border: 1px dashed var(--card-border);
}

.service-group {
  margin-bottom: 3rem;
}

.group-title {
  font-size: 1.25rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 0.5rem;
}

.service-grid {
  display: grid;
  gap: 1.25rem;
  width: 100%;
}

/* 4 Columns for Large Desktops */
@media (min-width: 1200px) {
  .service-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 3 Columns for Standard Desktops */
@media (min-width: 900px) and (max-width: 1199px) {
  .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 2 Columns for Tablets */
@media (min-width: 601px) and (max-width: 899px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 1-2 Columns for Mobile */
@media (max-width: 600px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .service-card {
    padding: 1rem;
  }
  
  .service-name {
    font-size: 0.95rem;
  }
}

.service-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-2px);
  border-color: var(--card-border-hover);
  background-color: var(--card-hover);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.service-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  min-width: 0;
  width: 100%;
}

.service-icon {
  width: 20px;
  height: 20px;
  margin-right: 0.75rem;
  filter: invert(1) brightness(2);
  flex-shrink: 0;
}

.service-icon-placeholder {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--accent);
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.service-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.service-description {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-all;
  min-width: 0;
}