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

body {
  font-family: "Poppins", sans-serif;
  background-color: #1a1a2e;
  min-height: 100vh;
  overflow: hidden;
  overscroll-behavior: none;
}

/* ======= ANİMASYONLU SPLASH SCREEN ======= */
#app-splash {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
#app-splash.splash-hide {
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}
.splash-logo {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  animation: splashLogoIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.splash-title {
  font-family: "Pacifico", cursive;
  font-size: 2rem;
  color: #e8590c;
  opacity: 0;
  animation: splashTitleIn 0.6s 0.4s ease-out both;
}
.splash-dots {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.splash-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e8590c;
  opacity: 0.3;
  animation: splashDot 1.2s ease-in-out infinite;
}
.splash-dots span:nth-child(2) { animation-delay: 0.2s; }
.splash-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes splashLogoIn {
  0% { opacity: 0; transform: scale(0.3) rotate(-10deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes splashTitleIn {
  0% { opacity: 0; transform: translateY(15px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes splashDot {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* Scrollbar gizle */
body::-webkit-scrollbar,
html::-webkit-scrollbar,
.main-container::-webkit-scrollbar {
  display: none;
}
body, html, .main-container {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("photos/arkaplan2.jpg") no-repeat center center;
  background-size: cover;
  z-index: -2;
}
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: -1;
}

.main-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 20px 15px;
  padding-top: calc(50px + env(safe-area-inset-top));
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: none;
}

.hidden {
  display: none !important;
}

/* ======= HEADER ======= */
header {
  text-align: center;
  margin-bottom: 25px;
}
.game-title {
  font-family: "Pacifico", cursive;
  color: #fff;
  font-size: 2.5rem;
  text-shadow:
    0 4px 20px rgba(255, 107, 107, 0.6),
    0 2px 8px rgba(0, 0, 0, 0.4);
  letter-spacing: 1px;
}
#interactive-heart {
  display: inline-block;
  animation: heartbeat 1.2s ease-in-out infinite;
}
@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.25);
  }
}

/* ======= SKOR TABLOSU ======= */
.scoreboard-panel {
  position: fixed;
  top: calc(20px + env(safe-area-inset-top));
  left: calc(20px + env(safe-area-inset-left));
  width: 230px;
  background: rgba(30, 30, 50, 0.92);
  padding: 18px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 107, 107, 0.5);
  z-index: 9999;
  display: none;
  backdrop-filter: blur(12px);
}
.scoreboard-panel h3 {
  text-align: center;
  margin: 0 0 12px 0;
  color: #ff6b6b;
  font-size: 1rem;
}
.score-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #eee;
  font-size: 0.9rem;
}
.score-note {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 10px;
}

/* ======= EKRANLAR ======= */
.screen {
  display: none;
}
.screen.active {
  display: block;
  animation: fadeSlideUp 0.5s ease-out;
}
#lobby-screen.active {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 50px - env(safe-area-inset-top));
  overflow: hidden;
  touch-action: none;
}
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ======= GLASS KART ======= */
.card,
.waiting-header,
.team-card,
.spectators-area,
.game-footer {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  color: #fff;
}

.card {
  padding: 30px 25px;
  text-align: center;
}
.card h2 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.card label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

/* ======= TAB ======= */
.tab-container {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 4px;
}
.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  transition: all 0.3s;
}
.tab-btn.active {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}
.forms-window {
  overflow: hidden;
}
.forms-slider {
  display: flex;
  width: 200%;
  transition: 0.4s ease;
}
.slide-section {
  width: 50%;
  padding: 10px 5px;
}

/* ======= CİNSİYET ======= */
.gender-selection {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}
.gender-option {
  cursor: pointer;
  padding: 10px 22px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s;
  color: #fff;
}
.gender-option span {
  font-size: 0.95rem;
}
.gender-option:has(input:checked).male {
  border-color: #3498db;
  background: rgba(52, 152, 219, 0.3);
  box-shadow: 0 0 20px rgba(52, 152, 219, 0.3);
}
.gender-option:has(input:checked).female {
  border-color: #e91e63;
  background: rgba(233, 30, 99, 0.3);
  box-shadow: 0 0 20px rgba(233, 30, 99, 0.3);
}
.gender-option input {
  display: none;
}

