/* Fontu import et */
@import url("https://fonts.googleapis.com/css?family=Press+Start+2P");

/* Genel Stil */
body {
  display: grid;
  min-height: 100vh;
  width: 100vw;
  --c: rgb(0 0 0 / 0.95);
  --bgb: linear-gradient(var(--c), var(--c));
  --bg: repeating-conic-gradient(
    from 7.5deg at center center,
    hsl(200, 100%, 0%) 0deg 15deg,
    hsl(200, 100%, 60%) 10deg 30deg
  );
  background: var(--bgb), var(--bg), black;
}

* {
  font: normal 1em sans-serif;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

/* Terminal Konteyneri */
.code-container {
  resize: both;
  overflow: hidden;
  margin: auto;
  width: 80vw;
  height: 80vh;
  min-width: 420px;
  min-height: 255px;
  position: relative;
  --glow-margin: 70px;
  filter: drop-shadow(0 0 75px rgb(128 0 255 / 0.25));
}

input.sig {
  content: "attr(content)";
  position: absolute;
  bottom: 90px;
  right: 90px;
  z-index: 999;
  color: #61e2ff; /* Açık mavi ton */
  text-shadow: 0 0 12px #00f; /* Mavi gölge */
  letter-spacing: 0.1em;
  width: calc(100% - 240px);
  background: transparent;
  border: none;
  text-align: center;
  letter-spacing: 0.1em;
}

.code-container::after {
  content: "";
  background: linear-gradient(
    to right,
    transparent,
    black 25px, black 110px,
    transparent 110px 175px,
    black 175px, black calc(100% - 25px),
    transparent
  );
  position: absolute;
  top: 125px;
  left: var(--glow-margin);
  right: var(--glow-margin);
  height: 4px;
  display: block;
  z-index: 90;
  opacity: 0.5;
}

.glow-container {
  position: absolute;
  inset: 0;
  display: grid;
  z-index: 2;
  pointer-events: none;
  --glow: drop-shadow(0 0 1px violet);
  filter: var(--glow) brightness(1.5) drop-shadow(0 0 10px violet);
}

.augs {
  --aug-rect-l1: initial;
  --aug-l1-width: 110px;
  --aug-l1-height: 4px;
  --aug-l-center: 57px;
  
  --aug-rect-r1: initial;
  --aug-r1-width: (100% - 125px - 50px);
  --aug-r1-height: 4px;
  --aug-r-center: 57px;
  
  --aug-clip-tr1: initial;
  --aug-tr1-alt-join-out: initial;
  --aug-tr1: 17px;
  --aug-clip-tr2: initial;
  --aug-tr2: 17px;
  --aug-tr-extend1: 50px;
  
  --aug-round-tl1: initial;
  --aug-tl1: 8px;
  --aug-round-br1: initial;
  --aug-br1: 8px;
  margin: auto;
  width: calc(100% - var(--glow-margin) * 2);
  height: calc(100% - var(--glow-margin) * 2);
}

.glow-container .augs {
  --aug-border: initial;
  --aug-border-all: 2px;
  --aug-border-bg: linear-gradient(to bottom left, #00f, #f0f); /* Mavi-mor gradient */
}

section.augs {
  position: absolute;
  inset: 0;
  margin: auto;
  --aug-inlay: initial;
  --aug-inlay-all: 2px;
  --aug-inlay-bg: none; /* Inlay özelliğini devre dışı bıraktık */
  --aug-inlay-opacity: 0;
  z-index: 1;
}

section.augs::before {
  filter: brightness(0.2) blur(10px);
}

/* Yeni overlay katmanı */
.inlay-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../images/xpayr.png") center 70% / auto 70% no-repeat;
  opacity: 0.1; /* Orijinal inlay opaklığını taklit ediyoruz */
  z-index: 0; /* Terminal içeriğinin altında kalmasını sağlıyoruz */
  pointer-events: none; /* Overlay'in etkileşimli olmasını engelliyoruz */
}

/* Logo ve Bağlantı */
.logo-link {
  position: absolute;
  top: 2px;
  left: 10px;
  width: 100px; /* Logoyu büyüttük */
  height: 50px; /* Logoyu büyüttük */
  z-index: 999;
  text-decoration: none;
}

/* Hover için Arka Plan Efekti */
.logo-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(0, 0, 255, 0.5), transparent); /* Mavi bir glow */
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
  z-index: -1;
}

