/* ============================================
   ARCHIVE_217 — STYLESHEET
   ============================================ */

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

:root {
  --bg: #000000;
  --text: #c8c8c8;
  --dim: #555;
  --accent: #a0ffa0;
  --red: #ff4444;
  --glow: rgba(160, 255, 160, 0.15);
  --font: 'Courier New', Courier, monospace;
}

html {
  scroll-behavior: smooth;
}

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

/* ============================================
   NOISE OVERLAY
   ============================================ */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  animation: noiseShift 0.15s steps(1) infinite;
}

@keyframes noiseShift {
  0%   { background-position: 0 0; }
  25%  { background-position: -30px 10px; }
  50%  { background-position: 20px -15px; }
  75%  { background-position: -10px 25px; }
  100% { background-position: 15px -5px; }
}

/* Scanline overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.07) 2px,
    rgba(0,0,0,0.07) 4px
  );
}

/* ============================================
   PAGE WRAPPER
   ============================================ */

.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 80px 24px 120px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.page-center {
  align-items: center;
  text-align: center;
  justify-content: center;
}

/* ============================================
   FLICKER TITLE
   ============================================ */

.flicker-title {
  font-size: clamp(2rem, 6vw, 3.6rem);
  font-weight: bold;
  letter-spacing: 0.12em;
  color: #e8e8e8;
  text-shadow:
    0 0 8px rgba(200,200,200,0.4),
    0 0 20px rgba(200,200,200,0.1);
  animation: flicker 4s infinite;
  margin-bottom: 24px;
}

@keyframes flicker {
  0%   { opacity: 1; }
  2%   { opacity: 0.85; }
  4%   { opacity: 1; }
  19%  { opacity: 1; }
  20%  { opacity: 0.7; }
  21%  { opacity: 1; }
  50%  { opacity: 1; }
  51%  { opacity: 0.9; }
  52%  { opacity: 1; }
  85%  { opacity: 1; }
  86%  { opacity: 0.6; }
  87%  { opacity: 1; }
  100% { opacity: 1; }
}

/* ============================================
   GLITCH EFFECT
   ============================================ */

.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

.glitch::before {
  color: #ff0040;
  clip-path: polygon(0 0, 100% 0, 100% 40%, 0 40%);
  animation: glitchTop 3.5s infinite;
  left: 2px;
}

.glitch::after {
  color: #00ffea;
  clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
  animation: glitchBot 4s infinite;
  left: -2px;
}

@keyframes glitchTop {
  0%, 94%, 100% { transform: none; opacity: 0; }
  95%            { transform: translateX(-3px); opacity: 0.7; }
  96%            { transform: translateX(3px); opacity: 0.7; }
  97%            { transform: none; opacity: 0; }
}

@keyframes glitchBot {
  0%, 89%, 100% { transform: none; opacity: 0; }
  90%            { transform: translateX(4px); opacity: 0.6; }
  91%            { transform: translateX(-2px); opacity: 0.6; }
  92%            { transform: none; opacity: 0; }
}

/* ============================================
   SUBTITLE & MISC TEXT
   ============================================ */

.subtitle {
  color: #999;
  font-size: 15px;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  line-height: 1.8;
}

.hint-text {
  font-size: 13px;
  color: #555;
  letter-spacing: 0.15em;
  margin-top: 16px;
}

.section-label {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: #666;
  text-transform: uppercase;
  margin-bottom: 32px;
  border-bottom: 1px solid #1a1a1a;
  padding-bottom: 8px;
  width: 100%;
}

/* ============================================
   BUTTON
   ============================================ */

.btn {
  display: inline-block;
  margin-top: 40px;
  padding: 12px 36px;
  background: transparent;
  color: var(--text);
  border: 1px solid #333;
  font-family: var(--font);
  font-size: 13px;
  letter-spacing: 0.2em;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--glow);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn:hover {
  border-color: #888;
  color: #fff;
  text-shadow: 0 0 8px rgba(255,255,255,0.6);
  box-shadow: 0 0 16px rgba(200,200,200,0.08), inset 0 0 16px rgba(200,200,200,0.04);
}

.btn:hover::before {
  opacity: 1;
}

.btn:active {
  transform: scale(0.98);
}

/* ============================================
   DIVIDER
   ============================================ */