/* ======= ROW INPUT ======= */
.row-inputs {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.half-input {
  flex: 1;
}
.half-input label {
  display: block;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 4px;
}

/* ======= BEKLEME EKRANI ======= */
.waiting-header {
  text-align: center;
  padding: 25px;
  margin-bottom: 20px;
}
.waiting-header h2 {
  color: #fff;
  margin: 0 0 15px 0;
  font-size: 1.2rem;
}
.share-btn {
  cursor: pointer;
  margin-left: 6px;
  vertical-align: middle;
  transition: transform 0.2s;
  display: inline-block;
}
.share-btn:hover {
  transform: scale(1.2);
}
.whatsapp-icon {
  vertical-align: middle;
}
.highlight-code {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: white;
  padding: 6px 16px;
  border-radius: 10px;
  letter-spacing: 4px;
  font-size: 1.4rem;
  font-weight: 800;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.highlight-code:active {
  transform: scale(0.95);
}
.highlight-code.code-copied {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  letter-spacing: 1px;
  font-size: 1rem;
}

/* ======= TAKIM KARTLARI ======= */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}
.team-card {
  padding: 18px;
  text-align: center;
}
.team-title {
  font-weight: 700;
  margin-bottom: 10px;
  color: #fff;
  font-size: 1rem;
}
.slots-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.slot {
  padding: 12px;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}
.slot:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
}
.slot.filled {
  cursor: default;
  font-weight: 600;
  color: #fff;
}
.slot.filled.slot-male {
  background: rgba(52, 152, 219, 0.35);
  border: 2px solid rgba(52, 152, 219, 0.7);
}
.slot.filled.slot-female {
  background: rgba(233, 30, 99, 0.35);
  border: 2px solid rgba(233, 30, 99, 0.7);
}
.host-badge {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 8px;
  margin-left: 6px;
  font-weight: 700;
  letter-spacing: 1px;
  vertical-align: middle;
}

/* ======= İZLEYİCİLER ======= */
.spectators-area {
  padding: 18px;
  text-align: center;
}
.spectators-area h3 {
  margin: 0 0 12px 0;
  color: #fff;
  font-size: 1rem;
}
.spectator-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.spectator-list span {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}
.spectator-list span.spec-male {
  background: rgba(52, 152, 219, 0.3);
  border: 1px solid rgba(52, 152, 219, 0.5);
  color: #8ecbf5;
}
.spectator-list span.spec-female {
  background: rgba(233, 30, 99, 0.3);
  border: 1px solid rgba(233, 30, 99, 0.5);
  color: #f5a0c0;
}

/* ======= OYUN ALANI ======= */
.game-split-container {
  display: flex;
  gap: 10px;
  min-height: 250px;
}
.game-panel {
  flex: 1;
  padding: 20px;
  border-radius: 16px;
  text-align: center;
  color: white;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}
