/* ==========================================================================
   GLOBAL RESET & BASE
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "IBM Plex Mono", monospace;
  font-size: 1rem;
  background: #000;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   CANVAS EFFECT & BACKDROP
   ========================================================================== */
.canvas-container {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.canvas-container canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

.canvas-container::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  backdrop-filter: grayscale(1);
  background: rgba(15, 15, 15, 0.4);
}

/* ==========================================================================
   CENTER BOX
   ========================================================================== */
.center-box {
  position: relative;
  z-index: 2;
  text-align: center;
  width: clamp(380px, 72vw, 760px);
  min-width: 320px;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(2.2rem, 5vw, 4rem);
  margin-bottom: 4vh;
  transform: translateY(-2.5vh);
  color: rgba(255, 255, 255, 0.87);
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;

  /* Gölgeler: hem başlangıç hem hover’da */
  box-shadow:
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.02),
    0 4px 10px rgba(0, 0, 0, 0.10),
    0 0 0 1px rgba(255, 255, 255, 0.015);
  outline: 1px solid rgba(255, 255, 255, 0.02);
  outline-offset: -6px;

  /* Blur başlangıçta var ama çok hafif */
  backdrop-filter: blur(0.5px) brightness(1.01);
  -webkit-backdrop-filter: blur(0.5px) brightness(1.01);

  /* Mask başlangıçta aktif ama yumuşak */
  -webkit-mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 75%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-size: 100% 100%;
  mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 75%, rgba(0, 0, 0, 0) 100%);
  mask-size: 100% 100%;

  /* Geçişler */
  transition:
    backdrop-filter 0.35s ease,
    -webkit-backdrop-filter 0.35s ease,
    box-shadow 0.35s ease,
    outline 0.35s ease,
    -webkit-mask-image 0.35s ease,
    mask-image 0.35s ease;
}

.center-box .brand span {
  position: relative;
  display: inline-block;
  color: #fff;
  transition:
    transform 0.3s ease,
    text-shadow 0.3s ease,
    color 0.3s ease;
}

/* Hover ile yumuşakça derinleşme + blur artışı + maskeleme */
.center-box:hover {
  backdrop-filter: blur(4px) brightness(1.04);
  -webkit-backdrop-filter: blur(4px) brightness(1.04);

  box-shadow:
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.05),
    0 6px 18px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  outline: 1px solid rgba(255, 255, 255, 0.04);

  -webkit-mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0) 100%);
  mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0) 100%);
}

/* ==========================================================================
   BRAND HEADLINE
   ========================================================================== */
.center-box .brand {
  font-family: "Roboto Mono", monospace;
  font-size: clamp(3.6rem, 8vw, 6.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0.8rem 0 2.4rem;
  background: linear-gradient(120deg, #fff, #efefef 70%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  position: relative;
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.3),
    0 0 8px rgba(255, 255, 255, 0.15);
}

.center-box .brand span {
  position: relative;
  display: inline-block;
  color: #fff;
  transition: transform 0.3s ease;
}

.center-box .brand span::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  color: rgba(255, 255, 255, 0.15);
  filter: blur(8px);
  transform: translateY(2px);
  transition: all 0.3s ease;
}

