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

:root {
  --bg-main: #02010a;
  --bg-card: rgba(7, 10, 26, 0.96);
  --accent-cyan: #5ef2ff;
  --accent-magenta: #ff4b8a;
  --accent-amber: #ffc76b;
  --text-main: #e1e6f5;
  --text-muted: #848ba0;
  --border-soft: rgba(255, 255, 255, 0.08);
}

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

body {
  margin: 0;
  background:
    radial-gradient(circle at top, #111632 0, #050313 38%, #020108 100%);
  color: var(--text-main);
  font-family: 'Share Tech Mono', monospace;
  overflow-x: hidden;
}

/* noise + scanlines */

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.09;
  background: url("https://grainy-gradients.vercel.app/noise.svg");
  mix-blend-mode: soft-light;
  z-index: 1;
}

.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 2;
  background-image: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.028) 1px,
    transparent 1px
  );
  background-size: 100% 3px;
  mix-blend-mode: soft-light;
  opacity: 0.45;
}

/* layout */

.core-root {
  position: relative;
  z-index: 3;
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 14px 44px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* üst bar */

.core-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-orb {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #ffffff, #5ef2ff 40%, #1a1f3d 70%);
  box-shadow:
    0 0 22px rgba(94, 242, 255, 0.9),
    0 0 55px rgba(113, 74, 255, 0.7);
}

.brand-text {
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #cfd7ff;
}

.brand-text span {
  color: #7bdcff;
}

.top-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.meta-pill {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(127, 208, 255, 0.65);
  color: #bdeaff;
  background: linear-gradient(90deg, rgba(127, 208, 255, 0.18), transparent);
}

.meta-pill.danger {
  border-color: rgba(255, 89, 117, 0.8);
  color: #ffc0cb;
  background: linear-gradient(90deg, rgba(255, 89, 117, 0.22), transparent);
}

/* ana frame */

.core-frame {
  position: relative;
  border-radius: 18px;
  padding: 22px 18px 24px;
  background:
    radial-gradient(circle at top left, rgba(110, 214, 255, 0.16), transparent 55%),
    radial-gradient(circle at bottom right, rgba(255, 121, 198, 0.16), transparent 55%),
    var(--bg-card);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 1),
    0 22px 70px rgba(0, 0, 0, 0.95);
  overflow: hidden;
}

/* parlayan kenar çizgileri */

.frame-border {
  position: absolute;
  pointer-events: none;
  opacity: 0.55;
}

.frame-border-top {
  top: 0;
  left: 18%;
  right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  filter: blur(0.3px);
}

.frame-border-bottom {
  bottom: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-magenta), transparent);
  filter: blur(0.3px);
}

.frame-border-left {
  top: 16%;
  bottom: 16%;
  left: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--accent-amber), transparent);
  filter: blur(0.3px);
}

.frame-border-right {
  top: 10%;
  bottom: 10%;
  right: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--accent-cyan), transparent);
  filter: blur(0.3px);
}

/* header */

.frame-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 18px;
}

.frame-title .label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.glitch-title {
  position: relative;
  margin: 4px 0 0;
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #f4f8ff;
}

.glitch-title::before,
.glitch-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
  opacity: 0.19;
  pointer-events: none;
}

.glitch-title::before {
  transform: translateX(-2px);
  color: var(--accent-cyan);
}

.glitch-title::after {
  transform: translateX(2px);
  color: var(--accent-magenta);
}

.frame-code {
  font-size: 0.74rem;
  text-align: right;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.frame-code strong {
  color: var(--text-main);
}

/* içerik */

.core-body {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 16px 14px 16px;
  background:
    radial-gradient(circle at top left, rgba(94, 242, 255, 0.12), transparent 55%),
    radial-gradient(circle at bottom right, rgba(255, 145, 196, 0.12), transparent 55%),
    rgba(4, 7, 21, 0.98);
}

.mono-line {
  font-size: 0.84rem;
  margin: 4px 0;
  line-height: 1.5;
}

.mono-line.faint {
  opacity: 0.7;
}

.err {
  color: #ff7b8b;
}

.warn {
  color: #ffe38e;
}

.status-row {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
  align-items: center;
}

.status-label {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.status-timer span {
  color: #c3c9ff;
}

/* progress */

.core-progress {
  margin-top: 12px;
}

.progress-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.progress-bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(10, 13, 33, 0.9);
  overflow: hidden;
  border: 1px solid rgba(132, 145, 185, 0.7);
}

.progress-fill {
  position: absolute;
  inset: 0;
  width: 40%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-magenta));
  box-shadow:
    0 0 14px rgba(94, 242, 255, 0.7),
    0 0 24px rgba(255, 121, 198, 0.6);
  animation: slideProgress 4.2s ease-in-out infinite alternate;
}