.logo-link:hover::before {
  width: 120px; /* Hover'da arka plan genişler */
  height: 120px; /* Hover'da arka plan genişler */
}

.logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 10px #00f) brightness(1.5); /* Parlaklığı artırdık */
  transition: all 0.3s ease;
}

/* Hover Animasyonu */
.logo-link:hover .logo {
  filter: drop-shadow(0 0 20px #00f) brightness(2); /* Hover'da daha parlak */
  transform: scale(1.05);
}

input.title {
  position: absolute;
  top: 17px;
  left: 120px;
  width: calc(100% - 240px);
  background: transparent;
  color: rgb(255 200 255 / 0.5);
  text-shadow: 0 0 12px rebeccapurple;
  border: none;
  text-align: center;
  letter-spacing: 0.1em;
}

.code {
  position: absolute;
  inset: 80px 10px 10px 10px;
  font-size: 20px;
  color: white;
  filter: brightness(1.2);
}
.code * {
  font-size: 18px;
  font-weight: normal;
  color: #61e2ff; /* Temel yazılar açık mavi */
  font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
}

.bg {
  background: repeating-linear-gradient(
    to top,
    rgba(255, 255, 255, 0.03) 0px 2px,
    transparent 2px 4px
  ),
  linear-gradient(to bottom, #1a1a4d 75%, #3d0b43); /* Daha maviye yakın bir gradient */
}

.bg::after {
  content: '';
  height: 50%;
  width: 100%;
  display: block;
  background-image: linear-gradient(90deg, rgba(252, 25, 154, .1) 1px, rgba(0, 0, 0, 0) 1px),
                    linear-gradient(0deg, rgba(252, 25, 154, .1) 1px, rgba(0, 0, 0, 0) 1px);
  background-position: bottom;
  background-repeat: repeat;
  background-size: 20px 20px;
  left: -25px;
  position: absolute;
  pointer-events: none;
  bottom: 0;
  transform: perspective(100px) rotateX(60deg);
  z-index: 0;
}

.CodeMirror-gutters {
  background: transparent;
  border: none;
  margin-right: 15px;
}
.CodeMirror {
  height: 100%;
  background: transparent;
}

/* DEMO-SPECIFIC STYLES */
.CodeMirror-line.typewriter {
  overflow: hidden;
  white-space: nowrap;
  transform: scaleX(0);
  transform-origin: left;
  animation: typing 3.5s steps(30, end) forwards;
}

.CodeMirror-line.typewriter {
  overflow: hidden;
  white-space: nowrap;
  transform-origin: left;
  animation: typing 3.5s steps(30, end) forwards;
}

@keyframes typing {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@-webkit-keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

/* The typewriter cursor effect */
@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: orange; }
}
@-webkit@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: orange; }
}

/* Mevcut CodeMirror-linenumber stili */
.CodeMirror-linenumber {
  padding-right: 1em;
  color: #8a2dc066;
  text-shadow: 0 0 2px #393a33, 0 0 35px #ffffff44, 0 0 10px #8a2dc066, 0 0 2px #8a2dc066;
}

.CodeMirror-overlayscroll-horizontal div,
.CodeMirror-overlayscroll-vertical div {
  background: rgba(153, 99, 255, 0.5);
}
.CodeMirror-scrollbar-filler {
  display: none !important;
}


/* Blinking cursor for typing effect */
.CodeMirror-cursor {
  border-right: 2px solid rgba(255, 255, 255, 0.75);
  animation: blinkTextCursor 500ms infinite normal;
}


/* CodeMirror Tema Ayarları */
.highcontrast-dark .cm-header {
  font-weight: bold;
}

.highcontrast-dark .cm-strong {
  font-weight: bold;
}

.highcontrast-dark .cm-em {
  font-style: italic;
}

