/* ==========================================================================
   CUPHEAD MOBİL - ULTRA ERGONOMİK TOUCH & 1930'LAR VİNTAGE CARTOON STİLİ
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #050302;
  font-family: 'Luckiest Guy', 'Impact', cursive, sans-serif;
  touch-action: none;
  position: fixed;
}

/* ================= EKRAN DÖNDÜRME UYARISI (PORTRAIT) ================= */
#orientation-warning {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background: radial-gradient(circle at center, #2e1809 0%, #0d0603 100%);
  color: #f7e1b5;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px;
}

/* Saf dikey ekranda veya JS tetiklemesinde aç */
@media (orientation: portrait) {
  #orientation-warning:not(.dismissed) {
    display: flex !important;
  }
}

.phone-rotate-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.phone-rotate-graphic {
  width: 58px;
  height: 96px;
  border: 4px solid #f5c542;
  border-radius: 12px;
  background: #1a0f07;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 25px rgba(245, 197, 66, 0.4);
  animation: smoothRotateLandscape 2.4s infinite ease-in-out;
}

.phone-rotate-graphic::before {
  content: '';
  position: absolute;
  top: 6px;
  width: 16px;
  height: 3px;
  background: #f5c542;
  border-radius: 2px;
}

.phone-screen-inner {
  font-size: 26px;
  animation: mugStayUpright 2.4s infinite ease-in-out;
}

@keyframes smoothRotateLandscape {
  0%, 20% {
    transform: rotate(0deg) scale(1);
    border-color: #f5c542;
  }
  50%, 75% {
    transform: rotate(-90deg) scale(1.1);
    border-color: #34c759;
  }
  100% {
    transform: rotate(0deg) scale(1);
    border-color: #f5c542;
  }
}

@keyframes mugStayUpright {
  0%, 20% { transform: rotate(0deg); }
  50%, 75% { transform: rotate(90deg); }
  100% { transform: rotate(0deg); }
}

.rotate-arrow-badge {
  margin-top: 14px;
  font-family: 'Luckiest Guy', cursive;
  font-size: 16px;
  color: #ffd24d;
  background: rgba(255, 210, 77, 0.15);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #ffd24d;
  letter-spacing: 1px;
}

#orientation-warning h2 {
  font-size: clamp(22px, 5vw, 30px);
  color: #ff3b30;
  margin-bottom: 10px;
  text-shadow: 2px 2px 0 #000;
}

#orientation-warning p {
  font-family: sans-serif;
  font-size: 14px;
  color: #eed6a8;
  max-width: 320px;
  line-height: 1.4;
  margin-bottom: 20px;
}

.gold-pill-btn {
  background: linear-gradient(180deg, #ffd359 0%, #c48b16 100%);
  color: #2b1704;
  border: 2px solid #fff;
  border-radius: 25px;
  padding: 10px 22px;
  font-family: 'Luckiest Guy', cursive;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.6);
  transition: transform 0.15s;
}

.gold-pill-btn:active {
  transform: scale(0.96);
}

/* ================= 1P / 2P MOD SEÇİCİ & HİKAYE ================= */
.player-mode-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  z-index: 30;
}

.mode-select-btn {
  background: rgba(43, 23, 4, 0.85);
  color: #f7e1b5;
  border: 2px solid #a87233;
  border-radius: 20px;
  padding: 8px 16px;
  font-family: 'Luckiest Guy', cursive;
  font-size: clamp(12px, 2.5vmin, 15px);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}

.mode-select-btn.active {
  background: linear-gradient(180deg, #ffd359 0%, #d48b14 100%);
  color: #1e0e02;
  border-color: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(255, 211, 89, 0.6);
}

.title-action-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  z-index: 30;
}

.story-book-btn {
  background: linear-gradient(180deg, #8b4513 0%, #522707 100%);
  color: #ffe8b3;
  border: 2px solid #d49a43;
  border-radius: 25px;
  padding: 10px 18px;
  font-family: 'Luckiest Guy', cursive;
  font-size: clamp(13px, 2.6vmin, 16px);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  transition: transform 0.15s;
}

.story-book-btn:active {
  transform: scale(0.95);
}

/* ================= HİKAYE KİTABI EKRANI (STORY BOOK) ================= */
#story-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 45;
  background: rgba(13, 6, 2, 0.92);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.story-book-frame {
  width: min(850px, 92vw);
  height: min(520px, 86vh);
  background: #fdf5df;
  border: 8px solid #4a2810;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8), inset 0 0 50px rgba(139, 69, 19, 0.25);
  display: flex;
  flex-direction: column;
  padding: 20px;
  position: relative;
  color: #2b1704;
}

.story-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-bottom: 2px solid #8b4513;
  padding-bottom: 8px;
}

