
/* =========================================
   LUCİFERYUM — BLOOD EMPEROR
   AGONY INTERFACE
========================================= */

:root {
  color-scheme: dark;
  --siyah: #080303;
  --karanlik: #100505;
  --panel: #170909;
  --panel-isik: #210b0d;
  --kirmizi: #a90020;
  --kirmizi-isik: #f0183b;
  --gumus: #d4c9ca;
  --sessiz: #a9999b;
  --sinir: rgba(164, 66, 76, .32);
  --golge: 0 12px 35px rgba(0, 0, 0, .48);
}

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

html {
  min-height: 100%;
  background: var(--siyah);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  padding-bottom: 90px;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 50% 0%,
      rgba(100, 0, 20, .17), transparent 45%),
    var(--siyah);
  color: var(--gumus);
  font-family: Arial, Helvetica, sans-serif;
}

/* ÜST PANEL */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  min-height: 68px;
  padding: 10px 18px;
  background: rgba(8, 3, 3, .94);
  border-bottom: 1px solid var(--sinir);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--gumus);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
}

.brand img {
  width: 43px;
  height: 43px;
  object-fit: contain;
  filter: drop-shadow(0 0 9px rgba(220, 0, 35, .55));
}

/* ANA ALAN */

.app {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px;
}

.page {
  display: none;
  animation: pageEnter .35s ease;
}

.page.active {
  display: block;
}

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

/* KAHRAMAN ALANI */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 410px;
  padding: 30px 18px;
  overflow: hidden;
  text-align: center;
  border: 1px solid var(--sinir);
  border-radius: 18px;
  background:
    linear-gradient(180deg,
      rgba(50, 0, 12, .48),
      rgba(12, 4, 5, .96));
  box-shadow: var(--golge);
}

.hero::before {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  top: 35px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(200, 0, 35, .2);
  filter: blur(75px);
  animation: heroAura 4s ease-in-out infinite;
}

@keyframes heroAura {
  0%, 100% {
    opacity: .35;
    scale: .82;
  }
  50% {
    opacity: .9;
    scale: 1.15;
  }
}

.hero-seal {
  position: relative;
  z-index: 1;
  display: block;
  width: min(78%, 340px);
  max-height: 290px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 13px rgba(210, 0, 35, .4))
    drop-shadow(0 0 28px rgba(150, 0, 25, .25));
  animation: sealFloat 5s ease-in-out infinite;
}

@keyframes sealFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

.hero h1 {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  color: #eee4e5;
  font-size: clamp(25px, 7vw, 36px);
  font-weight: 900;
  letter-spacing: 5px;
  text-shadow: 0 0 18px rgba(220, 0, 35, .55);
}

.hero p {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  color: var(--sessiz);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 1px;
}

/* İSTATİSTİK KARTLARI */

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 20px;
  border: 1px solid var(--sinir);
  border-radius: 13px;
  background: linear-gradient(145deg, var(--panel), #0d0506);
  box-shadow: var(--golge);
}

.stat-card span {
  color: var(--sessiz);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
}

.stat-card strong {
  color: #f2dfe2;
  font-size: 27px;
}

/* PANEL KARTLARI */

.panel-card {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--sinir);
  border-radius: 14px;
  background: linear-gradient(145deg, var(--panel), #0c0506);
  box-shadow: var(--golge);
}

.panel-card h2 {
  margin-bottom: 16px;
  color: #eadbdd;
  font-size: 19px;
  letter-spacing: 1px;
}

.panel-card p {
  margin-top: 9px;
  color: var(--sessiz);
  font-size: 14px;
  line-height: 1.7;
}

/* FORM VE GİRİŞLER */

input {
  width: 100%;
  min-height: 48px;
  margin: 8px 0;
  padding: 13px 14px;
  border: 1px solid var(--sinir);
  border-radius: 9px;
  outline: none;
  background: #0b0506;
  color: var(--gumus);
  font-size: 14px;
}

input:focus {
  border-color: var(--kirmizi-isik);
  box-shadow: 0 0 12px rgba(240, 24, 59, .16);
}

input::placeholder {
  color: #827477;
}

button {
  min-height: 42px;
  padding: 10px 17px;
  border: 1px solid rgba(240, 24, 59, .5);
  border-radius: 9px;
  background: linear-gradient(135deg, #790018, #a90020);
  color: #fff0f2;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}

button:active {
  transform: scale(.97);
  filter: brightness(1.2);
}

button:focus-visible {
  outline: 2px solid var(--kirmizi-isik);
  outline-offset: 3px;
}

/* SOHBET */

.messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  max-height: 52vh;
  margin-bottom: 15px;
  padding: 12px;
  overflow-y: auto;
  border: 1px solid var(--sinir);
  border-radius: 10px;
  background: #0a0405;
}

.message {
  max-width: 90%;
  padding: 13px;
  border: 1px solid var(--sinir);
  border-radius: 11px;
  overflow-wrap: anywhere;
}

.message strong {
  color: #f04a64;
  font-size: 12px;
}

.message p {
  margin-top: 7px;
  color: var(--gumus);
  font-size: 14px;
}

.message.user {
  align-self: flex-end;
  background: #210a0e;
}

.message.assistant {
  align-self: flex-start;
  background: #120809;
}

#chatForm,
#memoryForm {
  display: flex;
  align-items: center;
  gap: 9px;
}

#chatForm input,
#memoryForm input {
  flex: 1;
  min-width: 0;
}

/* HAFIZA */

#memoryList {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 18px;
}

.memory-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--sinir);
  border-radius: 9px;
  background: #100607;
}

.memory-item span {
  min-width: 0;
  color: var(--gumus);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.memory-item button {
  flex-shrink: 0;
  min-height: 34px;
  padding: 6px 11px;
}

#clearMemories {
  margin-top: 18px;
  border-color: #76202c;
  background: #26090e;
}

/* ALT GEZİNME */

.bottom-nav {
  position: fixed;
  z-index: 200;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding: 10px 9px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--sinir);
  background: rgba(8, 3, 3, .97);
  backdrop-filter: blur(15px);
}

.nav-btn {
  min-height: 48px;
  padding: 8px 4px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--sessiz);
  font-size: 12px;
}

.nav-btn.active {
  border-color: rgba(240, 24, 59, .4);
  background: linear-gradient(145deg, #310b12, #170609);
  color: #ffb5c0;
  box-shadow: inset 0 0 12px rgba(180, 0, 30, .14);
}

/* MOBİL UYUM */

@media (max-width: 380px) {
  .app {
    padding: 14px 10px;
  }

  .hero {
    min-height: 350px;
  }

  .hero-seal {
    width: 85%;
  }

  .panel-card {
    padding: 16px;
  }

  .nav-btn {
    font-size: 11px;
  }
}

@media (min-width: 700px) {
  .app {
    padding-top: 28px;
  }

  .hero {
    min-height: 480px;
  }
}

/* HAREKETİ AZALTMA TERCİHİ */

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