/* Dark theme for Claude Code Monitor */

:root {
  --bg-dark: #0a0e27;
  --bg-card: #1a1e3f;
  --bg-card-hover: #232850;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --border-color: #2a2e4f;

  --cyan: #00d9ff;
  --green: #00ff88;
  --magenta: #ff00ff;
  --yellow: #ffdd00;
  --blue: #4080ff;
  --gray: #808080;
}

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

body {
  font-family: 'Courier New', monospace;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background-color: var(--bg-card);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border-color);
}

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

.logo {
  font-size: 2rem;
}

.title {
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.reset-button {
  background-color: #2a3f5f;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  transition: all 0.2s;
}

.reset-button:hover {
  background-color: #3a4f6f;
  border-color: var(--cyan);
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 4px;
}

.connection-status.connected {
  background-color: rgba(0, 255, 136, 0.1);
}

.connection-status.disconnected {
  background-color: rgba(255, 68, 68, 0.1);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.connected .status-dot {
  background-color: var(--green);
}

.disconnected .status-dot {
  background-color: #ff4444;
}

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

.status-text {
  font-size: 0.85rem;
  font-weight: bold;
  letter-spacing: 0.05em;
}

.connected .status-text {
  color: var(--green);
}

.disconnected .status-text {
  color: #ff4444;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem;
  max-width: 1800px;
  margin: 0 auto;
  width: 100%;
}

/* Statistics Grid */
.statistics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 1200px) {
  .statistics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .statistics-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background-color: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s;
}

.stat-card:hover {
  background-color: var(--bg-card-hover);
  transform: translateY(-2px);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: bold;
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
}

.stat-value {
  font-size: 3rem;
  font-weight: bold;
}

.stat-value.cyan {
  color: var(--cyan);
}

.stat-value.green {
  color: var(--green);
}

.stat-value.magenta {
  color: var(--magenta);
}

.stat-value.yellow {
  color: var(--yellow);
}

/* Event Feed Container */
.event-feed-container {
  background-color: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1rem 0 1rem;
  background-color: var(--bg-dark);
}

.tab {
  background-color: transparent;
  color: var(--text-secondary);
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.8rem 1.5rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  transition: all 0.2s;
}

.tab.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
  background-color: var(--bg-card);
}

.tab:hover:not(.active) {
  color: var(--text-primary);
}

/* Filter Buttons */
.filter-buttons {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  background-color: var(--bg-dark);
  border-top: 1px solid var(--border-color);
}

.filter-button {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  transition: all 0.2s;
}

.filter-button:hover {
  border-color: var(--cyan);
  color: var(--text-primary);
}

.filter-button.active {
  background-color: var(--cyan);
  color: var(--bg-dark);
  border-color: var(--cyan);
}

/* Event Feed */
.event-feed {
  height: 600px;
  overflow-y: auto;
  padding: 1rem;
}

.event-feed::-webkit-scrollbar {
  width: 8px;
}

.event-feed::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

.event-feed::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.event-feed::-webkit-scrollbar-thumb:hover {
  background: var(--cyan);
}

/* Event Card */
.event-card {
  background-color: var(--bg-dark);
  border-left: 4px solid var(--border-color);
  border-radius: 4px;
  padding: 1rem;
  margin-bottom: 0.8rem;
  transition: all 0.2s;
}

.event-card:hover {
  background-color: #121633;
  transform: translateX(4px);
}

.event-card.cyan-border {
  border-left-color: var(--cyan);
}

.event-card.green-border {
  border-left-color: var(--green);
}

.event-card.blue-border {
  border-left-color: var(--blue);
}

.event-card.magenta-border {
  border-left-color: var(--magenta);
}

.event-card.yellow-border {
  border-left-color: var(--yellow);
}

.event-card.gray-border {
  border-left-color: var(--gray);
}

.event-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.8rem;
  font-size: 0.85rem;
}

.event-type {
  font-weight: bold;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

.event-type.cyan {
  background-color: rgba(0, 217, 255, 0.15);
  color: var(--cyan);
}

.event-type.green {
  background-color: rgba(0, 255, 136, 0.15);
  color: var(--green);
}

.event-type.blue {
  background-color: rgba(64, 128, 255, 0.15);
  color: var(--blue);
}

.event-type.magenta {
  background-color: rgba(255, 0, 255, 0.15);
  color: var(--magenta);
}

.event-type.yellow {
  background-color: rgba(255, 221, 0, 0.15);
  color: var(--yellow);
}

.event-tool {
  background-color: rgba(128, 128, 128, 0.15);
  color: var(--text-primary);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-weight: bold;
}

.event-timestamp {
  margin-left: auto;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.event-body {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.event-status {
  flex-shrink: 0;
}

.status-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
  font-weight: bold;
}

.status-icon.success {
  background-color: rgba(0, 255, 136, 0.2);
  color: var(--green);
}

.status-icon.error {
  background-color: rgba(255, 68, 68, 0.2);
  color: #ff4444;
}

.status-icon.pending {
  background-color: rgba(0, 217, 255, 0.2);
  color: var(--cyan);
}

.event-command {
  flex: 1;
  background-color: rgba(0, 0, 0, 0.3);
  padding: 0.6rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  overflow-x: auto;
}

.event-command code {
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-all;
}

.event-description {
  flex: 1;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-style: italic;
}

/* Loading and Empty States */
.loading,
.loading-more,
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

.loading {
  font-size: 1.1rem;
}

.loading-more {
  font-size: 0.9rem;
  padding: 1rem;
}

.empty-state {
  padding: 4rem 2rem;
}

.empty-state p {
  margin-bottom: 0.5rem;
}

.empty-hint {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