.story-header h2 {
  font-size: clamp(20px, 4vmin, 28px);
  color: #8b1e0f;
  margin: 0;
  letter-spacing: 1px;
}

.story-ornament {
  font-size: 20px;
  color: #c48b16;
}

.story-pages-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  overflow-y: auto;
}

.story-page-content {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 760px;
}

.story-page-img-box {
  flex: 0 0 clamp(110px, 20vmin, 180px);
  height: clamp(110px, 20vmin, 180px);
  border: 4px solid #8b4513;
  border-radius: 12px;
  background: #ecd2a5;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: clamp(48px, 10vmin, 76px);
  box-shadow: inset 0 0 15px rgba(0,0,0,0.2);
}

.story-page-text-box {
  flex: 1;
}

.story-page-title {
  font-family: 'Luckiest Guy', cursive;
  font-size: clamp(16px, 3.2vmin, 22px);
  color: #8b1e0f;
  margin-bottom: 8px;
}

.story-page-desc {
  font-family: 'Georgia', serif;
  font-size: clamp(13px, 2.3vmin, 16px);
  line-height: 1.55;
  color: #3b220c;
}

.story-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 2px solid #8b4513;
  padding-top: 10px;
  gap: 10px;
}

.story-nav-btn {
  background: #8b4513;
  color: #fff;
  border: none;
  border-radius: 18px;
  padding: 8px 16px;
  font-family: 'Luckiest Guy', cursive;
  font-size: 13px;
  cursor: pointer;
}

.story-page-indicator {
  font-family: 'Luckiest Guy', cursive;
  font-size: 14px;
  color: #6d3a12;
}

.story-close-btn {
  padding: 8px 18px;
  font-size: 13px;
}

/* ================= ANA OYUN KONTEYNERİ & CANVAS ================= */
#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background: #080604;
}

#gameCanvas {
  max-width: 100vw;
  max-height: 100vh;
  aspect-ratio: 16 / 9;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  box-shadow: 0 0 40px rgba(0,0,0,0.9);
}

/* ================= 1930'LAR VİNTAGE FİLM & GREN EFEKTLERİ ================= */
#screen-filter {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  background: radial-gradient(circle at center, rgba(255, 235, 175, 0.06) 0%, rgba(60, 30, 10, 0.25) 100%);
  mix-blend-mode: multiply;
}

#film-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 11;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.03) 0px,
    rgba(0, 0, 0, 0.03) 2px,
    transparent 2px,
    transparent 4px
  );
  animation: filmFlicker 0.15s infinite;
}

@keyframes filmFlicker {
  0% { opacity: 0.85; }
  50% { opacity: 0.98; }
  100% { opacity: 0.88; }
}

#film-vignette {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 12;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.75), inset 0 0 140px rgba(20, 10, 4, 0.9);
}

#film-scratches {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 13;
  opacity: 0.35;
  background-image: 
    linear-gradient(90deg, transparent 49.8%, rgba(255, 255, 255, 0.4) 50%, transparent 50.2%);
  background-size: 320px 100%;
  animation: scratchJitter 0.25s infinite steps(4);
}

@keyframes scratchJitter {
  0% { background-position: 0 0; }
  50% { background-position: 80px 0; }
  100% { background-position: -60px 0; }
}

/* ================= MOBİL ÜST KONTROL ÇUBUĞU ================= */
#mobile-top-bar {
  position: absolute;
  top: 6px;
  left: 10px;
  right: 10px;
  z-index: 25;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.top-bar-right {
  display: flex;
  gap: 6px;
}

.top-icon-btn {
  pointer-events: auto;
  background: rgba(25, 14, 6, 0.85);
  border: 1.5px solid #ecd3a7;
  color: #fff;
  font-family: 'Luckiest Guy', cursive;
  font-size: clamp(10px, 2.2vmin, 13px);
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-icon-btn:active {
  transform: scale(0.92);
  background: #ecd3a7;
  color: #1a0d05;
}

.top-icon-btn.active {
  background: #27ae60;
  border-color: #fff;
}

.weapon-indicator {
  background: rgba(230, 43, 30, 0.85);
  border: 2px solid #fff;
  color: #fff;
  padding: 3px 12px;
  border-radius: 16px;
  font-size: clamp(10px, 2vmin, 12px);
  letter-spacing: 0.5px;
  pointer-events: none;
}

/* ================= 1. GİRİŞ EKRANI (TITLE SCREEN) ================= */
#title-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 28;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 12px;
  text-align: center;
  overflow: hidden;
  background: #150306;
}

