@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

:root {
  --bg: #000000;
  --bg-widget: #0a0a0a;
  --orange: #ff6600;
  --orange-dim: #883300;
  --magenta: #aa8844;
  --magenta-dim: #554422;
  --yellow: #ffff00;
  --yellow-dim: #888800;
  --red: #ff0000;
  --white: #ffffff;
  --grey: #888888;
  --grey-dim: #444444;
}

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

body {
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg);
  color: var(--orange);
  font-size: 14px;
  line-height: 1.3;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

.terminal-window {
  background: var(--bg);
}

.title-bar {
  background: var(--orange);
  color: var(--bg);
  padding: 4px 8px;
  font-weight: bold;
  font-size: 12px;
}

.title-bar .title-text {
  letter-spacing: 1px;
}

.title-bar .title-text.mobile {
  display: none;
}

.sunrise-art {
  font-size: 10px;
  color: var(--orange);
  white-space: pre;
  line-height: 1.1;
  padding: 8px;
  text-align: center;
  opacity: 0.8;
  overflow-x: auto;
  display: block;
  margin: 0 auto;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--grey-dim);
  border: 1px solid var(--orange-dim);
  margin-top: 1px;
}

.widget {
  background: var(--bg-widget);
  padding: 12px;
  border: 1px solid var(--grey-dim);
  grid-column: span 2;
}

.widget.half {
  grid-column: span 1;
}

.widget-title {
  font-size: 10px;
  color: var(--magenta);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.widget-value {
  font-size: 24px;
  font-weight: bold;
  color: var(--orange);
  text-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
}

.widget-value.accent {
  color: var(--yellow);
  text-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
}

.progress-bar {
  flex: 1;
  height: 20px;
  background: var(--grey-dim);
  position: relative;
  max-width: 200px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--yellow));
  transition: width 0.3s ease;
}

.mini-bar {
  display: flex;
  gap: 2px;
  margin-top: 6px;
}

.mini-bar-cell {
  width: 12px;
  height: 12px;
  background: var(--grey-dim);
}

.mini-bar-cell.active {
  background: var(--orange);
}

.mini-bar-cell.success {
  background: var(--yellow);
}

.section {
  margin-top: 1px;
}

.wide-bar {
  margin-top: 1px;
  background: var(--bg-widget);
  border: 1px solid var(--grey-dim);
  padding: 12px;
}

.wide-bar-header {
  font-size: 10px;
  color: var(--magenta);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.wide-bar-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wide-bar-value {
  font-size: 16px;
  font-weight: bold;
  color: var(--orange);
}

.thirty-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.thirty-bar-cell {
  width: 16px;
  height: 16px;
  background: var(--grey-dim);
}

.widget .thirty-bar {
  gap: 1px;
  justify-content: flex-start;
  min-height: 60px;
  width: 100%;
}

.widget .thirty-bar-cell {
  flex-shrink: 0;
}

.thirty-bar-cell.success {
  background: var(--orange);
}

.thirty-bar-cell.fail {
  background: var(--red);
  opacity: 0.5;
}

.thirty-bar-cell.empty {
  background: var(--bg);
  border: 1px solid var(--grey-dim);
}

.section-title {
  font-size: 11px;
  color: var(--magenta);
  padding: 6px 8px;
  background: var(--bg-widget);
  border: 1px solid var(--grey-dim);
  border-bottom: none;
}

.section-title.mobile {
  display: none;
}

.section-title.desktop {
  display: block;
}

.chart-wrapper {
  background: var(--bg-widget);
  border: 1px solid var(--grey-dim);
  padding: 12px;
  height: 180px;
  padding-right: 20px;
}

.chart-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
}

.log-container {
  background: var(--bg-widget);
  border: 1px solid var(--grey-dim);
  padding: 8px;
  max-height: 150px;
  overflow-y: auto;
  font-size: 12px;
}

.log-entry {
  display: flex;
  padding: 3px 0;
  border-bottom: 1px solid var(--grey-dim);
}

.log-entry:last-child {
  border-bottom: none;
}

.log-entry:hover {
  background: rgba(255, 0, 255, 0.1);
}

.log-date {
  color: var(--grey);
  min-width: 90px;
}

.log-time {
  color: var(--orange);
  font-weight: bold;
}

.log-status {
  margin-left: auto;
  font-size: 10px;
}

.log-status.success {
  color: var(--orange);
}

.log-status.fail {
  color: var(--red);
}

.status-bar {
  margin-top: 1px;
  background: var(--magenta-dim);
  color: var(--white);
  padding: 4px 8px;
  font-size: 11px;
  display: flex;
}

.blinking {
  animation: blink 1s step-end infinite;
  margin-left: 4px;
}

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

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--grey-dim);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--orange-dim);
}

@media (max-width: 600px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .bento-grid .widget {
    grid-column: span 1 !important;
  }
  
  .bento-grid .widget.half {
    grid-column: span 1 !important;
  }
  
  .bento-grid .widget.full-mobile {
    grid-column: span 2 !important;
  }
  
  .title-bar, .section-title {
    font-size: 10px;
    padding: 4px 6px;
  }
  
  .title-bar .title-text {
    letter-spacing: 0;
  }
  
  .wide-bar {
    padding: 8px;
  }
  
  .wide-bar-header {
    font-size: 9px;
  }
  
  .wide-bar-value {
    font-size: 14px;
  }
  
  .thirty-bar-cell {
    width: 12px;
    height: 12px;
  }
  
  .sunrise-art {
    display: block;
    font-size: max(5px, 2vw);
    padding: 4px;
    width: 100%;
    white-space: pre;
    overflow-x: hidden;
  }
  
  .title-bar .title-text.desktop {
    display: none;
  }
  
  .title-bar .title-text.mobile {
    display: inline;
  }
  
  .section-title.mobile {
    display: block;
  }
  
  .section-title.desktop {
    display: none;
  }
  
  .chart-wrapper {
    padding: 8px 20px 8px 8px;
    height: 160px;
  }
  
  .widget-value {
    font-size: 16px;
  }
  
  .status-bar {
    font-size: 10px;
  }
}