/*

  :: X86 NETWORK :: SYSTEM v2.0
  
  TERMINAL INTERFACE DESIGN SYSTEM
  NO GRADIENTS. ONLY SIGNAL.
  
  COLOR PALETTE:
  ████ Background:    #050505
  ████ Foreground:    #ff3333 (CRITICAL RED)
  ████ Secondary:     #ff6b00 (AMBER ALERT)
  ████ Tertiary:      #00d4ff (STATUS CYAN)
  ████ Text:          #e0e0e0 (PHOSPHOR WHITE)
  ████ Dim:           #404040 (SHADOW GRAY)

*/

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

:root {
  --bg: #050505;
  --bg-panel: #0a0a0a;
  --bg-sub: #111111;
  
  --red: #ff3333;
  --red-glow: rgba(255, 51, 51, 0.4);
  --red-dim: #cc0000;
  
  --amber: #ff6b00;
  --amber-glow: rgba(255, 107, 0, 0.4);
  
  --cyan: #00d4ff;
  --cyan-glow: rgba(0, 212, 255, 0.4);
  
  --text: #e0e0e0;
  --text-dim: #808080;
  --text-faint: #404040;
  
  --border: #1a1a1a;
  --border-bright: #333333;
  
  --font-mono: 'Fira Code', 'Space Mono', monospace;
  
  --scan-line: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 51, 51, 0.03) 2px,
    rgba(255, 51, 51, 0.03) 4px
  );
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Terminal Scanline Effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--scan-line);
  pointer-events: none;
  z-index: 9999;
  opacity: 0.5;
}

/* Header Bar - Like a terminal window chrome */
.system-bar {
  background: var(--bg-sub);
  border-bottom: 1px solid var(--red);
  padding: 8px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.system-bar .system-id {
  color: var(--red);
  font-weight: 700;
}

.system-bar .system-status {
  color: var(--text-dim);
}

.system-bar .status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  margin-right: 8px;
  animation: blink 1s infinite;
}

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

/* Main Navigation - Command Line Style */
.terminal-nav {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-bright);
  padding: 0 24px;
}

.terminal-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  min-height: 60px;
}

.nav-prompt {
  color: var(--red);
  margin-right: 16px;
  font-weight: 700;
  user-select: none;
}

.nav-commands {
  display: flex;
  gap: 0;
  list-style: none;
  flex: 1;
}

.nav-commands li {
  position: relative;
}

.nav-commands a {
  display: block;
  padding: 20px 24px;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
  border-right: 1px solid var(--border);
  transition: all 0.1s ease;
  position: relative;
}

.nav-commands a::before {
  content: './';
  color: var(--text-faint);
  margin-right: 4px;
}

.nav-commands a:hover,
.nav-commands a.active {
  background: var(--bg-sub);
  color: var(--red);
}

.nav-commands a:hover::after,
.nav-commands a.active::after {
  content: '_';
  position: absolute;
  right: 8px;
  animation: cursor-blink 1s infinite;
}

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

/* Terminal Window Component */
.terminal-window {
  background: var(--bg-panel);
  border: 1px solid var(--border-bright);
  margin: 2px;
  position: relative;
  overflow: hidden;
}

.terminal-window::before {
  content: attr(data-title);
  display: block;
  background: var(--border);
  padding: 8px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-bright);
}

.terminal-window.red-border {
  border-color: var(--red);
}

.terminal-window.red-border::before {
  background: var(--red);
  color: var(--bg);
  font-weight: 700;
}

.terminal-body {
  padding: 24px;
}