#title-screen::before {
  content: '';
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  z-index: -1;
  background-color: #7b1923;
  background-image:
    radial-gradient(circle at center, rgba(255, 225, 230, 0.22) 0%, rgba(100, 16, 26, 0.60) 45%, rgba(14, 2, 5, 0.96) 80%),
    repeating-conic-gradient(
      from 0deg at 50% 50%,
      #7e1b26 0deg 7.5deg,
      #d46473 7.5deg 15deg
    );
  animation: slowSunburstSpin 70s linear infinite;
  pointer-events: none;
}

@keyframes slowSunburstSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.title-badge {
  font-size: clamp(10px, 2vmin, 13px);
  background: #2b080d;
  color: #ffdf9e;
  padding: 3px 14px;
  border-radius: 16px;
  border: 1.5px solid #ffcd63;
  margin-bottom: 4px;
}

.main-title {
  font-size: clamp(44px, 10vmin, 76px);
  color: #e62b1e;
  -webkit-text-stroke: 2.5px #1a0902;
  text-shadow: 4px 4px 0 #ffd700, 6px 6px 0 #000;
  letter-spacing: 2px;
  line-height: 0.9;
  margin-bottom: 4px;
}

.sub-title {
  font-size: clamp(12px, 2.5vmin, 17px);
  color: #fff0d0;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.cuphead-hero-anim {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8px;
}

.hero-video-preview {
  width: clamp(200px, 28vmin, 260px);
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  filter: contrast(1.1) brightness(1.0);
  border: 3px solid #ffcc66;
  border-radius: 14px;
  box-shadow: 0 0 25px rgba(255, 204, 102, 0.35), 0 8px 24px rgba(0, 0, 0, 0.7);
  background: #000;
  pointer-events: none;
  animation: heroPulse 1.4s infinite ease-in-out alternate;
}

@keyframes heroPulse {
  0% { transform: scale(1) translateY(0); }
  100% { transform: scale(1.04) translateY(-4px); }
}

.cuphead-subtitle-tag {
  font-size: 12px;
  color: #ffde8a;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
  font-family: sans-serif;
  font-weight: bold;
}

.start-btn {
  font-family: 'Luckiest Guy', cursive;
  font-size: clamp(18px, 4vmin, 26px);
  padding: 10px 30px;
  background: linear-gradient(180deg, #ff4136 0%, #a81308 100%);
  color: #fff;
  border: 3px solid #fff;
  border-radius: 25px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.6);
  cursor: pointer;
  margin-bottom: 10px;
  animation: pulseBtn 0.9s infinite alternate;
}

@keyframes pulseBtn {
  0% { transform: scale(0.97); }
  100% { transform: scale(1.03); }
}

.instructions-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  background: rgba(30, 15, 6, 0.85);
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid #ecd3a7;
  color: #fff;
  font-family: sans-serif;
  font-size: clamp(9px, 1.8vmin, 12px);
  text-align: left;
  max-width: 580px;
}

.key-tag-pink {
  background: #ff55bb;
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: bold;
}

/* ================= 2. DÜNYA HARİTASI (STAGE SELECT) ================= */
#map-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 30;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: radial-gradient(circle at center, #eed6a8 0%, #ba8a4d 70%, #4a2d14 100%);
  color: #2b1704;
  overflow-y: auto;
}

.map-header h2 {
  font-size: clamp(24px, 5vmin, 36px);
  color: #d62828;
  -webkit-text-stroke: 1.5px #1c0e05;
  text-shadow: 2px 2px 0 #ffeaa7;
}

.map-header p {
  font-size: 11px;
  letter-spacing: 1px;
  color: #4a2810;
}

