@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

/* --- Base Styles --- */
body {
  background: #020a18;
  color: #84cfff;
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  margin: 0;
  padding: 0;
  background-color: #010611;
  position: relative;
  overflow-x: hidden;
}

/* --- Animated CRT Scan Lines Background --- */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(100, 180, 255, 0.06) 0px,
    rgba(100, 180, 255, 0.06) 3px,
    transparent 3px,
    transparent 8px
  );  
  z-index: -1;
  animation: scanlines 8s linear infinite;
}

@keyframes scanlines {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(100px);
  }
}

/* --- CRT Flicker Effect --- */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 30, 60, 0.02);
  opacity: 0;
  z-index: 1000;
  pointer-events: none;
  animation: flicker 0.3s infinite alternate-reverse;
}

@keyframes flicker {
  0% { opacity: 0; }
  5% { opacity: 0.1; }
  10% { opacity: 0; }
  15% { opacity: 0; }
  20% { opacity: 0.1; }
  25% { opacity: 0; }
  30% { opacity: 0; }
  35% { opacity: 0; }
  40% { opacity: 0.1; }
  45% { opacity: 0; }
  50% { opacity: 0.1; }
  55% { opacity: 0; }
  60% { opacity: 0; }
  65% { opacity: 0; }
  70% { opacity: 0.1; }
  75% { opacity: 0; }
  80% { opacity: 0; }
  85% { opacity: 0.1; }
  90% { opacity: 0; }
  95% { opacity: 0; }
  100% { opacity: 0.1; }
}

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #030e1e;
  color: #33c3ff;
  padding: 8px 20px;
  font-size: 12px;
  text-transform: uppercase;
  border-bottom: 2px solid #33c3ff55;
  box-shadow: 0 2px 10px rgba(0,255,255,0.15);
  z-index: 1000;
}

/* --- Animated LED --- */
.led {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: 6px;
}

.led.blue {
  background-color: #33c3ff;
  box-shadow: 0 0 10px #33c3ff;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; box-shadow: 0 0 10px #33c3ff; }
  50% { opacity: 0.6; box-shadow: 0 0 5px #33c3ff; }
  100% { opacity: 1; box-shadow: 0 0 10px #33c3ff; }
}

/* --- Blinking Block Character Animation --- */
.block-char {
  display: inline-block;
  animation: blink-block 1.5s step-end infinite;
}

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

/* --- Terminal Panel Animation --- */
.terminal-panel {
  background: #010f1d;
  border: 2px solid #21759b;
  box-shadow: 0 0 15px rgba(0, 128, 255, 0.15);
  border-radius: 4px;
  padding: 10px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.terminal-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #33c3ff, transparent);
  animation: scan 6s linear infinite;
  z-index: 1;
}

@keyframes scan {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.panel-header {
  font-size: 12px;
  color: #33c3ff;
  border-bottom: 1px solid #104060;
  margin-bottom: 6px;
  padding-bottom: 3px;
  text-transform: uppercase;
  animation: header-glow 5s infinite;
}

@keyframes header-glow {
  0%, 100% { color: #33c3ff; }
  50% { color: #69d6ff; }
}

.panel-body {
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.cursor {
  display: inline-block;
  width: 10px;
  animation: blink 1s step-start infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* --- Layout Grid --- */
.grid-container {
  max-width: 1300px;
  margin: 80px auto 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.top-row {
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.system-panel {
  flex: 2;
}

.changelog-panel {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.journal-panel {
  height: 521px; /* or whatever height fits your design */
  display: flex;
  flex-direction: column;
}

.journal-scroll {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.journal-scroll::-webkit-scrollbar {
  width: 6px;
}

.journal-scroll::-webkit-scrollbar-thumb {
  background-color: #21759b;
  border-radius: 10px;
}

.bottom-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.sidebar-pic img {
  width: 100px;
  height: 100px;
  border: 2px solid #33c3ff66;
  border-radius: 4px;
}

.button-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.button-box a {
  background: #03182c;
  color: #69d6ff;
  padding: 6px 8px;
  text-decoration: none;
  border: 1px solid #21759b;
  border-radius: 3px;
  text-align: center;
  font-size: 13px;
  transition: background 0.2s;
}

.button-box a:hover {
  background: #044066;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(51, 195, 255, 0.5);
}

.footer {
  margin-top: 40px;
  font-size: 11px;
  text-align: center;
  color: #779;
  font-style: italic;
  width: 100%;
}

@media (max-width: 1000px) {
  .top-row {
    flex-direction: column;
  }
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 340px 1fr 340px;
  gap: 20px;
  max-width: 1400px;
  margin: 80px auto 20px auto;
  padding: 0 20px;
  align-items: start;
}

.left-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.main-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.changelog-panel {
  max-height: 840px;
  min-height: 750px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.changelog-scroll {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 10px;
  direction: rtl;
}

.version {
  margin-bottom: 10px;
}

.version-header {
  color: #69d6ff;
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 13px;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(105, 214, 255, 0.4);
}

.changelog-scroll hr {
  border: none;
  border-top: 1px solid #114060;
  margin: 10px 0;
}

.small-font-art {
  font-size: 6px;
  line-height: 6px;
  overflow: hidden;
  padding: 5px 5px;
  text-align: center;
  white-space: pre;
  animation: ascii-glow 8s infinite;
}

@keyframes ascii-glow {
  0%, 100% { color: #84cfff; }
  50% { color: #a0ddff; }
}

/* --- Startup animation --- */
@keyframes startup {
  0% { opacity: 0; transform: translateY(5px); }
  100% { opacity: 1; transform: translateY(0); }
}

.terminal-panel {
  animation: startup 0.8s ease-out forwards;
}

.left-sidebar .terminal-panel:nth-child(1) { animation-delay: 0.1s; }
.left-sidebar .terminal-panel:nth-child(2) { animation-delay: 0.2s; }
.left-sidebar .terminal-panel:nth-child(3) { animation-delay: 0.3s; }
.main-column .terminal-panel:nth-child(1) { animation-delay: 0.4s; }
.main-column .terminal-panel:nth-child(2) { animation-delay: 0.5s; }
.changelog-panel { animation-delay: 0.6s; }