/* =========================================
   NEO DOMINION // LOG INDEX
   Standalone archive styling
========================================= */

:root {
  --bg: #020308;
  --bg-elevated: rgba(8, 12, 18, 0.78);
  --panel: rgba(5, 7, 12, 0.9);
  --panel-border: rgba(0, 245, 255, 0.2);

  --ink: #d7f7ff;
  --ink-soft: rgba(215, 247, 255, 0.78);
  --white-soft: rgba(255, 255, 255, 0.9);

  --neon-cyan: #00f5ff;
  --neon-purple: #b300ff;
  --neon-red: #ff2a6d;
  --neon-warn: #ffcc00;

  --glass: blur(8px);
  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 18px;

  --shadow-cyan-sm: 0 0 8px rgba(0, 245, 255, 0.22);
  --shadow-cyan-md: 0 0 16px rgba(0, 245, 255, 0.18);

  --crt-glow:
    0 0 15px rgba(0, 245, 255, 0.15),
    0 0 30px rgba(0, 245, 255, 0.05);

  --shell-shadow:
    0 0 24px rgba(0, 245, 255, 0.08),
    0 0 60px rgba(0, 0, 0, 0.35),
    inset 0 0 60px rgba(0, 0, 0, 0.7);

  --transition-fast: 180ms ease;
  --transition-med: 320ms ease;
  --transition-slow: 600ms cubic-bezier(0.2, 0.8, 0.2, 1);

  --content-width: 950px;
  --body-padding: clamp(14px, 3vw, 40px);
  --shell-padding: clamp(22px, 4vw, 52px);
}

/* -------------------------
   RESET / BASE
------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: var(--body-padding);
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgba(2, 3, 8, 0.86), rgba(2, 3, 8, 0.96)),
    url("/NeoDominion/images/3155.jpg") center / cover no-repeat fixed;
  font-family: "JetBrains Mono", "Share Tech Mono", monospace;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  scrollbar-width: thin;
  scrollbar-color: var(--neon-cyan) var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 245, 255, 0.06), transparent 30%),
    radial-gradient(circle at 80% 25%, rgba(179, 0, 255, 0.05), transparent 28%),
    radial-gradient(circle at 50% 85%, rgba(255, 42, 109, 0.05), transparent 30%);
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--neon-cyan);
  color: #000;
  text-shadow: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

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

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(0, 245, 255, 0.5);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 245, 255, 0.75);
}

/* -------------------------
   ATMOSPHERE
------------------------- */
.terminal-overlay,
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.55;
  background:
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0) 0,
      rgba(255, 255, 255, 0) 50%,
      rgba(0, 0, 0, 0.2) 50%,
      rgba(0, 0, 0, 0.2) 100%
    );
  background-size: 100% 4px;
  animation: scanline-scroll 0.55s linear infinite;
}

/* -------------------------
   MAIN SHELL
------------------------- */
.index-shell {
  position: relative;
  isolation: isolate;
  width: min(100%, var(--content-width));
  margin: 40px auto;
  padding: var(--shell-padding);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.015),
      rgba(255, 255, 255, 0)
    ),
    var(--panel);
  box-shadow: var(--shell-shadow);
  backdrop-filter: var(--glass);
}

.index-shell::before,
.index-shell::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2px solid var(--neon-cyan);
  opacity: 0.9;
  transition:
    width var(--transition-med),
    height var(--transition-med),
    opacity var(--transition-med);
}

.index-shell::before {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
}

.index-shell::after {
  right: -1px;
  bottom: -1px;
  border-top: 0;
  border-left: 0;
}

.index-shell:hover::before,
.index-shell:hover::after {
  width: 100%;
  height: 100%;
  opacity: 0.08;
}

/* -------------------------
   HEADER
------------------------- */
.log-content {
  position: relative;
}

.entry-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(0, 245, 255, 0.16);
}

.entry-marker {
  margin: 0 0 1rem;
  color: var(--neon-cyan);
  font-family: "Orbitron", sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
}

.log-content h1 {
  position: relative;
  display: inline-block;
  margin: 0;
  color: var(--ink);
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-shadow:
    2px 0 var(--neon-cyan),
    -2px 0 var(--neon-red),
    0 0 18px rgba(255, 255, 255, 0.06);
}

