/* Loading Sequence Styles */
.loading-sequence {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
	background-color: #000000;
}

.loading-screen {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: #000000;
	transition: opacity 0.5s ease-in-out;
}

.company-logo {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

#company-logo-img {
	max-width: 250px;
	height: auto;
}

.fade-out {
	opacity: 0;
	transition: opacity 0.5s ease-in-out;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: Arial, sans-serif;
    touch-action: manipulation;
    position: relative;
    background: #000;
}

/* Force light rendering regardless of OS dark mode for critical UI */
:root { 
    color-scheme: only light; 
    /* Dark mode eklentilerine karşı özel değişkenler */
    --life-balloon-bg: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.85), rgba(180,180,180,0.2) 60%, rgba(0,0,0,0.25) 100%);
    --life-balloon-yellow: radial-gradient(circle at 50% 45%, rgba(255,255,200,0.9), rgba(255,235,59,0.9) 55%, rgba(180,150,0,0.7) 100%);
    --life-balloon-blue: radial-gradient(circle at 50% 45%, rgba(200,230,255,0.9), rgba(33,150,243,0.9) 55%, rgba(0,70,160,0.7) 100%);
    --life-balloon-red: radial-gradient(circle at 50% 45%, rgba(255,210,210,0.9), rgba(244,67,54,0.9) 55%, rgba(140,0,0,0.7) 100%);
    --life-balloon-green: radial-gradient(circle at 50% 45%, rgba(210,255,220,0.9), rgba(76,175,80,0.9) 55%, rgba(0,110,30,0.7) 100%);
    --life-balloon-purple: radial-gradient(circle at 50% 45%, rgba(235,220,255,0.9), rgba(156,39,176,0.9) 55%, rgba(90,0,110,0.7) 100%);
}

/* Keyboard-safe viewport height using --vh */
#game-container {
    position: relative;
    width: 100vw;
    height: calc(var(--vh, 1vh) * 100);
    overflow: hidden;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background: transparent;
}

/* (reverted) no canvas background override */

#gameUI {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Keep HUD visible when keyboard opens on mobile */
#score, #lives {
    position: fixed;
    top: max(env(safe-area-inset-top, 0px), 8px);
    color: #fff;
    font-size: 1.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    padding: 10px;
    pointer-events: none;
    z-index: 1000;
}

#score { left: max(env(safe-area-inset-left, 0px), 8px); }
#lives { right: max(env(safe-area-inset-right, 0px), 8px); display: flex; gap: 8px; align-items: center; }

/* Force-hide HUD when game over or menus request it */
.hud-hidden #score, .hud-hidden #lives { display: none !important; }

/* Skor göstergesi: sarı-mavi-kırmızı-mor-yeşil-turuncu akışlı efekt */
#score span, #finalScoreValue span {
  display: inline-block;
  background: linear-gradient(90deg,
    #ffeb3b,
    #2196f3,
    #f44336,
    #9c27b0,
    #4caf50,
    #ff9800,
    #ffeb3b
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: scoreFlow 6s linear infinite;
}

@keyframes scoreFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.life-balloon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--life-balloon-bg);
  position: relative;
  pointer-events: none;
  /* Dark mode eklentilerine karşı güçlü koruma */
  filter: none !important;
  -webkit-filter: none !important;
  color-scheme: only light !important;
  isolation: isolate !important;
  contain: layout style paint !important;
  transform: translateZ(0) !important;
  will-change: transform !important;
  -webkit-color-adjust: exact !important;
  color-adjust: exact !important;
}
.life-balloon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  mix-blend-mode: screen;
}
.life-balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 2px;
  height: 10px;
  background: rgba(255,255,255,0.6);
  transform: translateX(-50%);
}
/* Renk sırası: Sarı, Mavi, Kırmızı, Yeşil, Mor - Dark mode korumalı */
#lives .life-balloon:nth-child(1)::before {
  background: var(--life-balloon-yellow) !important;
  filter: none !important; 
  -webkit-filter: none !important; 
  mix-blend-mode: normal !important;
  color-scheme: only light !important;
  isolation: isolate !important;
  contain: layout style paint !important;
  transform: translateZ(0) !important;
}
#lives .life-balloon:nth-child(2)::before {
  background: var(--life-balloon-blue) !important;
  filter: none !important; 
  -webkit-filter: none !important; 
  mix-blend-mode: normal !important;
  color-scheme: only light !important;
  isolation: isolate !important;
  contain: layout style paint !important;
  transform: translateZ(0) !important;
}
#lives .life-balloon:nth-child(3)::before {
  background: var(--life-balloon-red) !important;
  filter: none !important; 
  -webkit-filter: none !important; 
  mix-blend-mode: normal !important;
  color-scheme: only light !important;
  isolation: isolate !important;
  contain: layout style paint !important;
  transform: translateZ(0) !important;
}
#lives .life-balloon:nth-child(4)::before {
  background: var(--life-balloon-green) !important;
  filter: none !important; 
  -webkit-filter: none !important; 
  mix-blend-mode: normal !important;
  color-scheme: only light !important;
  isolation: isolate !important;
  contain: layout style paint !important;
  transform: translateZ(0) !important;
}
#lives .life-balloon:nth-child(5)::before {
  background: var(--life-balloon-purple) !important;
  filter: none !important; 
  -webkit-filter: none !important; 
  mix-blend-mode: normal !important;
  color-scheme: only light !important;
  isolation: isolate !important;
  contain: layout style paint !important;
  transform: translateZ(0) !important;
}
.life-pop {
  animation: lifePop 380ms ease-out forwards;
}
@keyframes lifePop {
  0% { transform: scale(1); opacity: 1; filter: none; }
  60% { transform: scale(1.25); opacity: 1; filter: brightness(1.2); }
  100% { transform: scale(0); opacity: 0; filter: blur(2px); }
}

