:root {
  --primary-color: #ff9ec9;
  --primary-color-hover: #ff7eb6;
  --secondary-color: #ffb6d9;
  --black: #5a3a4c;
  --white: #fff0f6;
  --sub-text-color: #a65c87;
  --hover-white: #ffe6f0;
  --shadow-color: rgba(255, 105, 180, 0.35);
  --nav-above-color: #ffd6e8;
  --text-size-factor: 1.0;
}

html {
  font-size: calc(16px * var(--text-size-factor));
}

:root[data-theme="dark"] {
  --black: #ffeaf4;
  --white: #1c1c1c;
  --sub-text-color: #f0b8d4;
  --hover-white: #2a2a2a;
  --shadow-color: rgba(0, 0, 0, 0.7);
  --nav-above-color: #ff7eb6;
  --primary-color: #ff7eb6;
  --primary-color-hover: #ff5fa2;
}

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

html, body {
  width: 100%;
  min-height: 100%;
}

body {
  background-color: var(--white);
  color: var(--black);
  font-family: 'Poppins', sans-serif;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/*  Header */
#page-header {
  width: 100%;
  padding: 1.2rem;
  background: linear-gradient(135deg, #FFB6D9, #FF9EC9);
  color: #5A3A4C;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 3px solid #FFD6E8;
  box-shadow: 0 6px 12px rgba(255, 105, 180, 0.3);
  z-index: 2;
}

#page-title {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 800;
}

/*  Main content area */
#content {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(16px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  position: relative;
}

/*  Subtitles */
.sub-title {
  font-size: clamp(1.3rem, 3vw, 2rem);
  color: var(--primary-color);
  text-align: center;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/*  Buttons */
.menu-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FFB6D9, #FF9EC9);
  color: #5A3A4C;
  padding: clamp(18px, 4vw, 30px);
  border-radius: 22px;
  text-decoration: none;
  min-height: 110px;
  width: 100%;
  max-width: 280px;
  text-align: center;
  box-shadow: 0 10px 18px rgba(255, 105, 180, 0.35);
  border: 3px solid #FFD6E8;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.menu-button:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 14px 24px rgba(255, 105, 180, 0.5);
  background: linear-gradient(135deg, #FF9EC9, #FF7EB6);
  cursor: pointer;
}

.menu-button span {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.3px;
}

/*  Inputs */
input[type="text"] {
  width: 100%;
  max-width: 280px;
  padding: 14px;
  border-radius: 16px;
  border: 2px solid #FFD6E8;
  font-size: 1rem;
  outline: none;
}

input[type="text"]:focus {
  border-color: var(--primary-color);
}

/*  Utility */
.center-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 4vw, 32px);
  width: 100%;
}

/*  Cards */
.app-description,
.rules-card,
.invite-card,
.page-description,
.setting-row {
  background: rgba(255, 247, 251, 0.95);
  border-radius: 26px;
  border: 3px solid #FFD6E8;
  box-shadow: 0 10px 20px rgba(255, 105, 180, 0.3);
  padding: clamp(22px, 4vw, 38px);
  max-width: 650px;
  width: 100%;
  text-align: center;
}

/*  Dark mode cards */
:root[data-theme="dark"] .app-description,
:root[data-theme="dark"] .rules-card,
:root[data-theme="dark"] .invite-card,
:root[data-theme="dark"] .page-description,
:root[data-theme="dark"] .setting-row {
  background: rgba(40, 20, 30, 0.9);
  border-color: #ff7eb6;
  color: #ffeaf4;
}

/*  Rules list */
.rules-list {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
}