.panel-male {
  background: linear-gradient(160deg, #2980b9, #1a5276);
}
.panel-female {
  background: linear-gradient(160deg, #e91e63, #880e4f);
}
.panel-header h3 {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
}
.panel-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.turn-info {
  padding: 14px;
  text-align: center;
  color: white;
  border-radius: 14px;
  margin-bottom: 12px;
  font-weight: bold;
  font-size: 1.05rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.timer-countdown {
  font-size: 3.5rem;
  text-align: center;
  font-weight: 800;
  color: #fff;
  text-shadow:
    0 0 30px rgba(255, 107, 107, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.4);
  margin: 12px 0;
}

.spectator-text {
  font-size: 2.5rem;
}
.status-text {
  margin-top: 10px;
  font-size: 0.85rem;
  opacity: 0.7;
}
.partner-waiting-animation {
  font-size: 0.95rem;
  opacity: 0.8;
}

/* ======= LOG ======= */
.log-item {
  padding: 8px 12px;
  margin: 4px 0;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}
.log-success {
  background: rgba(39, 174, 96, 0.2);
  color: #6dd5a0;
  border: 1px solid rgba(39, 174, 96, 0.3);
}
.log-fail {
  background: rgba(231, 76, 60, 0.2);
  color: #f5a0a0;
  border: 1px solid rgba(231, 76, 60, 0.3);
}

/* ======= GAME FOOTER ======= */
.game-footer {
  padding: 15px;
  margin-top: 12px;
  text-align: center;
  color: #fff;
}
.log-container {
  max-height: 150px;
  overflow-y: auto;
}

/* ======= INPUT & BUTTON ======= */
input,
select {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 80%;
  margin-bottom: 12px;
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: all 0.3s;
}
input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}
input:focus,
select:focus {
  outline: none;
  border-color: #ff6b6b;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.2);
}
select {
  background: rgba(255, 255, 255, 0.1);
}
select option {
  background: #2d2d2d;
  color: #fff;
}

button {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  transition: all 0.3s;
  background: rgba(255, 255, 255, 0.15);
}
button:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}
button:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  width: 80%;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}
.btn-primary:hover {
  box-shadow: 0 6px 25px rgba(255, 107, 107, 0.5);
  background: linear-gradient(135deg, #ff5252, #e04a1a);
}
.btn-secondary {
  background: linear-gradient(135deg, #6c5ce7, #a55eea);
  width: 80%;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}
.btn-secondary:hover {
  box-shadow: 0 6px 25px rgba(108, 92, 231, 0.5);
}
.btn-back {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 12px 24px;
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-back:hover {
  background: rgba(255, 255, 255, 0.25);
}
.btn-start {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  font-size: 1.1rem;
  padding: 14px 35px;
  box-shadow: 0 4px 20px rgba(39, 174, 96, 0.4);
}
.btn-start:hover {
  box-shadow: 0 6px 30px rgba(39, 174, 96, 0.5);
}
.big-input {
  font-size: 1.4rem;
  text-align: center;
  letter-spacing: 6px;
  text-transform: uppercase;
}

/* ======= INPUT WRAPPER (OYUN İÇİ) ======= */
.input-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.input-wrapper input {
  width: 90%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
}
.input-wrapper input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
.input-wrapper button {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

/* ======= OYUN SEÇİM EKRANI ======= */
.game-select-container {
  text-align: center;
  position: relative;
}
.btn-back-corner {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;
  border-radius: 10px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.select-title {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 25px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.game-cards {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}
.game-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 30px 25px;
  width: 200px;
  cursor: pointer;
  transition: all 0.3s;
  color: #fff;
  text-align: center;
}
.game-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 107, 107, 0.6);
  box-shadow:
    0 8px 35px rgba(255, 107, 107, 0.3),
    0 0 20px rgba(255, 107, 107, 0.15);
  background: rgba(255, 255, 255, 0.18);
}
.game-card-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
}
.game-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.game-card p {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ======= LOBİ OYUNCU KUTUSU (OYUN SEÇİM) ======= */
.select-players-container {
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 18px;
  text-align: center;
  color: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.select-players-container h3 {
  margin: 0 0 12px 0;
  font-size: 1rem;
  color: #fff;
}
.select-players-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.select-players-box span {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}
.select-players-box span.spec-male {
  background: rgba(52, 152, 219, 0.3);
  border: 1px solid rgba(52, 152, 219, 0.5);
  color: #8ecbf5;
}
.select-players-box span.spec-female {
  background: rgba(233, 30, 99, 0.3);
  border: 1px solid rgba(233, 30, 99, 0.5);
  color: #f5a0c0;
}

/* ======= İSİM ŞEHİR 3'LÜ INPUT ======= */
.is-all-inputs {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.is-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.is-input-row label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  font-weight: 700;
  width: 60px;
  flex-shrink: 0;
  text-align: right;
}
.is-input-row input {
  flex: 1;
  margin-bottom: 0;
}
.is-all-inputs .btn-primary {
  margin-top: 4px;
}

/* ======= HARF ÇARKI ======= */
.letter-display {
  text-align: center;
  margin: 15px 0;
}
.letter-wheel-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  box-shadow: 0 6px 30px rgba(255, 107, 107, 0.5);
}
.spinning-letter {
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.letter-spinning {
  animation: letterPulse 0.1s ease-in-out;
}
.letter-final {
  animation: letterReveal 0.5s ease-out;
}
@keyframes letterPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}
@keyframes letterReveal {
  0% {
    transform: scale(1.5);
    opacity: 0.5;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ======= KATEGORİ TABLARI ======= */
.category-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 12px 0;
}
.cat-tab {
  padding: 8px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.cat-tab.cat-active {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
  border-color: transparent;
}

/* ======= PICTIONARY ======= */
.pic-word-display {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  padding: 10px 20px;
  border-radius: 14px;
  margin-bottom: 10px;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

/* Çizim alanı: sol araçlar + canvas yan yana */
.pic-draw-area {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: flex-start;
  margin: 8px 0;
}

/* Sol dikey araç çubuğu */
.pic-left-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(30, 30, 50, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  align-items: center;
}
.pic-tool-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}
.pic-tool-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}
.pic-tool-icon.active {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  border-color: #ff6b6b;
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.5);
}
.pic-tool-icon[data-tool="clear"] {
  margin-top: 4px;
  border-color: rgba(231, 76, 60, 0.4);
  font-size: 1rem;
}
.pic-tool-icon[data-tool="clear"]:hover {
  background: rgba(231, 76, 60, 0.3);
}
.pic-thickness-slider {
  width: 36px !important;
  height: 80px;
  writing-mode: vertical-lr;
  direction: rtl;
  margin: 4px 0 0 0 !important;
  padding: 0 !important;
  appearance: slider-vertical;
  -webkit-appearance: slider-vertical;
  background: transparent !important;
  border: none !important;
}

.pic-canvas-container {
  display: flex;
  justify-content: center;
}
#pic-canvas {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  touch-action: none;
  max-width: 100%;
  cursor: crosshair;
}

/* Alt renk çubuğu */
.pic-color-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
  padding: 12px 16px;
  background: rgba(30, 30, 50, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.pic-color-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.pic-color {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  border: 3px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.pic-color:hover {
  transform: scale(1.2);
}
.pic-color.active {
  border-color: #fff;
  box-shadow:
    0 0 14px rgba(255, 255, 255, 0.6),
    0 0 4px rgba(255, 255, 255, 0.3);
  transform: scale(1.2);
}
.pic-color[data-color="#ffffff"] {
  border-color: rgba(150, 150, 150, 0.5);
}
.pic-color[data-color="#ffffff"].active {
  border-color: #fff;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.6);
}

.pic-guess-area {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
}
.pic-guess-area input {
  width: 60%;
  margin-bottom: 0;
}
.pic-guess-area button {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}
.pic-guess-wrong {
  animation: shakeInput 0.4s ease;
}
@keyframes shakeInput {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

/* ======= TABU ======= */
.tabu-card {
  background: rgba(30, 30, 50, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid rgba(255, 107, 107, 0.5);
  border-radius: 20px;
  padding: 20px;
  margin: 10px auto;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 8px 35px rgba(255, 107, 107, 0.25);
}
.tabu-main-word {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.tabu-forbidden-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tabu-forbidden-item {
  font-size: 1rem;
  font-weight: 600;
  color: #e74c3c;
  padding: 6px 12px;
  background: rgba(231, 76, 60, 0.12);
  border-radius: 8px;
  border: 1px solid rgba(231, 76, 60, 0.25);
}
.tabu-chat {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 12px;
  margin: 10px 0;
  max-height: 200px;
  min-height: 100px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tabu-clue-item {
  padding: 8px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 500;
  max-width: 80%;
  word-break: break-word;
}
.tabu-clue-item.clue {
  background: linear-gradient(135deg, #e67e22, #f39c12);
  color: #fff;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.tabu-clue-item.guess {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.tabu-clue-item.guess.correct {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
}
.tabu-clue-item.system {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  align-self: center;
  font-size: 0.8rem;
  font-style: italic;
}
.tabu-forbidden-alert {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.15);
  border: 2px solid rgba(231, 76, 60, 0.5);
  border-radius: 14px;
  padding: 12px;
  margin: 8px 0;
  animation: forbiddenFlash 0.5s ease-in-out 3;
}
@keyframes forbiddenFlash {
  0%,
  100% {
    background: rgba(231, 76, 60, 0.15);
  }
  50% {
    background: rgba(231, 76, 60, 0.4);
  }
}
.tabu-input-area {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
}
.tabu-input-area input {
  width: 50%;
  margin-bottom: 0;
}
.tabu-input-area button {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}
.btn-pass {
  background: linear-gradient(135deg, #e67e22, #d35400) !important;
  box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4) !important;
}
.btn-pass:hover {
  box-shadow: 0 6px 25px rgba(230, 126, 34, 0.5) !important;
}

/* ======= MOD TOGGLE ======= */
.mode-toggle-container {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 4px;
}
.mode-btn {
  flex: 1;
  padding: 10px 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  transition: all 0.3s;
}
.mode-btn.active {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}
.game-card.disabled-card {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}
.tek-players-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0;
}

/* ======= AYI UYARI ======= */
.username-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
  margin-bottom: 12px;
}
.username-row input {
  margin-bottom: 0;
}
.bear-hint {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  margin-right: -4px;
}
.bear-bubble {
  position: absolute;
  top: -38px;
  left: 0;
  transform: none;
  background: #fff;
  color: #5a3e2b;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  border: 2px solid #e6a756;
  z-index: 10;
}
.bear-bubble::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 20px;
  transform: none;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 7px solid #fff;
}
.bear-bubble::before {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 18px;
  transform: none;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 9px solid #e6a756;
}
.bear-bubble.bubble-enter {
  animation: bubblePop 0.4s ease-out;
}
@keyframes bubblePop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  70% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.bear-face {
  width: 52px;
  height: 48px;
  background: #c8915a;
  border-radius: 50% 50% 46% 46%;
  position: relative;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}
.bear-ear {
  width: 18px;
  height: 18px;
  background: #c8915a;
  border-radius: 50%;
  position: absolute;
  top: -6px;
  border: 3px solid #a06b3a;
}
.bear-ear::after {
  content: "";
  width: 8px;
  height: 8px;
  background: #e8b87a;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.bear-ear-l {
  left: 2px;
}
.bear-ear-r {
  right: 2px;
}
.bear-eyes {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding-top: 14px;
}
.bear-eye {
  width: 6px;
  height: 7px;
  background: #2c1810;
  border-radius: 50%;
  display: inline-block;
  animation: bearBlink 3s ease-in-out infinite;
}
@keyframes bearBlink {
  0%,
  90%,
  100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.1);
  }
}
.bear-nose {
  width: 10px;
  height: 7px;
  background: #2c1810;
  border-radius: 50%;
  margin: 3px auto 0;
}
.bear-mouth {
  width: 12px;
  height: 5px;
  border-bottom: 2px solid #2c1810;
  border-radius: 0 0 50% 50%;
  margin: 1px auto 0;
}
.bear-paw {
  font-size: 1.2rem;
  position: absolute;
  right: -6px;
  bottom: -2px;
  animation: bearPoint 0.8s ease-in-out infinite alternate;
}
@keyframes bearPoint {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(5px);
  }
}

/* Ayı cinsiyet uyarısı: aşağı kayma */
.bear-hint.bear-at-gender {
  transition: transform 0.4s ease;
  transform: translateY(52px);
}
.bear-hint.bear-at-gender .bear-paw {
  transform: rotate(90deg);
  bottom: -12px;
  right: 4px;
}

/* Ayı sırıtma */
.bear-hint.bear-grin .bear-mouth {
  width: 20px;
  height: 10px;
  border-bottom: none;
  background: #2c1810;
  border-radius: 0 0 50% 50%;
  margin: 2px auto 0;
  position: relative;
  overflow: hidden;
}
.bear-hint.bear-grin .bear-mouth::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 5px;
  background: #fff;
  border-radius: 0 0 3px 3px;
  display: flex;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  background-image:
    linear-gradient(to right, #ccc 1px, transparent 1px),
    linear-gradient(to right, #ccc 1px, transparent 1px);
  background-size: 3.5px 100%;
  background-position: 0 0;
}
.bear-hint.bear-grin .bear-eyes .bear-eye {
  height: 3px;
  width: 8px;
  border-radius: 4px 4px 0 0;
  animation: none;
}

/* Ayı öpücük */
.bear-hint.bear-kiss .bear-mouth {
  width: 8px;
  height: 8px;
  border: none;
  background: #e91e63;
  border-radius: 50%;
  margin: 3px auto 0;
}
.bear-hint.bear-kiss .bear-eyes .bear-eye {
  height: 3px;
  width: 8px;
  border-radius: 4px 4px 0 0;
  animation: none;
}

/* ======= IMPOSTER ======= */
.imposter-card {
  background: rgba(30, 30, 50, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 25px;
  margin: 15px auto;
  max-width: 350px;
  text-align: center;
  box-shadow: 0 8px 35px rgba(0, 0, 0, 0.3);
}
.imposter-hint {
  margin-top: 12px;
  padding: 10px 18px;
  background: rgba(142, 68, 173, 0.3);
  border: 1px solid rgba(142, 68, 173, 0.5);
  border-radius: 12px;
  color: #d7bde2;
  font-size: 1.1rem;
  font-weight: 600;
}
.imposter-phase-label {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: #f39c12;
  margin: 8px 0;
  letter-spacing: 1px;
}
.imposter-submitted-list {
  max-width: 350px;
  margin: 10px auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.imposter-submitted-item {
  padding: 8px 14px;
  background: rgba(39, 174, 96, 0.15);
  border: 1px solid rgba(39, 174, 96, 0.3);
  border-radius: 10px;
  color: #6dd5a0;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}
.imposter-answers {
  max-width: 400px;
  margin: 10px auto;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 14px;
  max-height: 250px;
  overflow-y: auto;
}
.imposter-answers h4 {
  color: #f39c12;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.imposter-answer-item {
  padding: 6px 12px;
  margin: 4px 0;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  color: #eee;
  font-size: 0.9rem;
  font-weight: 500;
}
.imposter-vote-area {
  max-width: 350px;
  margin: 12px auto;
  text-align: center;
}
#imposter-vote-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.imposter-vote-btn {
  padding: 14px 20px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  border: 2px solid rgba(52, 152, 219, 0.5);
  border-radius: 14px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}
.imposter-vote-btn:hover {
  background: linear-gradient(135deg, #2980b9, #1a6fa0);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}
.imposter-vote-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.imposter-vote-btn.voted {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border-color: rgba(231, 76, 60, 0.5);
  opacity: 1;
}

/* ======= MOBİL ======= */
@media (max-width: 600px) {
  .main-container {
    max-width: 100%;
    padding: 10px 8px;
    padding-top: calc(20px + env(safe-area-inset-top));
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }
  header {
    margin-bottom: 15px;
  }
  .game-title {
    font-size: 1.6rem;
  }

  /* Skor Tablosu - kompakt */
  .scoreboard-panel {
    position: relative;
    top: 0;
    left: 0;
    width: auto;
    margin: 0 4px 8px 4px;
    padding: 10px;
    border-radius: 12px;
  }
  .scoreboard-panel h3 {
    font-size: 0.9rem;
    margin-bottom: 8px;
  }
  .score-item {
    padding: 4px 2px;
    font-size: 0.8rem;
  }

  /* Kart */
  .card {
    padding: 20px 15px;
  }
  .card h2 {
    font-size: 1.2rem;
    margin-bottom: 14px;
  }

  /* Cinsiyet */
  .gender-selection {
    gap: 8px;
    margin-bottom: 14px;
  }
  .gender-option {
    padding: 8px 16px;
  }

  /* Input & Button */
  input, select {
    width: 100%;
    font-size: 0.9rem;
    padding: 10px 12px;
  }
  button {
    font-size: 0.9rem;
    padding: 10px 18px;
  }
  .btn-primary, .btn-secondary {
    width: 100%;
  }
  .big-input {
    font-size: 1.2rem;
    letter-spacing: 4px;
  }

  /* Bekleme Ekranı */
  .waiting-header {
    padding: 18px 12px;
  }
  .waiting-header h2 {
    font-size: 1rem;
  }
  .highlight-code {
    font-size: 1.1rem;
    padding: 5px 12px;
    letter-spacing: 3px;
  }
  .btn-start {
    font-size: 0.95rem;
    padding: 12px 25px;
  }

  /* Takım Kartları */
  .teams-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .team-card {
    padding: 14px;
  }
  .slot {
    padding: 10px;
    font-size: 0.85rem;
  }

  /* İzleyiciler */
  .spectators-area {
    padding: 14px;
  }

  /* Oyun Seçim */
  .select-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
  }
  .game-cards {
    gap: 10px;
  }
  .game-card {
    width: 100%;
    padding: 20px 18px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    text-align: left;
  }
  .game-card-icon {
    font-size: 2.2rem;
    margin-bottom: 0;
    flex-shrink: 0;
  }
  .game-card h3 {
    font-size: 1rem;
    margin-bottom: 2px;
  }
  .game-card p {
    font-size: 0.75rem;
  }
  .face-to-face-badge {
    font-size: 0.65rem;
  }

  /* Mod Toggle */
  .mode-toggle-container {
    margin-bottom: 12px;
  }
  .mode-btn {
    font-size: 0.85rem;
    padding: 8px 12px;
  }

  /* Ayarlar */
  .row-inputs {
    gap: 8px;
  }
  .half-input label {
    font-size: 0.75rem;
  }

  /* Oyun sırasında header ve scoreboard gizle (yer kazanmak için) */
  body.game-active header {
    display: none !important;
  }
  body.game-active .scoreboard-panel {
    display: none !important;
  }
  body.game-active .main-container {
    padding-top: calc(8px + env(safe-area-inset-top));
  }

  /* Oyun Panelleri - Yan yana ve kompakt */
  .game-split-container {
    flex-direction: row;
    gap: 6px;
    min-height: auto;
  }
  .game-panel {
    min-height: unset;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  }
  .panel-header h3 {
    font-size: 0.8rem;
    margin-bottom: 4px;
  }
  .panel-content {
    font-size: 0.85rem;
  }
  .panel-content .status-text {
    font-size: 0.75rem;
    margin-top: 4px;
  }
  .panel-content .partner-waiting-animation {
    font-size: 0.8rem;
  }

  /* Turn info kompakt */
  .turn-info {
    padding: 6px 8px;
    font-size: 0.85rem;
    margin-bottom: 4px;
    border-radius: 10px;
  }

  /* Timer kompakt */
  .timer-countdown {
    font-size: 1.8rem;
    margin: 2px 0;
  }
  .spectator-text {
    font-size: 1.6rem;
  }

  /* Input wrapper kompakt */
  .input-wrapper {
    gap: 4px;
  }
  .input-wrapper input {
    width: 100%;
    padding: 7px 8px;
    font-size: 0.82rem;
    margin-bottom: 2px;
  }
  .input-wrapper button {
    padding: 6px 14px;
    font-size: 0.82rem;
  }

  /* Game Footer - kompakt ve görünür */
  .game-footer {
    padding: 8px 10px;
    margin-top: 4px;
    border-radius: 12px;
  }
  .game-footer h4 {
    font-size: 0.85rem;
    margin-bottom: 4px;
  }
  .log-container {
    max-height: 120px;
    padding: 2px;
  }
  .log-item {
    padding: 5px 8px;
    margin: 2px 0;
    font-size: 0.78rem;
    border-radius: 6px;
  }

  /* İsim Şehir */
  .letter-wheel-container {
    width: 80px;
    height: 80px;
  }
  .spinning-letter {
    font-size: 2.2rem;
  }
  .category-tabs {
    gap: 6px;
    margin: 8px 0;
  }
  .cat-tab {
    padding: 6px 14px;
    font-size: 0.8rem;
  }

  /* Pictionary */
  .pic-draw-area {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  .pic-left-tools {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px 10px;
    gap: 6px;
  }
  .pic-tool-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
  .pic-thickness-slider {
    writing-mode: horizontal-tb !important;
    direction: ltr;
    width: 80px !important;
    height: auto;
    appearance: auto;
    -webkit-appearance: auto;
  }
  .pic-canvas-container {
    width: 100%;
  }
  #pic-canvas {
    width: 100%;
    height: auto;
  }
  .pic-word-display {
    font-size: 1.2rem;
    padding: 8px 14px;
    margin-bottom: 6px;
  }
  .pic-color-bar {
    padding: 8px 10px;
    gap: 6px;
    margin: 6px 0;
  }
  .pic-color-row {
    gap: 6px;
  }
  .pic-color {
    width: 28px;
    height: 28px;
  }
  .pic-guess-area {
    margin: 6px 0;
  }
  .pic-guess-area input {
    width: 55%;
  }

  /* Tabu */
  .tabu-card {
    padding: 14px;
    margin: 8px auto;
    max-width: 100%;
  }
  .tabu-main-word {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }
  .tabu-forbidden-item {
    font-size: 0.85rem;
    padding: 5px 10px;
  }
  .tabu-chat {
    padding: 10px;
    margin: 8px 0;
    max-height: 160px;
  }
  .tabu-clue-item {
    font-size: 0.8rem;
    padding: 6px 10px;
    max-width: 85%;
  }
  .tabu-input-area {
    margin: 6px 0;
    gap: 6px;
  }
  .tabu-input-area input {
    width: 45%;
  }
  .tabu-forbidden-alert {
    font-size: 1rem;
    padding: 10px;
  }

  /* Imposter */
  .imposter-card {
    padding: 18px;
    margin: 10px auto;
    max-width: 100%;
  }
  .imposter-card .highlight-code {
    font-size: 1.2rem;
  }
  .imposter-hint {
    font-size: 0.95rem;
    padding: 8px 14px;
  }
  .imposter-answers {
    max-width: 100%;
    padding: 10px;
    max-height: 200px;
  }
  .imposter-vote-area {
    max-width: 100%;
  }
  .imposter-vote-btn {
    padding: 12px 16px;
    font-size: 1rem;
  }

  /* Ayı */
  .bear-face {
    width: 44px;
    height: 40px;
  }
  .bear-ear {
    width: 15px;
    height: 15px;
  }
  .bear-bubble {
    font-size: 0.6rem;
    top: -34px;
  }
}

/* ======= CAPACITOR / MOBİL SAFE AREA ======= */
.input-wrapper,
.pic-guess-area,
.tabu-input-area {
  padding-bottom: env(safe-area-inset-bottom);
}

/* Klavye açıkken input'ların görünür kalması */
html {
  scroll-padding-bottom: env(safe-area-inset-bottom);
  overscroll-behavior: none;
  overflow: hidden;
  height: 100%;
}

/* ======= KARŞILAŞTIRMA ANİMASYONU ======= */
.match-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: overlayFadeIn 0.3s ease-out;
  gap: 16px;
}
.match-overlay.fade-out {
  animation: overlayFadeOut 0.4s ease-in forwards;
}
@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes overlayFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.match-words-row {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
}
.match-word-card {
  padding: 16px 24px;
  border-radius: 16px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  min-width: 100px;
  text-align: center;
}
.match-word-card.word-left {
  background: linear-gradient(135deg, #2980b9, #1a5276);
  animation: slideFromLeft 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.match-word-card.word-right {
  background: linear-gradient(135deg, #e91e63, #880e4f);
  animation: slideFromRight 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.match-vs {
  font-size: 1.2rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.6);
  animation: vsPop 0.5s 0.3s ease-out both;
}
@keyframes slideFromLeft {
  from { opacity: 0; transform: translateX(-80px) scale(0.8); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes slideFromRight {
  from { opacity: 0; transform: translateX(80px) scale(0.8); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes vsPop {
  from { opacity: 0; transform: scale(0); }
  to { opacity: 1; transform: scale(1); }
}

.match-result-badge {
  font-size: 2rem;
  font-weight: 800;
  padding: 10px 30px;
  border-radius: 14px;
  animation: resultPop 0.4s 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.match-result-badge.result-success {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: #fff;
  box-shadow: 0 0 40px rgba(39, 174, 96, 0.6);
}
.match-result-badge.result-fail {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
  box-shadow: 0 0 40px rgba(231, 76, 60, 0.6);
}
@keyframes resultPop {
  from { opacity: 0; transform: scale(0) rotate(-10deg); }
  to { opacity: 1; transform: scale(1) rotate(0deg); }
}

.match-category-label {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 3px;
  animation: overlayFadeIn 0.3s ease-out both;
  margin-bottom: -4px;
}
.match-player-names {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-bottom: -8px;
}
.match-player-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  animation: overlayFadeIn 0.4s 0.2s both;
}

@media (max-width: 600px) {
  .match-word-card {
    padding: 12px 18px;
    font-size: 1.1rem;
    min-width: 80px;
  }
  .match-result-badge {
    font-size: 1.5rem;
    padding: 8px 24px;
  }
  .match-player-names {
    gap: 40px;
  }
}