#typingBar {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    width: min(90vw, 600px);
    pointer-events: auto;
    z-index: 20;
}

/* From Uiverse.io by adamgiebl */
.form-control { position: relative; }
.input {
  --border-height: 2px;
  --border-before-color: rgba(255,255,255,0.35);
  --border-after-color: #47C9FF;
  color: #fff;
  font-size: 0.9rem;
  background-color: transparent;
  width: 100%;
  box-sizing: border-box;
  padding-inline: 0.5em;
  padding-block: 0.7em;
  border: none;
  border-bottom: var(--border-height) solid var(--border-before-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative; /* metni üstte tut */
  z-index: 1;
}
.input-border {
  position: absolute;
  background: var(--border-after-color);
  width: 0%;
  height: 2px;
  bottom: 0;
  left: 0;
  transition: width 0.3s cubic-bezier(0.6, -0.28, 0.735, 0.045);
  z-index: 0; /* çizgiyi metnin altında tut */
}
.input::placeholder { color: rgba(255,255,255,0.75); }
.input:focus { outline: none; }
.input:focus + .input-border { width: 100%; }
.input-alt {
  font-size: 1.2rem;
  padding-inline: 1em;
  padding-block: 0.8em;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.input-border-alt {
  height: 3px;
  background: linear-gradient(90deg, #FF6464 0%, #FFBF59 50%, #47C9FF 100%);
  transition: width 0.4s cubic-bezier(0.42, 0, 0.58, 1.00);
}
.input-alt:focus + .input-border-alt { width: 100%; }

#typingInput {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0;
    color: #fff;
}

#startScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    z-index: 10;
}

#gameOver {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    z-index: 10;
}

/* Oyun Bitti split text animasyonu */
.split-text-container {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #fff;
    overflow: hidden;
    margin-bottom: 10px;
}
.text-part {
    display: inline-block;
    position: relative;
    transform: translateX(0);
    animation-duration: 1.2s;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;
}
.space {
    display: inline-block;
    width: 0.5em;
}
.text-part.left { transform: translateX(-200%); animation-name: slide-in-left; }
.text-part.right { transform: translateX(200%); animation-name: slide-in-right; }
@keyframes slide-in-left {
    0% { transform: translateX(-200%); }
    100% { transform: translateX(0); }
}
@keyframes slide-in-right {
    0% { transform: translateX(200%); }
    100% { transform: translateX(0); }
}

#startScreen p {
    font-size: 1.1em;
    color: #ddd;
    margin: 0 20px 20px;
}

#gameOver p {
    font-size: 1.5em;
    margin-bottom: 30px;
}

/* Skor bildirimi */
.score-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(244, 67, 54, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1rem;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
    backdrop-filter: blur(10px);
}

.score-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.score-notification.hide {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
}