.boss-cards-container {
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  max-width: 1080px;
  overflow-x: auto;
  padding: 8px 4px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.boss-card {
  flex: 0 0 clamp(180px, 24vw, 240px);
  scroll-snap-align: center;
  background: #fff8e8;
  border: 2.5px solid #361f0e;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 6px 14px rgba(0,0,0,0.35);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.boss-card:active {
  transform: scale(0.97);
}

.devil-card {
  border-color: #8f1111;
  background: #fff0f0;
}

.boss-card-icon {
  font-size: clamp(28px, 6vmin, 38px);
}

.boss-card-title {
  font-size: clamp(14px, 2.5vmin, 17px);
  color: #2b1704;
}

.devil-title {
  color: #b31212;
}

.boss-card-sub {
  font-size: 10px;
  color: #8c5d2b;
  font-style: italic;
  font-family: sans-serif;
  margin-bottom: 4px;
}

.boss-card-phases {
  font-family: sans-serif;
  font-size: 10px;
  color: #4f3315;
  line-height: 1.3;
  background: rgba(0,0,0,0.04);
  padding: 4px;
  border-radius: 5px;
  margin-bottom: 8px;
  text-align: left;
}

.boss-select-btn {
  background: linear-gradient(180deg, #ff9f1a 0%, #c46800 100%);
  color: #fff;
  border: 1.5px solid #361f0e;
  border-radius: 16px;
  font-family: 'Luckiest Guy', cursive;
  font-size: 13px;
  padding: 6px;
  cursor: pointer;
}

.devil-btn {
  background: linear-gradient(180deg, #e62b1e 0%, #871008 100%);
}

.map-equip-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  background: rgba(30, 15, 6, 0.85);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1.5px solid #ecd3a7;
  color: #ffdf9e;
  font-size: 11px;
  font-family: sans-serif;
}

/* ================= 3. ANONSLAR & DÖVÜŞ EKRANLARI ================= */
#announcement-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 26;
  display: none;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.announcement-text {
  font-size: clamp(48px, 12vmin, 90px);
  color: #ffd700;
  -webkit-text-stroke: 3px #1c0e05;
  text-shadow: 4px 4px 0 #e62b1e, 8px 8px 0 #000;
  animation: announcePop 1.4s forwards ease-out;
}

@keyframes announcePop {
  0% { transform: scale(0.4) rotate(-6deg); opacity: 0; }
  25% { transform: scale(1.1) rotate(2deg); opacity: 1; }
  50% { transform: scale(1.0); opacity: 1; }
  85% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1.2) rotate(4deg); opacity: 0; }
}

#knockout-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 900;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.65);
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.knockout-banner {
  font-size: clamp(42px, 10vmin, 80px);
  color: #ff2a2a;
  -webkit-text-stroke: 3px #fff;
  text-shadow: 6px 6px 0 #000;
  letter-spacing: 2px;
}

/* ================= 4. ZAFER / SONUÇ KARTI ================= */
#victory-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85%;
  max-width: 380px;
  background: radial-gradient(circle at center, #fff6de 0%, #eed59e 100%);
  border: 4px solid #2e1505;
  border-radius: 16px;
  padding: 14px 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  z-index: 999;
  display: none;
  color: #2b1704;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
}

.victory-title {
  font-size: 22px;
  color: #d62828;
  margin-bottom: 4px;
}

.grade-display {
  font-size: 52px;
  color: #ffd700;
  -webkit-text-stroke: 2.5px #1f0b00;
  text-shadow: 3px 3px 0 #d62828;
  margin: 2px 0 6px;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1.5px dashed #a8814d;
  padding: 4px 0;
  font-family: sans-serif;
  font-weight: bold;
  font-size: 13px;
}

/* ================= 5. ÖLÜM EKRANI (YOU DIED) ================= */
#death-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 32;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(18, 5, 2, 0.92);
  color: #fff;
  padding: 16px;
  text-align: center;
}

.death-title {
  font-size: clamp(44px, 9vmin, 74px);
  color: #e62b1e;
  -webkit-text-stroke: 2.5px #000;
  text-shadow: 4px 4px 0 #2e0805;
  margin-bottom: 6px;
}

.death-quote-card {
  background: rgba(255, 245, 220, 0.12);
  border: 1.5px solid #ecd3a7;
  border-radius: 10px;
  padding: 8px 14px;
  max-width: 480px;
  margin-bottom: 14px;
}

.death-quote-card p {
  font-family: sans-serif;
  font-style: italic;
  font-size: 13px;
  color: #ffdf9e;
}

.progress-track {
  position: relative;
  width: 75%;
  max-width: 420px;
  height: 10px;
  background: #3b1e10;
  border: 1.5px solid #ecd3a7;
  border-radius: 6px;
  margin: 18px 0;
}

.progress-player-marker {
  position: absolute;
  top: -26px;
  font-size: 26px;
}