/* ASCII Hero Section */
.hero-terminal {
  padding: 80px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.hero-ascii {
  color: var(--red);
  font-size: 10px;
  line-height: 1.2;
  margin-bottom: 40px;
  opacity: 0.8;
  letter-spacing: 0;
}

.hero-content {
  width: 100%;
}

.hero-line {
  display: block;
  margin-bottom: 8px;
}

.hero-line .prompt {
  color: var(--red);
  margin-right: 16px;
}

.hero-line .cmd {
  color: var(--cyan);
}

.hero-line .arg {
  color: var(--amber);
}

.hero-main-text {
  font-size: clamp(24px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  margin: 40px 0;
  color: var(--text);
}

.hero-main-text .highlight {
  color: var(--red);
  text-shadow: 0 0 20px var(--red-glow);
}

/* Typing Effect */
.typing-cursor::after {
  content: '█';
  animation: cursor 1s infinite;
  color: var(--red);
  margin-left: 4px;
}

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

/* Command Buttons */
.terminal-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: transparent;
  border: 1px solid var(--text-dim);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.1s ease;
  position: relative;
  margin-top: 24px;
}

.terminal-btn::before {
  content: '>_';
  color: var(--red);
}

.terminal-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(255, 51, 51, 0.05);
}

.terminal-btn.primary {
  border-color: var(--red);
  background: var(--red);
  color: var(--bg);
}

.terminal-btn.primary:hover {
  background: var(--red-dim);
  border-color: var(--red-dim);
}

/* Data Grid */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border-bright);
}

.data-cell {
  background: var(--bg-panel);
  padding: 32px;
  position: relative;
}

.data-cell.header-cell {
  background: var(--red);
  color: var(--bg);
}

.data-cell.cyan-accent {
  border-left: 4px solid var(--cyan);
}

.data-cell.amber-accent {
  border-left: 4px solid var(--amber);
}

.data-cell.red-accent {
  border-left: 4px solid var(--red);
}

.cell-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-faint);
  margin-bottom: 16px;
  display: block;
}

.cell-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
}

.cell-desc {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 8px;
  line-height: 1.5;
}

.cell-cta {
  margin-top: 24px;
  display: inline-block;
  color: var(--red);
  text-decoration: none;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.1s ease;
}

.cell-cta:hover {
  border-bottom-color: var(--red);
}

/* Service Modules */
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
}

.module {
  background: var(--bg-panel);
  padding: 40px;
  position: relative;
  transition: all 0.15s ease;
}

.module:hover {
  background: var(--bg-sub);
}

.module-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.module-id {
  font-size: 10px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.module-status {
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--red-glow);
}

.module-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.module-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}

.module-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  color: var(--cyan);
  text-decoration: none;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.module-link::after {
  content: '→';
  transition: transform 0.1s ease;
}

.module-link:hover::after {
  transform: translateX(4px);
}

/* Terminal Log / Marquee */
.system-log {
  background: var(--bg-sub);
  border-top: 1px solid var(--border-bright);
  border-bottom: 1px solid var(--border-bright);
  padding: 12px 24px;
  overflow: hidden;
  white-space: nowrap;
}

.log-content {
  display: inline-block;
  animation: scroll-left 30s linear infinite;
  font-size: 12px;
  color: var(--text-dim);
}

.log-entry {
  display: inline-block;
  margin-right: 48px;
}

.log-entry .timestamp {
  color: var(--text-faint);
  margin-right: 12px;
}

.log-entry .level-info { color: var(--cyan); }
.log-entry .level-warn { color: var(--amber); }
.log-entry .level-err { color: var(--red); }

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Footer Terminal */
.terminal-footer {
  background: var(--bg-panel);
  border-top: 1px solid var(--border-bright);
  padding: 60px 24px;
}

.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 48px;
}

.footer-section h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--red);
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.footer-section p,
.footer-section a {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  line-height: 1.8;
}

.footer-section a:hover {
  color: var(--red);
}

.footer-meta {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .system-bar { flex-direction: column; gap: 8px; text-align: center; }
  .nav-commands { flex-wrap: wrap; }
  .nav-commands a { padding: 12px 16px; border-bottom: 1px solid var(--border); border-right: none; }
  .hero-ascii { font-size: 6px; }
  .data-grid { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* Selection Color */
::selection {
  background: var(--red);
  color: var(--bg);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 12px;
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-bright);
  border: 2px solid var(--bg);
}

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