.divider {
  width: 100%;
  border: none;
  border-top: 1px solid #111;
  margin: 40px 0;
}

/* ============================================
   LOG ENTRIES
   ============================================ */

.logs {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 48px;
}

.log-entry {
  border: 1px solid #111;
  padding: 20px 24px;
  background: #030303;
  position: relative;
  transition: border-color 0.3s;
}

.log-entry::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 2px;
  height: 100%;
  background: #1a1a1a;
  transition: background 0.3s;
}

.log-entry:hover {
  border-color: #222;
}

.log-entry:hover::before {
  background: #444;
}

.log-filename {
  font-size: 13px;
  letter-spacing: 0.2em;
  color: #777;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.log-date {
  font-size: 12px;
  color: #4a4a4a;
  margin-bottom: 12px;
}

.log-body {
  font-size: 15px;
  color: #999;
  line-height: 1.9;
}

.log-body .odd-cap {
  color: #ccc;
  font-weight: bold;
  text-shadow: 0 0 6px rgba(200,200,200,0.3);
}

.log-corrupted {
  color: #4a4a4a;
  font-size: 13px;
  margin-top: 8px;
  letter-spacing: 0.05em;
}

/* ============================================
   PASSWORD SECTION
   ============================================ */

.auth-section {
  width: 100%;
  border: 1px solid #1a1a1a;
  padding: 36px 32px;
  background: #020202;
  margin-top: 20px;
  position: relative;
}

.auth-section::after {
  content: 'RESTRICTED';
  position: absolute;
  top: -1px; right: 20px;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: #444;
  background: #000;
  padding: 0 8px;
}

.auth-label {
  font-size: 13px;
  letter-spacing: 0.25em;
  color: #777;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: block;
}

.auth-input {
  width: 100%;
  max-width: 380px;
  background: #050505;
  border: 1px solid #222;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  padding: 12px 16px;
  letter-spacing: 0.15em;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
  display: block;
  margin-bottom: 16px;
}

.auth-input:focus {
  border-color: #555;
  box-shadow: 0 0 10px rgba(255,255,255,0.04);
}

.auth-input::placeholder {
  color: #444;
  letter-spacing: 0.1em;
}

.auth-msg {
  font-size: 14px;
  letter-spacing: 0.15em;
  margin-top: 14px;
  min-height: 20px;
  transition: all 0.3s;
}

.auth-msg.error  { color: var(--red); }
.auth-msg.success { color: var(--accent); text-shadow: 0 0 8px rgba(160,255,160,0.4); }

/* ============================================
   FINAL PAGE
   ============================================ */

.final-content {
  opacity: 0;
  animation: fadeInSlow 3s ease forwards;
  animation-delay: 0.5s;
}

@keyframes fadeInSlow {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.final-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  letter-spacing: 0.15em;
  color: #ddd;
  margin-bottom: 32px;
  animation: flicker 5s infinite, fadeInSlow 2s ease forwards;
}

.final-text {
  color: #444;
  font-size: 13px;
  letter-spacing: 0.1em;
  line-height: 2.2;
  margin-bottom: 60px;
}

.signature {
  font-size: 11px;
  color: #252525;
  letter-spacing: 0.3em;
  margin-top: 80px;
}

/* ============================================
   CURSOR
   ============================================ */

body {
  cursor: crosshair;
}

/* ============================================
   TRANSITIONS
   ============================================ */

.fade-out {
  animation: fadeOut 0.6s ease forwards;
}

@keyframes fadeOut {
  to { opacity: 0; }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 600px) {
  .page {
    padding: 48px 16px 80px;
  }

  .flicker-title {
    font-size: 1.7rem;
  }

  .auth-section {
    padding: 24px 18px;
  }

  .log-entry {
    padding: 16px;
  }

  .log-body {
    font-size: 16px;
  }

  .subtitle {
    font-size: 16px;
  }

  .hint-text {
    font-size: 14px;
    color: #666;
  }

  .section-label {
    font-size: 13px;
  }

  .auth-label {
    font-size: 14px;
  }

  .auth-input {
    font-size: 16px; /* prevents iOS zoom on focus */
    padding: 14px 16px;
  }

  .auth-msg {
    font-size: 15px;
  }

  .log-filename {
    font-size: 14px;
  }

  .log-corrupted {
    font-size: 14px;
  }
}