@keyframes slideProgress {
  0% {
    transform: translateX(-60%);
  }
  50% {
    transform: translateX(-10%);
  }
  100% {
    transform: translateX(40%);
  }
}

.core-note {
  margin-top: 14px;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.highlight {
  color: #ffb27c;
}

.fade-text {
  margin-top: 16px;
  font-size: 0.76rem;
  opacity: 0.35;
}

.anomaly-box {
  margin-top: 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 105, 132, 0.7);
  padding: 10px 11px 10px;
  background:
    radial-gradient(circle at top left, rgba(255, 105, 132, 0.22), transparent 55%),
    radial-gradient(circle at bottom right, rgba(155, 76, 255, 0.16), rgba(8, 4, 20, 0.96));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.7),
    0 16px 36px rgba(0, 0, 0, 0.85);
  font-size: 0.8rem;
}

.anomaly-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.anomaly-title {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: #ffc0d4;
}

.anomaly-tag {
  font-size: 0.7rem;
  color: #ffb3c0;
}

.anomaly-line {
  margin: 2px 0;
  line-height: 1.5;
  color: #f1d2db;
}

.anom-label {
  display: inline-block;
  min-width: 98px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  color: #ffb1c5;
}


.core-footer {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.74rem;
  color: #666d7e;
}

.footer-tag {
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.footer-tag.muted {
  opacity: 0.7;
}

/* responsive */

@media (max-width: 840px) {
  .frame-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .frame-code {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .core-root {
    padding: 24px 10px 32px;
  }

  .core-frame {
    padding: 18px 12px 20px;
    border-radius: 14px;
  }

  .core-body {
    padding: 14px 10px 14px;
  }
}

/* ======================= */
/*  BURADAN SONRASI: FLASH,
    GLOBAL GLITCH ve TERMINAL */
/* ======================= */

.flash-layer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.08s linear;
  z-index: 6;
}

.flash-layer.flash-visible {
  opacity: 1;
}

.global-glitch {
  filter: hue-rotate(8deg) contrast(1.1) brightness(1.05);
}

.global-glitch .core-frame {
  transform: scale(1.004) skewX(0.5deg);
}

.global-glitch .scanlines {
  opacity: 0.5;
}

.global-glitch .noise {
  opacity: 0.16;
}

.konami-mode .core-frame {
  box-shadow: 0 0 0 1px rgba(255, 92, 150, 0.9), 0 0 40px rgba(90, 220, 255, 0.9);
  border-color: rgba(255, 92, 150, 0.7);
}

/* diagnostic terminal */

.diag-shell {
  margin-top: 26px;
  border-radius: 16px;
  padding: 14px 16px 12px;
  background: radial-gradient(
      circle at top left,
      rgba(94, 231, 255, 0.14),
      rgba(5, 7, 20, 0.98)
    );
  border: 1px solid rgba(90, 133, 210, 0.9);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.95),
    0 18px 50px rgba(0, 0, 0, 0.95);
  font-size: 12px;
}

.diag-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.diag-label {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 10px;
  color: rgba(178, 199, 255, 0.9);
}

.diag-hint {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(132, 160, 230, 0.85);
}

.diag-output {
  max-height: 220px;
  overflow-y: auto;
  padding: 6px 2px 4px;
}

.diag-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 1px 0;
}

.diag-line .prompt {
  color: #6ae2ff;
}

.diag-line a {
  color: #8ef0ff;
  text-decoration: none;
}

.diag-line a:hover {
  text-decoration: underline;
}

.diag-line.dim {
  opacity: 0.8;
}

.diag-input-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid rgba(55, 82, 135, 0.7);
  padding-top: 6px;
}

.diag-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #e5ecff;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.diag-input::placeholder {
  color: rgba(134, 155, 214, 0.7);
}

.diag-input:focus {
  outline: none;
}

@media (max-width: 720px) {
  .diag-shell {
    padding: 12px 10px 10px;
  }
}
