/* mohamed.tech - main dashboard styles */

:root {
  --bg: #000000;
  --bg-tile: #0a0a0a;
  --border-soft: rgba(255,255,255,0.06);
  --text-primary: #ffffff;
  --text-muted: rgba(255,255,255,0.45);
  --text-dim: rgba(255,255,255,0.35);
  --accent-yellow: #FAC775;
}

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

html, body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ───────── Layout ───────── */

.mt-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 28px 48px;
}

@media (max-width: 768px) {
  .mt-shell { padding: 20px 16px 32px; }
}

/* ───────── Header ───────── */

.mt-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 18px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap;
  gap: 16px;
}

.mt-title {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.mt-subtitle {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
}

.mt-header-right {
  text-align: right;
  font-size: 10px;
  letter-spacing: 0.2em;
}

.mt-tag {
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.mt-tag-live {
  color: var(--accent-yellow);
}

/* ───────── Dots & animations ───────── */

.mt-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent-yellow);
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 4px;
  animation: blink-dot 1.4s ease-in-out infinite;
}

.mt-dot-dark {
  background: #0d1a02;
  width: 5px;
  height: 5px;
  margin-right: 3px;
}

@keyframes blink-dot {
  0%, 70% { opacity: 1; }
  71%, 100% { opacity: 0.15; }
}

@keyframes lcd-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.94; }
  51% { opacity: 1; }
}

@keyframes backlight-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}

@keyframes scan-line {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ───────── Clocks ───────── */

.mt-clocks {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 32px;
}

@media (max-width: 900px) {
  .mt-clocks { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 500px) {
  .mt-clocks { grid-template-columns: repeat(2, 1fr); }
}

.mt-clock {
  background: var(--bg-tile);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 8px 10px;
  text-align: center;
}

.mt-clock-ist {
  border-color: rgba(250,199,117,0.3);
}

.mt-clock-label {
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.mt-clock-ist .mt-clock-label {
  color: var(--accent-yellow);
}

.lcd-clock-panel {
  padding: 5px 8px 4px !important;
  margin-top: 0 !important;
}

.lcd-clock {
  font-family: 'DSEG7-Italic', 'Share Tech Mono', monospace;
  font-weight: 700;
  font-size: 16px;
  color: #0d1a02;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
}

/* ───────── Grid header ───────── */

.mt-grid-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mt-label-tiny {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ───────── Signal grid ───────── */

.mt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

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

.mt-tile {
  background: var(--bg-tile);
  border: 1px solid var(--border-soft);
  border-top: 1px solid; /* color set inline */
  border-radius: 4px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  display: block;
  transition: transform 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}

.mt-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.15);
}

.mt-tile:hover .mt-scan { opacity: 1; }
.mt-tile:hover .mt-detail-arrow { transform: translateX(4px); opacity: 1; }

.mt-scan {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  opacity: 0;
  animation: scan-line 2s linear infinite;
  pointer-events: none;
}

.mt-tile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  gap: 8px;
}

.mt-num {
  font-size: 11px;
  color: var(--text-muted);
}

.mt-label-sector {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  flex: 1;
  text-align: center;
}

/* ───── Status badges ───── */

.mt-status-badge {
  font-size: 8px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 2px;
  border: 1px solid currentColor;
  font-family: 'Share Tech Mono', monospace;
  white-space: nowrap;
  cursor: help;
}

.mt-badge-live {
  color: #97C459;
  background: rgba(151,196,89,0.08);
}
.mt-badge-live::before {
  content: '● ';
  animation: blink-dot 1.4s ease-in-out infinite;
}

.mt-badge-baseline {
  color: #FAC775;
  background: rgba(250,199,117,0.06);
  border-style: dashed;
}

.mt-badge-stale {
  color: #FAC775;
  background: rgba(250,199,117,0.08);
}

.mt-badge-curated {
  color: #7F77DD;
  background: rgba(127,119,221,0.08);
}

.mt-badge-boot {
  color: #D4537E;
  background: rgba(212,83,126,0.08);
}

.mt-badge-error,
.mt-badge-unknown {
  color: #D85A30;
  background: rgba(216,90,48,0.08);
}

.mt-badge-loading {
  color: var(--text-dim);
  border-color: var(--text-dim);
}

/* ───────── LCD panel ───────── */

.lcd-panel {
  position: relative;
  background: #b8c47a;
  border-radius: 3px;
  padding: 10px 14px 8px;
  margin-top: 14px;
  border: 1px solid rgba(0,0,0,0.4);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.35), inset 0 -1px 2px rgba(255,255,255,0.25);
  animation: backlight-pulse 4s ease-in-out infinite;
  overflow: hidden;
}

.lcd-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, transparent 35%, transparent 65%, rgba(0,0,0,0.1) 100%);
  pointer-events: none;
}

.lcd-digits {
  font-family: 'DSEG7-Italic', 'Share Tech Mono', monospace;
  font-weight: 700;
  font-size: 38px;
  color: #0d1a02;
  letter-spacing: 0.02em;
  line-height: 1;
  position: relative;
  display: inline-block;
  animation: lcd-flicker 6s ease-in-out infinite;
}

.lcd-unit {
  font-size: 14px;
  color: #0d1a02;
  opacity: 0.75;
  margin-left: 4px;
  font-family: 'Share Tech Mono', monospace;
  font-weight: 400;
}

.lcd-meta {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: rgba(13,26,2,0.6);
  letter-spacing: 0.12em;
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  text-transform: uppercase;
  font-weight: 700;
}

/* ───────── Tile footer ───────── */

.mt-tile-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.mt-source-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 85%;
}

.mt-detail-arrow {
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.5;
  transition: all 0.3s ease;
}

/* ───────── Footer ───────── */

.mt-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