.rules-list li {
  background: linear-gradient(135deg, #FFECF6, #FFD6E8);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 12px;
  font-weight: 600;
  color: #5A3A4C;
  box-shadow: 0 6px 12px rgba(255, 105, 180, 0.25);
  border: 2px solid #FFB6D9;
  font-size: 1rem;
}

/*  Dark rules */
:root[data-theme="dark"] .rules-list li {
  background: linear-gradient(135deg, #3a1a28, #5a0038);
  color: #ffeaf4;
  border-color: #ff7eb6;
}

/* Button grid */
.button-grid {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(16px, 4vw, 32px);
  justify-items: center;
}

/* Invite player cards */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 500px;
}

.player-card {
  background: linear-gradient(135deg, #FFECF6, #FFD6E8);
  border-radius: 18px;
  padding: 16px;
  font-weight: 700;
  color: #5A3A4C;
  box-shadow: 0 6px 12px rgba(255, 105, 180, 0.25);
  border: 2px solid #FFB6D9;
  text-align: center;
}

:root[data-theme="dark"] .player-card {
  background: linear-gradient(135deg, #3a1a28, #5a0038);
  color: #ffeaf4;
  border-color: #ff7eb6;
}

/* 🌸 Hello Kitty Pink Toggle Switch */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.setting-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: #FF5FA2;
}

/* Switch */
.pink-switch {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 30px;
}

.pink-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #FFD6E8;
  border-radius: 34px;
  transition: 0.3s;
  box-shadow: inset 0 0 0 2px #FF9EC9;
}

.slider::before {
  position: absolute;
  content: "🐱";
  height: 24px;
  width: 24px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.pink-switch input:checked + .slider {
  background: #FF7EB6;
}

.pink-switch input:checked + .slider::before {
  transform: translateX(26px);
}

/* Floating Hearts Background */
.floating-hearts {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.floating-hearts span {
  position: absolute;
  bottom: -10%;
  font-size: 24px;
  animation: floatUp 10s linear infinite;
  opacity: 0.8;
  filter: drop-shadow(0 0 6px rgba(255, 105, 180, 0.8));
}

:root[data-theme="dark"] .floating-hearts span {
  filter:
    drop-shadow(0 0 6px rgba(255, 105, 180, 1))
    drop-shadow(0 0 12px rgba(255, 20, 147, 0.9))
    drop-shadow(0 0 18px rgba(255, 105, 180, 0.8));
}

@keyframes floatUp {
  0% { transform: translateY(0) scale(0.8); opacity: 0; }
  10% { opacity: 0.9; }
  100% { transform: translateY(-110vh) scale(1.2); opacity: 0; }
}

.floating-hearts span:nth-child(1) { left: 5%;  animation-delay: 0s;  font-size: 20px; }
.floating-hearts span:nth-child(2) { left: 15%; animation-delay: 2s;  font-size: 26px; }
.floating-hearts span:nth-child(3) { left: 25%; animation-delay: 4s;  font-size: 22px; }
.floating-hearts span:nth-child(4) { left: 35%; animation-delay: 1s;  font-size: 28px; }
.floating-hearts span:nth-child(5) { left: 45%; animation-delay: 3s;  font-size: 24px; }
.floating-hearts span:nth-child(6) { left: 55%; animation-delay: 5s;  font-size: 30px; }
.floating-hearts span:nth-child(7) { left: 65%; animation-delay: 2.5s;font-size: 23px; }
.floating-hearts span:nth-child(8) { left: 75%; animation-delay: 4.5s;font-size: 27px; }
.floating-hearts span:nth-child(9) { left: 85%; animation-delay: 1.5s;font-size: 25px; }
.floating-hearts span:nth-child(10){ left: 95%; animation-delay: 3.5s;font-size: 29px; }
/* Responsive adjustments */

/* Kitty mascot bubble */
.kitty-bubble {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 247, 251, 0.95);
  border: 3px solid #FFD6E8;
  border-radius: 999px;
  padding: 12px 18px;
  box-shadow: 0 8px 16px rgba(255, 105, 180, 0.35);
  margin-bottom: 1.5rem;
}

.kitty-face {
  font-size: 2rem;
}

.kitty-text {
  font-size: 1rem;
  font-weight: 700;
  color: #FF5FA2;
}

/* Disabled start button */
.menu-button.disabled {
  opacity: 0.5;
  pointer-events: none;
  transform: none !important;
  box-shadow: none !important;
}
/* Kitty mascot bubble */
.kitty-bubble {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 247, 251, 0.95);
  border: 3px solid #FFD6E8;
  border-radius: 999px;
  padding: 12px 18px;
  box-shadow: 0 8px 16px rgba(255, 105, 180, 0.35);
  margin-bottom: 1.5rem;
}

/* Kitty mascot icon size */
.kitty-mascot img {
  width: 64px;
  max-width: 20vw;
  height: auto;
  margin-bottom: 0.75rem;
}

.kitty-face {
  font-size: 2rem;
}

.kitty-text {
  font-size: 1rem;
  font-weight: 700;
  color: #FF5FA2;
}

/* Disabled start button */
.menu-button.disabled {
  opacity: 0.5;
  pointer-events: none;
  transform: none !important;
  box-shadow: none !important;
}

/* Global responsive behavior */
body {
  background-color: var(--white);
  color: var(--black);
  font-family: 'Poppins', sans-serif;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Prevent horizontal scrolling */
html, body {
  overflow-x: hidden;
}

/* Responsive containers */
#content {
  padding: clamp(12px, 4vw, 40px);
  width: 100%;
  z-index: 2;
}

/* Responsive buttons */
.menu-button {
  width: 100%;
  max-width: 320px;
}

/* Input fields scale nicely */
input[type="text"] {
  width: 100%;
  max-width: 320px;
}

/* Center cards adapt */
.center-stack {
  width: 100%;
  padding: 0 8px;
}
/* Small screens: stack buttons and cards vertically, adjust font sizes */
@media (max-width: 480px) {
  #page-title {
    font-size: 1.3rem;
  }

  .sub-title {
    font-size: 1.4rem;
  }

  .menu-button {
    min-height: 90px;
    padding: 16px;
    border-radius: 18px;
  }

  .kitty-bubble {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }
  

  .rules-card,
  .players-card {
    width: 100%;
    padding: 16px;
  }
}
/* Medium screens: allow more width for buttons and cards */
@media (min-width: 481px) and (max-width: 900px) {
  .menu-button {
    max-width: 360px;
  }

  .players-card,
  .rules-card {
    max-width: 500px;
  }
}
/* Ensure cards don't get too wide on larger screens */
.rules-card,
.players-card {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}
/* Hello Kitty Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: linear-gradient(135deg, #FFB6D9, #FF9EC9);
  border-top: 3px solid #FFD6E8;
  box-shadow: 0 -6px 12px rgba(255, 105, 180, 0.35);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
}

/* Hide on larger screens (desktop/tablet) */
@media (min-width: 768px) {
  .bottom-nav {
    display: none;
  }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #5A3A4C;
  text-decoration: none;
  transition: transform 0.15s ease, color 0.15s ease;
}

.nav-item span {
  font-size: 0.65rem;
  margin-top: 2px;
}

.nav-item:hover {
  transform: translateY(-2px) scale(1.05);
  color: #FF5FA2;
}

/* Add bottom padding so content isn’t hidden behind nav */
body {
  padding-bottom: 80px;
}
/* Active page highlight */
.nav-item.active {
  color: #FF5FA2;
  text-shadow: 0 0 6px rgba(255, 105, 180, 0.8);
}

/* 📱 samye dont touch bellow , this is all QR code alinment (tom) */

/* 📱 QR Code Section */
.qr-section {
    text-align: center;
    width: 100%;
    margin-bottom: 2rem;
}

.qr-box {
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid #FFD6E8;
    border-radius: 18px;
    padding: 14px;
    display: inline-block;
    box-shadow: 0 8px 16px rgba(255, 105, 180, 0.25);
}

.qr-hint {
    margin-top: 10px;
    color: #9C6F86;
    font-weight: 600;
    font-size: 0.95rem;
}

.volume-slider {
  width: 150px;
  accent-color: #FF5FA2;
}

.volume-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