button {
    background: #4a3fff;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    border-radius: 5px;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

button:hover {
    background: #3a2fcc;
    transform: scale(1.05);
}

button:active {
    transform: scale(0.95);
}

/* From Uiverse.io by adamgiebl */
.uiverse {
  --duration: 7s;
  --easing: linear;
  --c-color-1: #ff5252;
  /* Changed to red */
  --c-color-2: #00bcd4;
  /* Changed to cyan */
  --c-color-3: #9c27b0;
  /* Changed to purple */
  --c-color-4: #ffeb3b;
  /* Changed to yellow */
  --c-shadow: rgba(0, 0, 0, 0.3);
  /* Changed shadow color */
  --c-shadow-inset-top: rgba(0, 0, 0, 0.5);
  /* Changed shadow color */
  --c-shadow-inset-bottom: rgba(0, 0, 0, 0.4);
  /* Changed shadow color */
  --c-radial-inner: #ff4081;
  /* Changed to pink */
  --c-radial-outer: #2196f3;
  /* Changed to blue */
  --c-color: #fff;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  outline: none;
  position: relative;
  cursor: pointer;
  border: none;
  display: table;
  border-radius: 24px;
  padding: 0;
  margin: 8px 0; /* dikey boşluk */
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.02em;
  line-height: 1.5;
  color: var(--c-color);
  background: radial-gradient(circle, var(--c-radial-inner), var(--c-radial-outer) 80%);
  box-shadow: 0 0 14px var(--c-shadow);
  pointer-events: auto;
}

.uiverse:before {
  content: '';
  pointer-events: none;
  position: absolute;
  z-index: 3;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  border-radius: 24px;
  box-shadow: inset 0 3px 12px var(--c-shadow-inset-top), inset 0 -3px 4px var(--c-shadow-inset-bottom);
}

.uiverse .wrapper {
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  overflow: hidden;
  border-radius: 24px;
  min-width: 132px;
  padding: 12px 0;
}

.uiverse .wrapper span {
  display: inline-block;
  position: relative;
  z-index: 1;
}

.uiverse .wrapper .circle {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  filter: blur(var(--blur, 8px));
  background: var(--background, transparent);
  transform: translate(var(--x, 0), var(--y, 0)) translateZ(0);
  animation: var(--animation, none) var(--duration) var(--easing) infinite;
}

.uiverse .wrapper .circle.circle-1, .uiverse .wrapper .circle.circle-9, .uiverse .wrapper .circle.circle-10 {
  --background: var(--c-color-4);
}

.uiverse .wrapper .circle.circle-3, .uiverse .wrapper .circle.circle-4 {
  --background: var(--c-color-2);
  --blur: 14px;
}

.uiverse .wrapper .circle.circle-5, .uiverse .wrapper .circle.circle-6 {
  --background: var(--c-color-3);
  --blur: 16px;
}

.uiverse .wrapper .circle.circle-2, .uiverse .wrapper .circle.circle-7, .uiverse .wrapper .circle.circle-8, .uiverse .wrapper .circle.circle-11, .uiverse .wrapper .circle.circle-12 {
  --background: var(--c-color-1);
  --blur: 12px;
}

.uiverse .wrapper .circle.circle-1 {
  --x: 0;
  --y: -40px;
  --animation: circle-1;
}

.uiverse .wrapper .circle.circle-2 {
  --x: 92px;
  --y: 8px;
  --animation: circle-2;
}

.uiverse .wrapper .circle.circle-3 {
  --x: -12px;
  --y: -12px;
  --animation: circle-3;
}

.uiverse .wrapper .circle.circle-4 {
  --x: 80px;
  --y: -12px;
  --animation: circle-4;
}

.uiverse .wrapper .circle.circle-5 {
  --x: 12px;
  --y: -4px;
  --animation: circle-5;
}

.uiverse .wrapper .circle.circle-6 {
  --x: 56px;
  --y: 16px;
  --animation: circle-6;
}

.uiverse .wrapper .circle.circle-7 {
  --x: 8px;
  --y: 28px;
  --animation: circle-7;
}

.uiverse .wrapper .circle.circle-8 {
  --x: 28px;
  --y: -4px;
  --animation: circle-8;
}

.uiverse .wrapper .circle.circle-9 {
  --x: 20px;
  --y: -12px;
  --animation: circle-9;
}

.uiverse .wrapper .circle.circle-10 {
  --x: 64px;
  --y: 16px;
  --animation: circle-10;
}

.uiverse .wrapper .circle.circle-11 {
  --x: 4px;
  --y: 4px;
  --animation: circle-11;
}

.uiverse .wrapper .circle.circle-12 {
  --blur: 14px;
  --x: 52px;
  --y: 4px;
  --animation: circle-12;
}

@keyframes circle-1 {
  33% {
    transform: translate(0px, 16px) translateZ(0);
  }

  66% {
    transform: translate(12px, 64px) translateZ(0);
  }
}

@keyframes circle-2 {
  33% {
    transform: translate(80px, -10px) translateZ(0);
  }

  66% {
    transform: translate(72px, -48px) translateZ(0);
  }
}

@keyframes circle-3 {
  33% {
    transform: translate(20px, 12px) translateZ(0);
  }

  66% {
    transform: translate(12px, 4px) translateZ(0);
  }
}

@keyframes circle-4 {
  33% {
    transform: translate(76px, -12px) translateZ(0);
  }

  66% {
    transform: translate(112px, -8px) translateZ(0);
  }
}

@keyframes circle-5 {
  33% {
    transform: translate(84px, 28px) translateZ(0);
  }

  66% {
    transform: translate(40px, -32px) translateZ(0);
  }
}

@keyframes circle-6 {
  33% {
    transform: translate(28px, -16px) translateZ(0);
  }

  66% {
    transform: translate(76px, -56px) translateZ(0);
  }
}

@keyframes circle-7 {
  33% {
    transform: translate(8px, 28px) translateZ(0);
  }

  66% {
    transform: translate(20px, -60px) translateZ(0);
  }
}

@keyframes circle-8 {
  33% {
    transform: translate(32px, -4px) translateZ(0);
  }

  66% {
    transform: translate(56px, -20px) translateZ(0);
  }
}

@keyframes circle-9 {
  33% {
    transform: translate(20px, -12px) translateZ(0);
  }

  66% {
    transform: translate(80px, -8px) translateZ(0);
  }
}

@keyframes circle-10 {
  33% {
    transform: translate(68px, 20px) translateZ(0);
  }

  66% {
    transform: translate(100px, 28px) translateZ(0);
  }
}

@keyframes circle-11 {
  33% {
    transform: translate(4px, 4px) translateZ(0);
  }

  66% {
    transform: translate(68px, 20px) translateZ(0);
  }
}

@keyframes circle-12 {
  33% {
    transform: translate(56px, 0px) translateZ(0);
  }

  66% {
    transform: translate(60px, -32px) translateZ(0);
  }
}
/* From Uiverse.io by Na3ar-17 */
.button {
  border: none;
  outline: none;
  background-color: #3a3a3a;
  width: 180px;
  height: 60px;
  font-size: 18px;
  color: #fff;
  font-weight: 600;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: relative;
  transition: all 0.3s;
  margin: 8px 0; /* dikey aralık */
  pointer-events: auto; /* tıklanabilir olsun */
}

.button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  width: 106%;
  height: 120%;
  z-index: -1;
  border-radius: inherit;
  transition: all 0.3s;
}

.gradient-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 106%;
  height: 115%;
  overflow: hidden;
  border-radius: inherit;
  z-index: -2;
  filter: blur(10px);
  transition: all 0.3s;
}

.gradient {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110%;
  aspect-ratio: 1;
  border-radius: 100%;
  transition: all 0.3s;
  background-image: linear-gradient(
    90deg,
    hsl(226, 81%, 64%),
    hsl(271, 81%, 64%),
    hsl(316, 81%, 64%),
    hsl(1, 81%, 64%),
    hsl(46, 81%, 64%),
    hsl(91, 81%, 64%),
    hsl(136, 81%, 64%),
    hsl(181, 81%, 64%)
  );
  animation: rotate 2s linear infinite;
  filter: blur(10px);
}

.label {
  width: 156px;
  height: 45px;
  text-align: center;
  line-height: 45px;
  border-radius: 22px;
  background-color: rgba(43, 43, 43, 1);
  background-image: linear-gradient(
    180deg,
    rgb(43, 43, 43) 0%,
    rgb(68, 68, 68) 100%
  );
}

.button:hover .gradient-container {
  transform: translate(-50%, -50%) scale(0.98);
  filter: blur(5px);
}

.button:hover .gradient {
  filter: blur(5px);
}