.progress-boss-marker {
  position: absolute;
  top: -26px;
  right: -8px;
  font-size: 26px;
}

.retry-prompt {
  font-family: 'Luckiest Guy', cursive;
  font-size: 18px;
  background: linear-gradient(180deg, #ffd359 0%, #c48b16 100%);
  color: #2b1704;
  border: 2px solid #fff;
  border-radius: 25px;
  padding: 8px 24px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.6);
  margin-top: 6px;
}

.sub-map-btn {
  background: transparent;
  color: #ecd3a7;
  border: 1.5px solid #ecd3a7;
  border-radius: 18px;
  padding: 5px 14px;
  font-family: 'Luckiest Guy', cursive;
  font-size: 12px;
  margin-top: 6px;
  cursor: pointer;
}

/* ================= 6. ULTRA ERGONOMİK MOBİL DOKUNMATİK PANEL (HUD) ================= */
#touch-controls {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 22;
  box-sizing: border-box;
  padding: 8px 12px;
}

/* SOL: KOMPAKT ŞEFFAF SANAL JOYSTICK (SOL ALTTA SABİT) */
#touch-joystick-zone {
  position: absolute;
  bottom: clamp(10px, 3vh, 22px);
  left: clamp(12px, 3vw, 24px);
  width: clamp(90px, 22vmin, 120px);
  height: clamp(90px, 22vmin, 120px);
  pointer-events: auto;
  touch-action: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

#joystick-base {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 230, 180, 0.15) 0%, rgba(30, 15, 6, 0.35) 80%);
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

#joystick-stick {
  position: absolute;
  width: clamp(38px, 9.5vmin, 48px);
  height: clamp(38px, 9.5vmin, 48px);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 212, 128, 0.85) 0%, rgba(196, 128, 22, 0.85) 70%, rgba(90, 46, 5, 0.9) 100%);
  border: 2px solid #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
  transform: translate(0px, 0px);
  pointer-events: none;
  transition: transform 0.04s ease-out;
}