.center-box .brand:hover span {
  transform: translateY(-2px);
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.center-box .brand:hover span::before {
  filter: blur(12px);
  color: rgba(255, 255, 255, 0.25);
}

.center-box .brand::after {
  content: "";
  display: block;
  width: 40%;
  height: 2px;
  margin: 1rem auto 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  position: relative;
  transform-origin: center;
  animation: glow-line 3.5s infinite ease-in-out;
  transition: width 0.5s ease;
}

.center-box:hover .brand::after {
  width: 60%;
}

@keyframes glow-line {
  0%, 100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 480px) {
  .center-box {
    box-shadow:
      inset 0 0 0 0.5px rgba(255, 255, 255, 0.02),
      0 2px 4px rgba(0, 0, 0, 0.1),
      0 0 0 1px rgba(255, 255, 255, 0.01);
  }
}

/* ==========================================================================
   NAVIGATION LINKS
   ========================================================================== */
.center-box .nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.center-box .nav a {
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background-color: transparent;
  text-decoration: none;
  padding: 0.3rem 0.9rem;
  border-radius: 4px;
  font-size: clamp(0.8rem, 1vw, 0.95rem);
  font-weight: 500;
  transition: all 0.3s ease;
}

.center-box .nav a:hover {
  color: #000;
  background-color: #fff;
  border-color: #fff;
}

/* ==========================================================================
   TYPEWRITER EFFECT & TAGLINE
   ========================================================================== */
.center-box .tagline,
.center-box .typewriter-text {
  font-family: "Inter", sans-serif;
  font-size: clamp(0.8rem, 1vw, 0.95rem);
  font-style: italic;
  color: rgba(255, 255, 255, 0.65);
}

.center-box .tagline {
  margin-top: 2rem;
}

.center-box .typewriter-text {
  margin: 1rem auto 0;
  min-height: 1.2rem;
  white-space: nowrap;
  overflow: hidden;
  width: fit-content;
  border-right: 1px solid rgba(255, 255, 255, 0.5);
  animation: blinkCaret 0.8s step-end infinite;
}

.center-box .typewriter-text.done {
  white-space: normal;
  overflow: visible;
  border-right: none;
  animation: none;
}

.center-box:hover .tagline {
  opacity: 1;
}

/* ==========================================================================
   FOOTER & LANGUAGE TOGGLE
   ========================================================================== */
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  text-align: center;
  z-index: 2;
  padding: clamp(0.8rem, 1.5vw, 1.2rem) 1rem clamp(1rem, 2vw, 1.6rem);
  font-size: clamp(0.65rem, 1.2vw, 0.75rem);
  font-family: "Inter", sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.65);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
  backdrop-filter: blur(2px);
}

.footer .footer-menu {
  margin-top: clamp(0.3rem, 1vw, 0.6rem);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(0.6rem, 2vw, 1.2rem);
  font-size: clamp(0.65rem, 1.1vw, 0.78rem);
  font-style: italic;
  font-weight: 400;
  text-transform: lowercase;
}

.footer .footer-menu a {
  color: inherit;
  text-decoration: none;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.footer .footer-menu a:hover {
  color: rgba(255, 255, 255, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

.lang-toggle {
  position: absolute;
  font-size: clamp(0.68rem, 1vw, 0.8rem);
  font-style: italic;
  color: rgba(255, 255, 255, 0.5);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
  padding-bottom: 1px;
  cursor: pointer;
  transition: color 0.3s ease, border-bottom-color 0.3s ease;
  z-index: 3;
  right: 1rem;
  bottom: 1rem;
}

.lang-toggle:hover {
  color: rgba(255, 255, 255, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   LOGIN LINK (Üst Sağ)
   ========================================================================== */
.login-link {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 3;
}

.login-link a {
  color: rgba(255, 255, 255, 0.85);
  font-style: italic;
  font-weight: 500;
  text-decoration: none;
  font-size: clamp(0.75rem, 1vw, 0.85rem);
  padding: clamp(0.3rem, 0.7vw, 0.45rem) clamp(0.6rem, 1.2vw, 1rem);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(1px);
  transition: all 0.3s ease;
}

.login-link a:hover {
  color: #000;
  background-color: #fff;
  border-color: #fff;
}

/* ==========================================================================
   LOADER LINE (Top bar)
   ========================================================================== */
.loader-line-minimal {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, rgba(255,255,255,0.1), rgba(255,255,255,0.5), rgba(255,255,255,0.1));
  background-size: 200% auto;
  animation: slideLine 2.8s linear forwards, loaderFadeOut 0.5s ease-out 2.8s forwards;
  z-index: 9999;
  pointer-events: none;
  opacity: 1;
}

/* ==========================================================================
   KEYFRAMES
   ========================================================================== */
@keyframes slideLine {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes loaderFadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes blinkCaret {
  0%, 100% { border-color: transparent; }
  50%      { border-color: rgba(255, 255, 255, 0.5); }
}

/* ==========================================================================
   MEDIA QUERIES (Mobil Uyum)
   ========================================================================== */
@media (max-width: 600px) {
  .center-box {
    width: 90vw;
    padding: 1.2rem;
    margin-top: -10vh;
    transform: none;
    border-radius: 6px;
  }

  .center-box .brand {
    font-size: 9vw;
    margin-top: 1.2rem;
  }

  .center-box .nav a,
  .login-link a {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
  }

  .center-box .tagline {
    font-size: 0.85rem;
  }

  .footer,
  .footer .footer-menu,
  .lang-toggle {
    font-size: 0.7rem;
  }

  .lang-toggle {
    top: 1.2rem;
    left: 1.2rem;
    bottom: auto;
    right: auto;
  }
}

@media (min-width: 601px) {
  .center-box {
    transform: translateY(-4vh);
  }
}