@keyframes rotate {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* From Uiverse.io by SelfMadeSystem */
.button {
  position: relative;
  width: 10rem;
  height: 3rem;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0; /* generic button paddingini sıfırla */
  box-shadow: none; /* generic button shadowu kaldır */
  margin: 10px 0; /* dikey aralık */
  pointer-events: auto;
}

.button svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.border {
  width: 100%;
  height: 100%;
  stroke: black;
  stroke-width: 2px;
  fill: #0000;
  rx: 1em;
  ry: 1em;
  stroke-dasharray: 25;
  transition: fill 0.25s;
  animation: 4s linear infinite stroke-animation;
}

.button:hover .border {
  fill: #0001;
}

.button:focus .border {
  transition: fill 0.25s 7.75s;
  fill: #0000;
}

@keyframes stroke-animation {
  0% {
    stroke-dashoffset: 100;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.txt-upload {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
}

.txt-upload::after {
  content: "";
}

.button:focus .rect {
  stroke-dasharray: 50;
}
.button:focus .border {
  stroke: #0000;
}

.button:focus .txt-upload {
  opacity: 0;
  transition: opacity 0.25s 8s;
}

.button:focus .txt-upload::after {
  animation: 0.66666s anim step-end forwards,
    1.33333s 0.6666s anim2 linear infinite alternate;
}

@keyframes anim {
  0% {
    content: "i";
  }
  50% {
    content: "in";
  }
  to {
    content: "ing";
  }
}

@keyframes anim2 {
  0% {
    content: "ing";
  }
  33% {
    content: "ing.";
  }
  66% {
    content: "ing..";
  }
  to {
    content: "ing...";
  }
}

.loading {
  width: 100%;
  height: 100%;
  stroke: #0055d4;
  stroke-width: 2px;
  fill: none;
  rx: 1em;
  ry: 1em;
  stroke-dasharray: 0 100;
}

.button:focus .loading {
  transition: stroke 0.5s 7.5s, stroke-dasharray 8s 0.5s ease-out;
  stroke: #08ca08;
  stroke-dasharray: 100 0;
}

.done {
  fill: none;
  stroke: #000;
  stroke-dasharray: 0 100;
}

.button:focus .done-cloud {
  transition: stroke-dasharray 0.75s 8.5s ease-out;
  stroke-dasharray: 100 0;
}

.button:focus .done-check {
  transition: stroke-dasharray 0.5s 9.2s ease-out;
  stroke: #08ca08;
  stroke-dasharray: 100 0;
}

/* Brand multi-color gradient buttons (logo colors) */
.brand-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(70vw, 260px);
  height: 56px;
  padding: 0 20px;
  border: none;
  border-radius: 16px;
  background: #0b0b0b; /* iç kısım siyah */
  color: #ffffff; /* yazı beyaz */
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  pointer-events: auto;
  margin: 10px 0;
  z-index: 0; /* pseudo katmanlar altında/üstünde sıralama için referans */
}

/* Hareketli çok renkli çerçeve */
.brand-button::before {
  content: "";
  position: absolute;
  inset: 0; /* ince çerçeve için kenara yapışık */
  border-radius: 18px;
  background: conic-gradient(
    from 0deg,
    #ffeb3b,
    #2196f3,
    #ff5252,
    #9c27b0,
    #4caf50,
    #ff9800,
    #ffeb3b
  );
  filter: saturate(1.05);
  animation: brandBorderSpin 5s linear infinite; /* daha sakin hareket */
  z-index: 0;
}

/* İç siyah dolguyu yeniden çizerek sadece kenarlığı görünür kıl */
.brand-button::after {
  content: "";
  position: absolute;
  inset: 2px; /* ince çerçeve: 2px */
  border-radius: 14px;
  background: #0b0b0b;
  z-index: 1;
}

/* Metni üst katmana al */
.brand-button span,
.brand-button { color: #fff; }
.brand-button > * { position: relative; z-index: 2; }

.brand-button:hover { transform: translateY(-1px) scale(1.01); }
.brand-button:active { transform: translateY(0) scale(0.98); }

@keyframes brandBorderSpin {
  to { transform: rotate(360deg); }
}

/* From Uiverse.io by reshades */
.button {
  width: 10em;
  height: 3em;
  background-color: #e8e8e810;
  color: #e8e8e8;
  border: 1.2px solid #e8e8e870;
  border-radius: 15px;
  transition: all 0.5s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  margin: 10px 0;
  position: relative;
  overflow: hidden;
}

/* Retry: menüyle birebir aynı renkli efekt katmanı (yedek) */
#restartBtn.button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -20px);
  width: 140%;
  height: 120%;
  border-radius: 18px;
  background: linear-gradient(90deg,
    #ffeb3b,
    #2196f3,
    #ff5252,
    #9c27b0,
    #4caf50,
    #ff9800,
    #ffeb3b
  );
  background-size: 300% 100%;
  filter: blur(24px);
  opacity: 0.8;
  z-index: 0;
  pointer-events: none;
  animation: anim 3s ease-in-out infinite, flow 6s linear infinite;
}


/* Buton yazı boyutu (Başla / Ayarlar / Hakkında) */
.button > span:not(.svg) {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.4px;
  position: relative;
  z-index: 1; /* efektin üstünde kalsın */
}

.button:hover {
  border: 1.2px solid #4073ff;
  background-color: #00000000;
}

.text {
  margin-top: 10px;
}

.svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -20px);
  width: 140%;
  height: 120%;
  filter: blur(24px);
  opacity: 0.8;
  z-index: 0; /* metnin altında, butonun üstünde */
  pointer-events: none;
  background: linear-gradient(90deg,
    #ffeb3b,
    #2196f3,
    #ff5252,
    #9c27b0,
    #4caf50,
    #ff9800,
    #ffeb3b
  );
  background-size: 300% 100%;
  animation: anim 3s ease-in-out infinite, flow 6s linear infinite;
}

@keyframes anim {
  0% { transform: translate(-50%, -26px); }
  50% { transform: translate(-50%, -14px); }
  100% { transform: translate(-50%, -26px); }
}

