/* ═════════════════════════════════════════════════════════════════
   CYBERPUNK TERMINAL v2 - Homepage
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  --neon-green: #00ff9f;
  --neon-cyan: #00d4ff;
  --neon-yellow: #f0e130;
  --neon-red: #ff2a6d;
  --neon-purple: #d300c5;
  --neon-orange: #ff6c11;
  --neon-pink: #ff00ff;

  --bg-deep: #050508;
  --bg-primary: #0a0a10;
  --bg-card: #0c0c15;
  --bg-card-hover: #10101c;
  --bg-input: #08080e;

  --border-dim: #15152a;
  --border-glow: rgba(0, 255, 159, 0.12);
  --border-glow-md: rgba(0, 255, 159, 0.25);
  --border-glow-hi: rgba(0, 255, 159, 0.5);

  --text-primary: #b8b8cc;
  --text-dim: #55556a;
  --text-bright: #e0e0f0;

  --color-base-900: #050508;
  --color-base-800: #0a0a10;
  --color-base-700: #10101c;
  --color-base-600: #1a1a2e;
  --color-base-500: #252540;
  --color-base-400: #3a3a55;

  --theme-primary: var(--neon-green);
  --theme-accent: var(--neon-cyan);
  --font-family: 'JetBrains Mono', 'Share Tech Mono', 'Fira Code', monospace;
  --theme-radius: 2px;
  --theme-radius-sm: 0px;
}

/* ─── Global ─── */
* {
  font-family: var(--font-family) !important;
  letter-spacing: 0.5px !important;
}

body {
  background-color: var(--bg-deep) !important;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 255, 159, 0.012) 2px,
      rgba(0, 255, 159, 0.012) 4px
    );
  color: var(--text-primary) !important;
}

/* ─── CRT Scanline overlay ─── */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.08) 0px,
    rgba(0, 0, 0, 0.08) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.4;
}

/* Vignette effect */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.5) 100%);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--neon-green); opacity: 0.5; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-cyan); }

/* ─── Header / Title Bar ─── */
header {
  background: var(--bg-primary) !important;
  border-bottom: 1px solid var(--border-dim) !important;
  box-shadow:
    0 1px 0 var(--border-glow),
    0 2px 15px rgba(0, 255, 159, 0.03),
    inset 0 -1px 0 rgba(0, 255, 159, 0.05) !important;
}

header h1,
header h1 a {
  color: var(--neon-green) !important;
  text-shadow:
    0 0 10px rgba(0, 255, 159, 0.6),
    0 0 30px rgba(0, 255, 159, 0.2),
    0 0 60px rgba(0, 255, 159, 0.1) !important;
  letter-spacing: 5px !important;
  text-transform: uppercase !important;
  font-weight: 600 !important;
}

/* ─── Navigation Tabs ─── */
nav {
  background: var(--bg-primary) !important;
  border-bottom: 1px solid var(--border-dim) !important;
}

nav button {
  color: var(--text-dim) !important;
  border-bottom: 2px solid transparent !important;
  transition: all 0.3s ease !important;
  text-transform: uppercase !important;
  letter-spacing: 3px !important;
  font-size: 0.7rem !important;
  font-weight: 500 !important;
}

nav button:hover {
  color: var(--neon-green) !important;
  border-bottom-color: var(--neon-green) !important;
  text-shadow: 0 0 10px rgba(0, 255, 159, 0.5) !important;
  background: rgba(0, 255, 159, 0.03) !important;
}

nav button[aria-selected="true"] {
  color: var(--neon-green) !important;
  border-bottom-color: var(--neon-green) !important;
  text-shadow: 0 0 10px rgba(0, 255, 159, 0.5) !important;
  background: rgba(0, 255, 159, 0.05) !important;
}

/* ─── Section Headers ─── */
section h2 {
  color: var(--neon-cyan) !important;
  text-transform: uppercase !important;
  letter-spacing: 5px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.4) !important;
  border-left: 3px solid var(--neon-green) !important;
  padding-left: 12px !important;
  position: relative;
}

section h2::after {
  content: "//";
  color: var(--text-dim) !important;
  margin-left: 8px;
  font-weight: 300 !important;
  text-shadow: none !important;
}

/* ─── Service Cards ─── */
.service-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-dim) !important;
  border-radius: 0 !important;
  box-shadow: 0 0 10px rgba(0, 255, 159, 0.02) !important;
  transition: all 0.25s ease !important;
  position: relative;
  overflow: hidden;
}

/* Top neon line on hover */
.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg,
    var(--neon-green),
    var(--neon-cyan),
    var(--neon-purple),
    var(--neon-pink)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Corner brackets decoration */