.joystick-arrow {
  position: absolute;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

.arrow-up { top: 4px; }
.arrow-down { bottom: 4px; }
.arrow-left { left: 5px; }
.arrow-right { right: 5px; }

/* SAĞ: KAVİSLİ ŞEFFAF ARCADE BUTONLARI (SAĞ ALTTA SABİT) */
#touch-action-cluster {
  position: absolute;
  bottom: clamp(10px, 3vh, 22px);
  right: clamp(12px, 3vw, 24px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  pointer-events: auto;
  touch-action: none;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-row-top {
  margin-bottom: 2px;
  justify-content: flex-end;
}

.action-row-main {
  justify-content: flex-end;
}

/* ŞEFFAF YARI SAYDAM ARCADE BUTONLARI (ARKA PLANI ASLA KAPATMAZ) */
.action-btn {
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: #ffffff;
  font-family: 'Luckiest Guy', cursive;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  user-select: none;
  touch-action: manipulation;
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform 0.08s, background 0.15s;
}

.action-btn:active {
  transform: scale(0.91);
}

.sm-btn {
  width: clamp(38px, 9.5vmin, 46px);
  height: clamp(38px, 9.5vmin, 46px);
  font-size: 9px;
}

.md-btn {
  width: clamp(44px, 11vmin, 54px);
  height: clamp(44px, 11vmin, 54px);
  font-size: 10px;
}

.lg-btn {
  width: clamp(52px, 13vmin, 66px);
  height: clamp(52px, 13vmin, 66px);
  font-size: 12px;
}

.btn-icon {
  font-size: clamp(14px, 3vmin, 20px);
  line-height: 1;
}

.lg-btn .btn-icon {
  font-size: clamp(18px, 4vmin, 24px);
}

.btn-label {
  font-size: clamp(8px, 1.8vmin, 10px);
  margin-top: 1px;
}

/* BUTON RENKLERİ VE PARLAMA EFEKTLERİ */
.wep-btn {
  background: rgba(41, 128, 185, 0.55);
}

.lock-btn {
  background: rgba(108, 52, 131, 0.55);
}

.lock-btn.active {
  background: rgba(241, 196, 15, 0.85);
  color: #1a0e05;
}

.dash-btn {
  background: rgba(180, 180, 180, 0.55);
}

.ex-btn {
  background: rgba(211, 84, 0, 0.6);
}

.ex-btn.ready-1 {
  background: rgba(230, 126, 34, 0.85);
  border-color: #ffd700;
  animation: exCardGlow 0.8s infinite alternate;
}

.ex-btn.ready-5 {
  background: rgba(0, 168, 255, 0.9) !important;
  border-color: #fff !important;
  animation: superPulse 0.4s infinite alternate;
}

@keyframes exCardGlow {
  0% { box-shadow: 0 0 6px #f39c12; }
  100% { box-shadow: 0 0 16px #e67e22; }
}

@keyframes superPulse {
  0% { transform: scale(1.0); box-shadow: 0 0 8px #00d2d3; }
  100% { transform: scale(1.06); box-shadow: 0 0 20px #0984e3; }
}

.shoot-btn {
  background: rgba(231, 76, 60, 0.7);
  border-color: #ff9999;
}

.jump-btn {
  background: rgba(232, 67, 147, 0.75);
  border-color: #ffcce6;
  box-shadow: 0 0 14px rgba(253, 121, 168, 0.6);
  animation: jumpPinkPulse 1.4s infinite alternate ease-in-out;
}

@keyframes jumpPinkPulse {
  0% { box-shadow: 0 0 4px #fd79a8; }
  100% { box-shadow: 0 0 16px #e84393; }
}

/* ================= ONLINE MULTIPLAYER MODAL ================= */
#online-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 55;
  background: rgba(10, 5, 2, 0.92);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px;
}

.online-modal-frame {
  width: min(840px, 94vw);
  max-height: 90vh;
  background: #fcf4dd;
  border: 7px solid #4a2810;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.85);
  display: flex;
  flex-direction: column;
  padding: 18px 24px;
  position: relative;
  color: #2b1704;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #8b4513;
  padding-bottom: 8px;
}

.modal-header h2 {
  font-size: clamp(18px, 3.8vmin, 24px);
  color: #8b1e0f;
  margin: 0;
}

.modal-close-x {
  background: #8b1e0f;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.online-intro-text {
  font-size: clamp(12px, 2.3vmin, 15px);
  line-height: 1.45;
  color: #4a2d12;
  margin: 10px 0 16px 0;
  font-family: sans-serif;
}

.online-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .online-options-grid {
    grid-template-columns: 1fr;
  }
}

.online-card {
  background: #ebd8b4;
  border: 3px solid #8b4513;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.08);
}

.card-badge {
  font-family: 'Luckiest Guy', cursive;
  font-size: 12px;
  background: #8b4513;
  color: #fff;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 6px;
}

.online-card h3 {
  margin: 4px 0 8px 0;
  color: #8b1e0f;
  font-size: clamp(16px, 3.2vmin, 20px);
}

.online-card p {
  font-size: 13px;
  color: #4a2810;
  margin-bottom: 12px;
  font-family: sans-serif;
}

.code-banner {
  margin-top: 12px;
  background: #fff5db;
  border: 2px dashed #8b1e0f;
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.code-label {
  font-size: 11px;
  font-weight: bold;
  color: #8b4513;
}

.code-value {
  font-family: 'Luckiest Guy', cursive;
  font-size: clamp(24px, 5vmin, 32px);
  color: #e62b1e;
  letter-spacing: 3px;
}

.host-waiting-msg {
  font-size: 12px;
  color: #7a4613;
  font-weight: bold;
  animation: hostPulse 1.2s infinite ease-in-out alternate;
}

@keyframes hostPulse {
  0% { opacity: 0.6; }
  100% { opacity: 1.0; }
}

.room-code-input {
  width: 85%;
  max-width: 220px;
  padding: 10px;
  border: 3px solid #8b4513;
  border-radius: 12px;
  font-family: 'Luckiest Guy', cursive;
  font-size: 20px;
  text-align: center;
  letter-spacing: 2px;
  margin-bottom: 12px;
  background: #fff;
  color: #2b1704;
}

.room-code-input:focus {
  outline: none;
  border-color: #e62b1e;
  box-shadow: 0 0 10px rgba(230, 43, 30, 0.4);
}

.join-status-text {
  margin-top: 8px;
  font-size: 13px;
  font-weight: bold;
  color: #8b1e0f;
}

.mode-select-btn.online-btn {
  background: linear-gradient(180deg, #16a085 0%, #0e6655 100%);
  border-color: #48c9b0;
  color: #ffffff;
}

.mode-select-btn.online-btn.active {
  background: linear-gradient(180deg, #1abc9c 0%, #16a085 100%);
  box-shadow: 0 0 14px rgba(26, 188, 156, 0.8);
  border-color: #fff;
}