@keyframes flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.game-background-active {
    /* Koyu mavi gökyüzü gradyanı (görsel kullanılmıyor) */
    background-image: linear-gradient(180deg, #1e4f8a 0%, #6fb6ff 100%) !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

/* Basit bulut katmanı (hafif hareketli) */
/* Ön plan bulut katmanı (daha belirgin, yavaşça kayar) */
/* Özel bulut katmanları iptal edildi; arkaplan görseli kullanılacak */

.game-background-active::after { content: none; }
.game-background-active::before { content: none; }

/* Bulut animasyonları kaldırıldı */

@keyframes explode {
    0% { transform: scale(0); opacity: 0.8; background-color: rgba(255, 165, 0, 0.8); box-shadow: 0 0 10px 5px rgba(255, 200, 0, 0.7); }
    25% { transform: scale(1.2); opacity: 1; background-color: rgba(255, 69, 0, 1); box-shadow: 0 0 20px 10px rgba(255, 255, 0, 0.8); }
    50% { transform: scale(1.8); opacity: 0.7; background-color: rgba(255, 0, 0, 0.7); box-shadow: 0 0 30px 15px rgba(255, 100, 0, 0.6); }
    75% { transform: scale(2.2); opacity: 0.3; background-color: rgba(100, 0, 0, 0.5); box-shadow: 0 0 15px 7px rgba(100, 0, 0, 0.4); }
    100% { transform: scale(2.5); opacity: 0; background-color: rgba(0, 0, 0, 0); box-shadow: none; }
}

.explosion {
    position: absolute;
    animation: explode 0.7s ease-out forwards;
    pointer-events: none;
    z-index: 1000;
}

/* Hakkında modal (mobil uyumlu) */
#aboutModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
  pointer-events: auto; /* modal etkileşimli */
}

#aboutModal.active { display: flex; }

#aboutModal .about-content {
  width: 100%;
  max-width: 640px;
  max-height: 80vh;
  overflow: auto;
  background: #0f0f10;
  color: #eee;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 12px 12px 14px;
  box-shadow: none;
  transform: translateY(-3vh); /* mobil: biraz üste kaydır */
  position: relative;
}

#aboutModal .about-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
  position: relative;
}

#aboutModal h2 {
  font-size: 1.6rem;
  margin: 0;
}

#aboutModal p {
  font-size: 1rem;
  line-height: 1.6;
  color: #d6d6d6;
  margin: 8px 0;
}

#aboutModal .about-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 0.95rem;
  color: #bdbdbd;
}
#aboutModal .about-meta .website, #aboutModal .about-meta .email {
  width: 100%;
}
#aboutModal .about-meta a { color: #79b7ff; text-decoration: none; }
#aboutModal .about-meta a:hover { text-decoration: underline; }

#aboutCloseBtn {
  position: absolute;
  top: 0;
  right: 0;
  border: none;
  background: none;
  color: #ff6b6b;
  width: 40px;
  height: 40px;
  font-size: 20px;
  font-weight: normal;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
#aboutCloseBtn:hover { 
  background: #e81123;
  color: white;
}

@media (max-width: 480px) {
  #aboutModal .about-content {
    border-radius: 12px;
    padding: 16px 12px 12px;
  }
  #aboutModal h2 { font-size: 1.4rem; }
  #aboutModal p { font-size: 0.98rem; }
}

/* Ayarlar modal (mobil uyumlu) */
#settingsModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
  pointer-events: auto; /* modal etkileşimli */
}

/* Skor Tablosu Modal - Ayarlar tarzında */
#leaderboardModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
  pointer-events: auto;
  touch-action: none;
  overflow: hidden;
}

#leaderboardModal.active {
  display: flex;
  touch-action: none;
}

.leaderboard-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  touch-action: none;
  position: relative;
  pointer-events: auto;
}

.leaderboard-header {
  background: rgba(255,255,255,0.1);
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  position: relative;
  flex-shrink: 0;
}

.leaderboard-tabs {
  display: flex;
  gap: 10px;
  padding: 15px 20px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.leaderboard-tabs .tab {
  flex: 1;
  padding: 10px 20px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.leaderboard-tabs .tab:hover {
  background: rgba(255,255,255,0.2);
}

.leaderboard-tabs .tab.active {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.4);
  font-weight: 600;
}

.leaderboard-header h2 {
  color: white;
  margin: 0;
  font-size: 1.5rem;
  font-weight: bold;
}

.leaderboard-header button {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  color: #ff6b6b;
  font-size: 20px;
  font-weight: normal;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 0;
  transition: all 0.2s ease;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.leaderboard-header button:hover {
  background: #e81123;
  color: white;
}

#leaderboardCloseBtn {
  box-shadow: none !important;
  text-shadow: none !important;
}

.leaderboard-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  min-height: 0;
  touch-action: pan-y;
  will-change: scroll-position;
  position: relative;
  z-index: 1;
  /* Touch scroll için önemli */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.leaderboard-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  margin: 10px 0;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  /* Dark mode eklentilerine karşı güçlü koruma */
  filter: none !important;
  -webkit-filter: none !important;
  color-scheme: only light !important;
  isolation: isolate !important;
  contain: layout style paint !important;
  transform: translateZ(0) !important;
  will-change: transform !important;
  -webkit-color-adjust: exact !important;
  color-adjust: exact !important;
  /* Touch scroll için - item'lar scroll'u engellememeli */
  touch-action: auto;
  pointer-events: auto;
}

.leaderboard-item:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

/* 1. Sıra - Altın (Sadece Global Leaderboard) */
#leaderboardList .leaderboard-item:first-child {
  background: linear-gradient(135deg, #ffd700, #ffed4e) !important;
  border: 2px solid #ffd700 !important;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5) !important;
  animation: goldGlow 2s ease-in-out infinite alternate !important;
  filter: none !important; 
  -webkit-filter: none !important; 
  mix-blend-mode: normal !important;
  color-scheme: only light !important;
  isolation: isolate !important;
  contain: layout style paint !important;
  transform: translateZ(0) !important;
  will-change: transform !important;
  -webkit-color-adjust: exact !important;
  color-adjust: exact !important;
}