.service-card::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-top: 1px solid var(--border-dim);
  border-right: 1px solid var(--border-dim);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-card:hover {
  background: var(--bg-card-hover) !important;
  border-color: var(--border-glow-md) !important;
  box-shadow:
    0 0 25px rgba(0, 255, 159, 0.06),
    0 0 2px rgba(0, 255, 159, 0.2),
    inset 0 0 30px rgba(0, 255, 159, 0.02) !important;
  transform: translateY(-1px);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card:hover::after {
  opacity: 1;
}

/* Service status indicators */
.service-card .status {
  color: var(--neon-green) !important;
  text-shadow: 0 0 8px rgba(0, 255, 159, 0.6) !important;
  animation: pulse-green 2s ease-in-out infinite;
}

.service-card .status.error {
  color: var(--neon-red) !important;
  text-shadow: 0 0 8px rgba(255, 42, 109, 0.6) !important;
  animation: pulse-red 1.5s ease-in-out infinite;
}

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

@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Service text */
.service-card h3,
.service-card a {
  color: var(--text-bright) !important;
  transition: color 0.2s, text-shadow 0.2s !important;
}

.service-card:hover h3,
.service-card:hover a {
  color: var(--neon-green) !important;
  text-shadow: 0 0 8px rgba(0, 255, 159, 0.3) !important;
}

.service-card p {
  color: var(--text-dim) !important;
  font-size: 0.65rem !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
}

/* Service icon/abbr */
.service-card .service-icon,
.service-card [class*="abbr"],
.service-card [class*="icon"] {
  color: var(--neon-cyan) !important;
}

/* ─── Widget Cards ─── */
.widget-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-dim) !important;
  border-radius: 0 !important;
  box-shadow: 0 0 10px rgba(0, 255, 159, 0.02) !important;
}

.widget-card h3 {
  color: var(--neon-yellow) !important;
  text-transform: uppercase !important;
  letter-spacing: 3px !important;
  font-size: 0.65rem !important;
  font-weight: 600 !important;
  text-shadow: 0 0 8px rgba(240, 225, 48, 0.3) !important;
}

.widget-card h3::before {
  content: "> ";
  color: var(--neon-green) !important;
  text-shadow: 0 0 6px rgba(0, 255, 159, 0.5) !important;
}

/* ─── Resources Widget ─── */
.resources-widget .resource-item {
  border-bottom: 1px solid var(--border-dim) !important;
  padding: 4px 0 !important;
}

.resources-widget .resource-value {
  color: var(--neon-green) !important;
  font-weight: 500 !important;
}

.resources-widget .resource-label {
  color: var(--text-dim) !important;
  text-transform: uppercase !important;
  font-size: 0.6rem !important;
  letter-spacing: 2px !important;
}

/* Progress bars - neon style */
.resources-widget [class*="progress"],
.resources-widget [class*="bar"],
[class*="bg-theme"] {
  background: var(--bg-input) !important;
  border: 1px solid var(--border-dim) !important;
}

.resources-widget [class*="progress"] > div,
.resources-widget [class*="bar"] > div,
[class*="bg-theme-800"],
[class*="bg-theme-200"] {
  background: linear-gradient(90deg, var(--neon-green), var(--neon-cyan)) !important;
  box-shadow: 0 0 8px rgba(0, 255, 159, 0.4), 0 0 2px rgba(0, 255, 159, 0.6) !important;
}

/* ─── Docker Widget ─── */
.docker-widget .docker-container {
  border-bottom: 1px solid var(--border-dim) !important;
  padding: 5px 0 !important;
}

.docker-widget .docker-container-name {
  color: var(--neon-cyan) !important;
  font-size: 0.7rem !important;
  letter-spacing: 1px !important;
}

.docker-widget .docker-container-name::before {
  content: "$ ";
  color: var(--neon-green) !important;
}

.docker-widget .docker-status {
  color: var(--neon-green) !important;
  font-size: 0.6rem !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
}

.docker-widget .docker-status.error {
  color: var(--neon-red) !important;
}

/* ─── RSS / News Widget ─── */
.rss-widget .rss-item {
  border-bottom: 1px solid rgba(21, 21, 42, 0.5) !important;
  padding: 6px 0 !important;
}

.rss-widget .rss-item a {
  color: var(--neon-cyan) !important;
  font-size: 0.7rem !important;
  transition: all 0.2s ease !important;
  line-height: 1.4 !important;
}

.rss-widget .rss-item a:hover {
  color: var(--neon-green) !important;
  text-shadow: 0 0 8px rgba(0, 255, 159, 0.4) !important;
  padding-left: 4px !important;
}

.rss-widget .rss-source {
  color: var(--neon-yellow) !important;
  font-size: 0.55rem !important;
  opacity: 0.6;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
}