/* -------------------------
   LOG LIST
------------------------- */
.log-list {
  display: grid;
  gap: 1rem;
}

.log-entry {
  position: relative;
  display: grid;
  grid-template-columns: 110px 90px 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(0, 245, 255, 0.14);
  border-radius: var(--radius-md);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.03),
      rgba(255, 255, 255, 0.01)
    ),
    rgba(5, 7, 12, 0.72);
  color: var(--ink);
  text-decoration: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.015),
    0 0 12px rgba(0, 245, 255, 0.05);
  overflow: hidden;
  transition:
    transform var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-med),
    background var(--transition-med);
}

.log-entry::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(0, 245, 255, 0.08) 0%,
      rgba(179, 0, 255, 0.03) 40%,
      rgba(255, 42, 109, 0.04) 100%
    );
  opacity: 0;
  transition: opacity var(--transition-med);
  pointer-events: none;
}

.log-entry:hover,
.log-entry:focus-visible {
  transform: translateX(4px);
  border-color: rgba(0, 245, 255, 0.32);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 0 18px rgba(0, 245, 255, 0.11),
    0 0 30px rgba(179, 0, 255, 0.05);
}

.log-entry:hover::before,
.log-entry:focus-visible::before {
  opacity: 1;
}

.log-entry:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 4px;
}

/* -------------------------
   IMAGE FRAME
------------------------- */
.icon-frame {
  position: relative;
  width: 110px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid rgba(0, 245, 255, 0.2);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.45),
    0 0 10px rgba(0, 245, 255, 0.06);
}

.icon-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0) 35%,
      rgba(0, 0, 0, 0.16)
    );
  pointer-events: none;
}

.log-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter:
    saturate(0.95)
    contrast(1.05)
    brightness(0.92);
  transition:
    transform var(--transition-med),
    filter var(--transition-med);
}

.log-entry:hover .log-icon,
.log-entry:focus-visible .log-icon {
  transform: scale(1.04);
  filter:
    saturate(1.05)
    contrast(1.08)
    brightness(1);
}

/* -------------------------
   TEXT / STATUS
------------------------- */
.status {
  justify-self: start;
  min-width: 72px;
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius-sm);
  color: #000;
  background: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.25);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.name {
  color: var(--ink);
  font-family: "Orbitron", sans-serif;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow:
    1px 0 rgba(0, 245, 255, 0.25),
    -1px 0 rgba(255, 42, 109, 0.12);
  opacity: 0.96;
  transition:
    color var(--transition-fast),
    text-shadow var(--transition-fast);
}

.log-entry:hover .name,
.log-entry:focus-visible .name {
  color: #fff;
  text-shadow:
    0 0 10px rgba(0, 245, 255, 0.18),
    0 0 16px rgba(179, 0, 255, 0.08);
}

/* Optional locked styling */
.log-entry.locked {
  opacity: 0.82;
}

.log-entry.locked .status {
  background: var(--neon-warn);
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.2);
}

.log-entry.locked .icon-frame {
  border-color: rgba(255, 204, 0, 0.2);
}

.log-entry.locked .name {
  color: rgba(215, 247, 255, 0.78);
}

/* -------------------------
   FOOT LINE
------------------------- */
.log-content::after {
  content: "";
  display: block;
  margin-top: 2rem;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 245, 255, 0.26),
    transparent
  );
}

/* -------------------------
   KEYFRAMES
------------------------- */
@keyframes scanline-scroll {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 0 100%;
  }
}

/* -------------------------
   REDUCED MOTION
------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .terminal-overlay,
  .scanlines {
    animation: none;
    opacity: 0.18;
  }
}

/* -------------------------
   MOBILE
------------------------- */
@media (max-width: 700px) {
  .index-shell {
    margin: 20px auto;
    padding: 20px;
  }

  .log-entry {
    grid-template-columns: 80px 1fr;
    gap: 0.85rem;
    align-items: start;
  }

  .icon-frame {
    width: 80px;
  }

  .status {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
  }

  .name {
    grid-column: 2;
    grid-row: 1;
    padding-right: 5.5rem;
    font-size: 0.9rem;
    line-height: 1.45;
  }
}