#leaderboardList .leaderboard-item:first-child::before {
  content: "👑";
  position: absolute;
  top: -5px;
  right: -5px;
  font-size: 1.5rem;
  animation: crownBounce 1.5s ease-in-out infinite;
}

#leaderboardList .leaderboard-item:first-child .leaderboard-rank {
  color: #b8860b;
  font-size: 1.4rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

#leaderboardList .leaderboard-item:first-child .leaderboard-name {
  color: #8b4513;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.5);
}

#leaderboardList .leaderboard-item:first-child .leaderboard-score {
  color: #8b4513;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.5);
}

/* 2. Sıra - Gümüş (Sadece Global Leaderboard) */
#leaderboardList .leaderboard-item:nth-child(2) {
  background: linear-gradient(135deg, #c0c0c0, #e8e8e8) !important;
  border: 2px solid #c0c0c0 !important;
  box-shadow: 0 0 15px rgba(192, 192, 192, 0.4) !important;
  animation: silverShine 2.5s ease-in-out infinite alternate !important;
  filter: none !important; 
  -webkit-filter: none !important; 
  mix-blend-mode: normal !important;
  color-scheme: only light !important;
  isolation: isolate !important;
  contain: layout style paint !important;
  transform: translateZ(0) !important;
  will-change: transform !important;
  -webkit-color-adjust: exact !important;
  color-adjust: exact !important;
}

#leaderboardList .leaderboard-item:nth-child(2)::before {
  content: "🥈";
  position: absolute;
  top: -5px;
  right: -5px;
  font-size: 1.3rem;
  animation: medalFloat 2s ease-in-out infinite;
}

#leaderboardList .leaderboard-item:nth-child(2) .leaderboard-rank {
  color: #696969;
  font-size: 1.3rem;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

#leaderboardList .leaderboard-item:nth-child(2) .leaderboard-name {
  color: #2f4f4f;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.3);
}

#leaderboardList .leaderboard-item:nth-child(2) .leaderboard-score {
  color: #2f4f4f;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.3);
}

/* 3. Sıra - Bronz (Sadece Global Leaderboard) */
#leaderboardList .leaderboard-item:nth-child(3) {
  background: linear-gradient(135deg, #cd7f32, #daa520) !important;
  border: 2px solid #cd7f32 !important;
  box-shadow: 0 0 12px rgba(205, 127, 50, 0.4) !important;
  animation: bronzeGlow 3s ease-in-out infinite alternate !important;
  filter: none !important; 
  -webkit-filter: none !important; 
  mix-blend-mode: normal !important;
  color-scheme: only light !important;
  isolation: isolate !important;
  contain: layout style paint !important;
  transform: translateZ(0) !important;
  will-change: transform !important;
  -webkit-color-adjust: exact !important;
  color-adjust: exact !important;
}

#leaderboardList .leaderboard-item:nth-child(3)::before {
  content: "🥉";
  position: absolute;
  top: -5px;
  right: -5px;
  font-size: 1.2rem;
  animation: medalFloat 2.2s ease-in-out infinite;
}

#leaderboardList .leaderboard-item:nth-child(3) .leaderboard-rank {
  color: #8b4513;
  font-size: 1.2rem;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

#leaderboardList .leaderboard-item:nth-child(3) .leaderboard-name {
  color: #654321;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.3);
}

#leaderboardList .leaderboard-item:nth-child(3) .leaderboard-score {
  color: #654321;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.3);
}

.leaderboard-rank {
  font-size: 1.2rem;
  font-weight: bold;
  color: #ffeb3b;
  min-width: 30px;
  text-align: center;
}

.leaderboard-flag {
  margin: 0 8px;
  display: flex;
  align-items: center;
}

.leaderboard-flag img {
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.2);
}

.leaderboard-name {
  flex: 1;
  margin: 0 15px;
  color: white;
  font-weight: 500;
}

.leaderboard-score {
  font-size: 1.1rem;
  font-weight: bold;
  color: #4caf50;
  text-align: right;
  min-width: 60px;
}

.loading-scores {
  text-align: center;
  color: white;
  padding: 40px;
  font-size: 1.1rem;
}

/* Leaderboard Animasyonları */
@keyframes goldGlow {
  0% {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    transform: scale(1.02);
  }
}

@keyframes silverShine {
  0% {
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.4);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 25px rgba(192, 192, 192, 0.7);
    transform: scale(1.01);
  }
}

@keyframes bronzeGlow {
  0% {
    box-shadow: 0 0 12px rgba(205, 127, 50, 0.4);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 20px rgba(205, 127, 50, 0.6);
    transform: scale(1.01);
  }
}

@keyframes crownBounce {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-3px) rotate(-5deg);
  }
  75% {
    transform: translateY(-1px) rotate(5deg);
  }
}

@keyframes medalFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-2px) rotate(3deg);
  }
}

/* Parıltı efekti (Sadece Global Leaderboard) */
#leaderboardList .leaderboard-item:first-child::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 3s infinite;
}

#leaderboardList .leaderboard-item:nth-child(2)::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 4s infinite;
}

#leaderboardList .leaderboard-item:nth-child(3)::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 5s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}


/* Welcome Modal */
#welcomeModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  pointer-events: auto;
}
.welcome-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.welcome-header {
    background: rgba(255,255,255,0.1);
    padding: 25px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}