/* ─── Search Widget ─── */
.search-widget input {
  background: var(--bg-input) !important;
  border: 1px solid var(--border-dim) !important;
  color: var(--neon-green) !important;
  font-family: var(--font-family) !important;
  caret-color: var(--neon-green);
  border-radius: 0 !important;
  font-size: 0.75rem !important;
}

.search-widget input:focus {
  border-color: var(--neon-green) !important;
  box-shadow: 0 0 12px rgba(0, 255, 159, 0.15), inset 0 0 6px rgba(0, 255, 159, 0.03) !important;
  outline: none !important;
}

.search-widget input::placeholder {
  color: var(--text-dim) !important;
  font-style: normal !important;
  font-size: 0.7rem !important;
}

/* ─── Greeting / Clock Widget ─── */
.greeting-widget .time {
  color: var(--neon-green) !important;
  text-shadow:
    0 0 15px rgba(0, 255, 159, 0.5),
    0 0 30px rgba(0, 255, 159, 0.2) !important;
  font-size: 2.8rem !important;
  font-weight: 300 !important;
  letter-spacing: 6px !important;
}

.greeting-widget .date {
  color: var(--neon-cyan) !important;
  font-size: 0.7rem !important;
  opacity: 0.7;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
}

.greeting-widget .greeting-text {
  color: var(--text-dim) !important;
  font-size: 0.7rem !important;
  text-transform: uppercase !important;
  letter-spacing: 4px !important;
}

/* Blinking cursor */
.greeting-widget .greeting-text::after {
  content: "_";
  animation: blink-cursor 1s step-end infinite;
  color: var(--neon-green);
  font-weight: 300;
}

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

/* ─── Weather Widget ─── */
.weather-widget .temperature {
  color: var(--neon-green) !important;
  font-size: 2rem !important;
  text-shadow: 0 0 10px rgba(0, 255, 159, 0.3) !important;
}

.weather-widget .weather-description {
  color: var(--text-dim) !important;
  text-transform: uppercase !important;
  letter-spacing: 2px !important;
  font-size: 0.65rem !important;
}

/* ─── Bookmarks ─── */
.bookmark-widget .bookmark-group h3 {
  color: var(--neon-yellow) !important;
}

.bookmark-widget a {
  color: var(--neon-cyan) !important;
  transition: all 0.2s ease !important;
}

.bookmark-widget a:hover {
  color: var(--neon-green) !important;
  text-shadow: 0 0 8px rgba(0, 255, 159, 0.4) !important;
}

.bookmark-widget .bookmark-icon {
  color: var(--neon-green) !important;
  background: rgba(0, 255, 159, 0.05) !important;
  border: 1px solid var(--border-dim) !important;
}

/* ─── Links ─── */
a {
  color: var(--neon-cyan) !important;
  transition: all 0.2s ease !important;
}

a:hover {
  color: var(--neon-green) !important;
  text-shadow: 0 0 6px rgba(0, 255, 159, 0.3) !important;
}

/* ─── Misc ─── */
button {
  border-radius: 0 !important;
}

kbd {
  background: var(--bg-input) !important;
  border: 1px solid var(--border-dim) !important;
  color: var(--neon-green) !important;
  font-family: var(--font-family) !important;
}

footer {
  border-top: 1px solid var(--border-dim) !important;
  color: var(--text-dim) !important;
}

/* ─── Separator lines ─── */
hr,
[class*="border"] {
  border-color: var(--border-dim) !important;
}

/* ─── Tag badges ─── */
.tag,
.badge {
  background: rgba(0, 255, 159, 0.08) !important;
  border: 1px solid var(--border-glow) !important;
  color: var(--neon-green) !important;
  border-radius: 0 !important;
  font-size: 0.6rem !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .greeting-widget .time {
    font-size: 2rem !important;
    letter-spacing: 3px !important;
  }

  section h2 {
    letter-spacing: 3px !important;
    font-size: 0.7rem !important;
  }

  .service-card {
    padding: 6px !important;
  }

  nav button {
    font-size: 0.6rem !important;
    letter-spacing: 2px !important;
  }

  .greeting-widget .greeting-text {
    letter-spacing: 2px !important;
  }
}

/* ─── Flicker animation for title ─── */
@keyframes flicker {
  0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% {
    opacity: 1;
  }
  20%, 21.999%, 63%, 63.999%, 65%, 69.999% {
    opacity: 0.4;
  }
}

header h1 a {
  animation: flicker 8s linear infinite !important;
}

/* ─── Glitch effect on hover for service names ─── */
.service-card:hover .service-name {
  animation: glitch 0.3s ease !important;
}

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 1px); }
  40% { transform: translate(2px, -1px); }
  60% { transform: translate(-1px, -1px); }
  80% { transform: translate(1px, 1px); }
  100% { transform: translate(0); }
}