.highcontrast-dark .CodeMirror-cursor {
  border-left-color: white !important;
}

.highcontrast-dark .CodeMirror-selected {
  background: rgba(255, 255, 255, 0.05);
}

.highcontrast-dark .CodeMirror-focused .CodeMirror-selected {
  background: rgba(255, 255, 255, 0.1);
}

.highcontrast-dark .CodeMirror-matchbracket {
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.highcontrast-dark .CodeMirror-matchtag {
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.highcontrast-dark .powers {
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.highcontrast-dark .cm-searching {
  background: black;
  outline: 2px solid rgba(255, 255, 255, 0.25);
}

.highcontrast-dark .CodeMirror-hints,
.highcontrast-dark .emmet-abbreviation-preview {
  border: 1px solid #5a5f73;
  background: #1e1f26;
}

.highcontrast-dark .CodeMirror-hint {
  color: white;
}

.highcontrast-dark li.CodeMirror-hint-active {
  background: #c7c9d3;
  color: black;
}

.highcontrast-dark .project-editor-warning {
  background: rgba(255, 255, 255, 0.1);
}

/* Renk Tanımlamaları */
.highcontrast-dark .cm-atom,
.highcontrast-dark .cm-number {
  color: #9963ff; /* Mor */
}

.highcontrast-dark .box-html .cm-atom {
  color: #ff3c41;
}

.highcontrast-dark .cm-def,
.highcontrast-dark .cm-variable,
.highcontrast-dark .cm-variable-2,
.highcontrast-dark .box-js .cm-variable + .cm-property {
  color: #61e2ff; /* Açık mavi */
  text-shadow: 0 0 2px #001716, 0 0 5px #03edf933, 0 0 10px #ffff6633;
}

.highcontrast-dark .cm-header {
  color: #ff3c41;
}

.highcontrast-dark .cm-builtin {
  color: #ae63e4;
}


/* Önceki sarı renkleri devre dışı bırak */
.highcontrast-dark .cm-property,
.highcontrast-dark .cm-tag,
.highcontrast-dark .cm-keyword,
.highcontrast-dark .cm-operator,
.highcontrast-dark .cm-variable-3,
.highcontrast-dark .cm-attribute,
.highcontrast-dark .cm-qualifier,
.highcontrast-dark .cm-meta,
.highcontrast-dark .cm-string,
.highcontrast-dark .cm-string-2,
.highcontrast-dark .cm-tag.cm-bracket {
  color: #61e2ff !important; /* Açık mavi */
  text-shadow: 0 0 2px #001716, 0 0 5px #03edf933, 0 0 10px #ffff6633;
  font-style: normal;
}

.highcontrast-dark .cm-comment {
  font-style: italic;
  color: #9963ff99; /* Şeffaf mor */
  text-shadow: 0 0 2px #001716, 0 0 5px #03edf933, 0 0 10px #ffff6633;
}

body.editor.highcontrast-dark {
  background: #241b2f;
}

.highcontrast-dark .box.box.box,
.editor.highcontrast-dark .top-boxes,
.highcontrast-dark .CodeMirror-gutter-wrapper,
body.project.highcontrast-dark .editor-pane,
body.project.highcontrast-dark .editor {
  background: none;
}

.editor.highcontrast-dark .top-boxes {
  --swxfm__c: rgba(153, 99, 255);
  background: repeating-linear-gradient(
    to top,
    rgba(255, 255, 255, 0.03) 0px 2px,
    transparent 2px 4px
  ),
  linear-gradient(to bottom, #200933 75%, #3d0b43);
}

.editor.highcontrast-dark .top-boxes:after {
  content: '';
  height: 300px;
  width: 100%;
  display: block;
  background-image: linear-gradient(90deg, rgba(252, 25, 154, .1) 1px, rgba(0, 0, 0, 0) 1px),
                    linear-gradient(0deg, rgba(252, 25, 154, .1) 1px, rgba(0, 0, 0, 0) 1px);
  background-position: bottom;
  background-repeat: repeat;
  background-size: 20px 20px;
  left: -25px;
  position: absolute;
  pointer-events: none;
  bottom: 0;
  transform: perspective(100px) rotateX(60deg);
  z-index: 0;
}

.highcontrast-dark .box.box.box pre,
.editor.highcontrast-dark .top-boxes pre,
.highcontrast-dark .CodeMirror-gutter-wrapper pre,
body.project.highcontrast-dark .editor-pane pre,
body.project.highcontrast-dark .editor pre {
  color: #61e2ff; /* Açık mavi */
}

/* Terminal Login Modal */
.terminal-login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7); /* Yarı şeffaf arka plan overlay */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-in;
  pointer-events: all;
}

.terminal-login-modal .modal-content {
  background: linear-gradient(to bottom, #1a1a4d, #3d0b43);
  border: 2px solid #00f;
  filter: drop-shadow(0 0 10px #00f) brightness(1.2);
  padding: 20px;
  width: 400px;
  max-width: 90vw;
  position: relative;
  font-family: "Press Start 2P", cursive; /* Tüm içerik için font */
  color: #61e2ff;
  text-align: center; /* İçeriği ortala */
  display: flex;
  flex-direction: column;
  align-items: center; /* Yatayda ortala */
}

.terminal-login-modal .modal-content * {
  font-family: "Press Start 2P", cursive !important; /* Tüm alt elemanlara fontu zorla */
}

.terminal-login-modal .modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 20px;
  color: #61e2ff;
  text-shadow: 0 0 10px #00f;
  cursor: pointer;
  transition: all 0.3s ease;
}

.terminal-login-modal .modal-close:hover {
  color: #00f;
  text-shadow: 0 0 15px #00f;
  transform: scale(1.2);
}

.terminal-login-modal .welcome {
  margin-bottom: 20px;
  width: 100%;
  text-align: center; /* Metinleri ortala */
}

.terminal-login-modal .welcome .line {
  font-size: 14px;
  line-height: 1.5;
  text-shadow: 0 0 5px #03edf933, 0 0 10px #ffff6633;
  overflow: hidden;
  white-space: nowrap;
  display: inline-block; /* Animasyon için inline-block */
}

.terminal-login-modal .line1 {
  animation: type 0.5s steps(20, end) forwards;
}

.terminal-login-modal .line2 {
  animation: type 0.5s 0.5s steps(20, end) forwards;
}

.terminal-login-modal .line3 {
  animation: type 0.5s 1s steps(20, end) forwards;
}

@keyframes type {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.terminal-login-modal .blink {
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 49% {
    opacity: 0;
  }
  50%, 100% {
    opacity: 1;
  }
}

.terminal-login-modal form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%; /* Formun genişliği tam olsun */
  align-items: center; /* Form elemanlarını ortala */
}

.terminal-login-modal form label {
  font-size: 14px;
  text-shadow: 0 0 5px #03edf933;
  width: 100%; /* Label genişliği tam olsun */
  display: flex;
  flex-direction: column;
  align-items: center; /* Label içindeki metni ve inputu ortala */
}

.terminal-login-modal form input {
  background: transparent;
  border: 1px solid #61e2ff;
  padding: 8px;
  color: #61e2ff;
  text-shadow: 0 0 5px #03edf933;
  filter: drop-shadow(0 0 5px #00f);
  transition: all 0.3s ease;
  width: 80%; /* Input genişliği */
  text-align: center; /* Input içeriğini ortala */
}

.terminal-login-modal form input:focus {
  outline: none;
  border-color: #00f;
  filter: drop-shadow(0 0 10px #00f);
}

.terminal-login-modal form button {
  background: transparent;
  border: 1px solid #61e2ff;
  padding: 10px;
  color: #61e2ff;
  text-shadow: 0 0 10px #00f;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 50%; /* Buton genişliği */
}

.terminal-login-modal form button:hover {
  background: #00f;
  color: white;
  filter: drop-shadow(0 0 15px #00f);
}

/* Blinking cursor animation */
@keyframes blinkTextCursor {
  from { border-right-color: rgba(255, 255, 255, 0.75); }
  to { border-right-color: transparent; }
}

/* Fade-in animasyonu */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}