.welcome-header h2 {
    color: white;
    margin: 0;
    font-size: 1.8rem;
    font-weight: bold;
}
.welcome-form {
    padding: 30px;
}
.welcome-section {
    margin-bottom: 25px;
}
.welcome-section label {
    display: block;
    color: white;
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 1.1rem;
}
.welcome-section input {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    box-sizing: border-box;
    background: rgba(255,255,255,0.9);
    color: #000 !important; /* Dark mode eklentisine karşı */
}
.welcome-language-buttons {
    display: flex;
    gap: 10px;
}
.lang-btn {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
}
.lang-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}
.lang-btn.active {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.8);
    font-weight: bold;
}
.welcome-buttons {
    margin-top: 30px;
}
.welcome-buttons .button {
    width: 100%;
}

/* Skor Gönderme Modal */
#submitScoreModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
  pointer-events: auto;
}

.submit-score-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.submit-score-header {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.submit-score-header h2 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
}

.submit-score-form {
    padding: 30px;
}

.submit-score-form label {
    display: block;
    color: white;
    margin-bottom: 10px;
    font-weight: 500;
}

.submit-score-form input {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 20px;
    box-sizing: border-box;
    background: rgba(255,255,255,0.9);
    color: #000 !important; /* Dark mode eklentisine karşı */
}

.submit-score-buttons {
    display: flex;
    gap: 15px;
}

.submit-score-buttons .button {
    flex: 1;
}

/* İlk Giriş Modal */
#welcomeModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  pointer-events: auto;
}

.welcome-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.welcome-header {
    background: rgba(255,255,255,0.1);
    padding: 25px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.welcome-header h2 {
    color: white;
    margin: 0;
    font-size: 1.8rem;
    font-weight: bold;
}

.welcome-form {
    padding: 30px;
}

.welcome-section {
    margin-bottom: 25px;
}

.welcome-section label {
    display: block;
    color: white;
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 1.1rem;
}

.welcome-section input {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    box-sizing: border-box;
    background: rgba(255,255,255,0.9);
    color: #000 !important; /* Dark mode eklentisine karşı */
}

.welcome-language-buttons {
    display: flex;
    gap: 10px;
}

.lang-btn {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

.lang-btn.active {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.8);
    font-weight: bold;
}

.welcome-buttons {
    margin-top: 30px;
}

.welcome-buttons .button {
    width: 100%;
}

/* Error Popup Modal */
.error-popup-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    animation: fadeIn 0.3s ease;
}

.error-popup-modal.active {
    display: flex;
}

.error-popup-content {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(244, 67, 54, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    animation: slideUp 0.3s ease;
}

.error-popup-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: shake 0.5s ease;
}

.error-popup-title {
    color: #fff;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 0 15px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.error-popup-message {
    color: #fff;
    font-size: 1.1rem;
    margin: 0 0 25px 0;
    line-height: 1.5;
    opacity: 0.95;
}

.error-popup-button {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 200px;
}

.error-popup-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.error-popup-button:active {
    transform: translateY(0);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

#settingsModal.active { display: flex; }

#settingsModal .settings-content {
  width: 100%;
  max-width: 640px;
  background: #0f0f10;
  color: #eee;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 12px;
  box-shadow: none;
  transform: translateY(-3vh);
  position: relative;
}

#settingsModal .settings-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  position: relative;
}

#settingsModal h2 { margin: 0; font-size: 1.6rem; }
#settingsCloseBtn {
  position: absolute;
  top: 0;
  right: 0;
  border: none;
  background: none;
  color: #ff6b6b;
  width: 40px;
  height: 40px;
  font-size: 20px;
  font-weight: normal;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
#settingsCloseBtn:hover { 
  background: #e81123;
  color: white;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px;
}
.settings-row label { font-size: 1rem; color: #d6d6d6; }
.settings-row select {
  appearance: none;
  background: #151515;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 1rem;
}

/* Settings: player name input desired style */
#playerNameSettings.input,
#playerNameSettings.input-alt,
#settingsModal #playerNameSettings {
  font-weight: 500;
  font-size: 14px;
  height: 40px;
  border-radius: 10px;
  padding-left: 10px;
  border: none;
  border-bottom: 1px solid #e5e5e5;
  outline: none;
  background: #151515;
  color: #fff;
}

#settingsModal #playerNameSettings:focus {
  border-bottom: 1px solid #6941c6;
  -webkit-transition: 0.1s;
  transition: 0.5s;
}

/* Save button next to input: compact */
#savePlayerNameBtn.button {
  width: auto;
  height: 40px;
  padding: 0 12px;
  margin-left: 8px;
}

#savePlayerNameBtn .svg { display: none; }
#savePlayerNameBtn span#savePlayerNameText { font-size: 14px; font-weight: 700; }

/* Layout: make input grow so button has room */
#settingsModal .settings-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap; /* tek satırda kalsın */
}

#settingsModal #playerNameSettings {
  flex: 1 1 50%; /* küçülebilsin */
  min-width: 0; /* flex item'ın küçülmesine izin ver */
}

#savePlayerNameBtn {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Flag selection styles */
.flag-selection {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.current-flag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
}

.current-flag img {
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.current-flag span {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
}

#flagSelect {
  appearance: none;
  background: #151515;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
}

#flagSelect:focus {
  outline: none;
  border-color: #6941c6;
}

/* Çok dar ekranlarda dikey diz (taşmayı önle) */
/* 1v1 Eşleşme Modal Styles */
#oneVsOneModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

#oneVsOneModal.active {
    display: flex;
}

.onevsone-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.onevsone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.onevsone-header h2 {
    color: #fff;
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

#oneVsOneCloseBtn {
    background: none !important;
    border: none !important;
    color: #fff !important;
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
    border-radius: 0 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-shadow: none !important;
    box-shadow: none !important;
}

#oneVsOneCloseBtn:hover {
    background: none !important;
    transform: scale(1.1);
}

.onevsone-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.onevsone-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.onevsone-section label {
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

#oneVsOnePlayerName {
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#oneVsOnePlayerName::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#oneVsOnePlayerName:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

#findGameBtn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

#findGameBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

#findGameBtn:active {
    transform: translateY(0);
}

/* Wave animation for button text when searching */
#findGameBtn .wave-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#findGameBtn .wave-text span {
    display: inline-block;
    font-size: 1.2rem;
    animation: wave 2s ease-in-out infinite;
}

#findGameBtn .wave-text span:nth-child(1) {
    animation-delay: 0s;
}

#findGameBtn .wave-text span:nth-child(2) {
    animation-delay: 0.2s;
}

#findGameBtn .wave-text span:nth-child(3) {
    animation-delay: 0.4s;
}

#findGameBtn .wave-text span:nth-child(4) {
    animation-delay: 0.6s;
}

#findGameBtn .wave-text span:nth-child(5) {
    animation-delay: 0.8s;
}

#findGameBtn .wave-text span:nth-child(6) {
    animation-delay: 1s;
}

#findGameBtn .wave-text span:nth-child(7) {
    animation-delay: 1.2s;
}

#findGameBtn .wave-text span:nth-child(8) {
    animation-delay: 1.4s;
}

#findGameBtn .wave-text span:nth-child(9) {
    animation-delay: 1.6s;
}

#findGameBtn .wave-text span:nth-child(10) {
    animation-delay: 1.8s;
}

#findGameBtn .wave-text span:nth-child(11) {
    animation-delay: 2s;
}

#findGameBtn .wave-text span:nth-child(12) {
    animation-delay: 2.2s;
}

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

.onevsone-status {
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.onevsone-status.waiting {
    background: rgba(255, 193, 7, 0.2);
    border: 2px solid #ffc107;
    color: #ffc107;
}

.onevsone-status.connected {
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid #4caf50;
    color: #4caf50;
}

.onevsone-status.error {
    background: rgba(244, 67, 54, 0.2);
    border: 2px solid #f44336;
    color: #f44336;
}

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

/* Private Match Modal Stilleri */
/* Private Match Modal - 1v1 Style with Mobile Support */
#privateMatchModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

#privateMatchModal.active {
    display: flex;
}

.private-match-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.private-match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.private-match-header h2 {
    color: #fff;
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

#privateMatchCloseBtn {
    background: none !important;
    border: none !important;
    color: #fff !important;
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
    border-radius: 0 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-shadow: none !important;
    box-shadow: none !important;
}

#privateMatchCloseBtn:hover {
    background: none !important;
    transform: scale(1.1);
}

.private-match-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.private-match-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.private-match-section:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.code-display-section {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.code-input-section {
    background: rgba(33, 150, 243, 0.2);
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.requests-section {
    background: rgba(255, 152, 0, 0.2);
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.code-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-align: center;
}

.private-match-section h3 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.private-match-section input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    text-align: center;
    letter-spacing: 1px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.private-match-section input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.private-match-section input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.private-match-section button {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.copyMyCodeBtn {
    background: linear-gradient(145deg, #4caf50, #45a049);
    color: #fff;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(76, 175, 80, 0.3);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
}

.copyMyCodeBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.copyMyCodeBtn:hover::before {
    left: 100%;
}

.copyMyCodeBtn:hover {
    background: linear-gradient(145deg, #45a049, #3d8b40);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
    border-color: rgba(76, 175, 80, 0.5);
}

.copyMyCodeBtn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.sendRequestBtn {
    background: linear-gradient(145deg, #2196f3, #1976d2);
    color: #fff;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(33, 150, 243, 0.3);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.2);
}

.sendRequestBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.sendRequestBtn:hover::before {
    left: 100%;
}

.sendRequestBtn:hover {
    background: linear-gradient(145deg, #1976d2, #1565c0);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
    border-color: rgba(33, 150, 243, 0.5);
}

.sendRequestBtn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.requests-list {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 15px;
}

.requests-list::-webkit-scrollbar {
    width: 6px;
}

.requests-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.requests-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.requests-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.request-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.request-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(3px);
}

.request-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.request-player-name {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

.request-time {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.request-actions {
    display: flex;
    gap: 8px;
}

.request-btn {
    flex: 1;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.accept-btn {
    background: #4caf50;
    color: #fff;
}

.accept-btn:hover {
    background: #45a049;
    transform: scale(1.05);
}

.reject-btn {
    background: #f44336;
    color: #fff;
}

.reject-btn:hover {
    background: #d32f2f;
    transform: scale(1.05);
}

.private-match-status {
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.private-match-status.success {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.private-match-status.error {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.private-match-status.info {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.private-match-status.connected {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .private-match-content {
        padding: 20px;
        max-width: 95%;
        margin: 10px;
        max-height: 90vh;
    }
    
    .private-match-header h2 {
        font-size: 1.5rem;
    }
    
    .private-match-section {
        padding: 15px;
    }
    
    .private-match-section h3 {
        font-size: 1.1rem;
    }
    
    .private-match-section input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .private-match-section button {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .request-item {
        padding: 10px;
    }
    
    .request-player-name {
        font-size: 0.9rem;
    }
    
    .request-time {
        font-size: 0.7rem;
    }
    
    .request-btn {
        padding: 5px 10px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .private-match-content {
        padding: 15px;
        border-radius: 15px;
    }
    
    .private-match-header h2 {
        font-size: 1.3rem;
    }
    
    .private-match-section {
        padding: 12px;
        border-radius: 12px;
    }
    
    .private-match-section h3 {
        font-size: 1rem;
    }
    
    .private-match-section input {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .private-match-section button {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .request-item {
        padding: 8px;
    }
    
    .request-info {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .request-actions {
        width: 100%;
        justify-content: center;
    }
}

/* Android Badge Animation */
@keyframes pulse-badge {
    0%, 100% {
        transform: rotate(-15deg) scale(1);
    }
    50% {
        transform: rotate(-15deg) scale(1.1);
    }
}

#android-badge {
    animation: pulse-badge 1.5s ease-in-out infinite;
}

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

