/* Bright Party Pictionary & Charades Theme */

:root {
  --bg-gradient: linear-gradient(145deg, #130a2a, #231248 50%, #0d061c);
  --neon-yellow: #ffe600;
  --neon-pink: #ff2a8d;
  --neon-blue: #00e5ff;
  --neon-green: #00ff88;
  --neon-purple: #9d4edd;
  --card-bg: rgba(20, 15, 38, 0.75);
  --card-border: rgba(255, 255, 255, 0.18);
}

body {
  background: #0d061c url('bg_party.jpg') no-repeat center center / cover;
  color: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}

#stage {
  width: 100%;
  height: 100%;
  max-width: 440px;
  margin: 0 auto;
  position: relative;
  background: rgba(13, 6, 28, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.screen[data-screen="start"] {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  text-align: center;
}

.party-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.hero-mascot-img {
  width: 130px;
  height: 130px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(157, 78, 221, 0.5));
  animation: floatMascot 3s ease-in-out infinite alternate;
}

@keyframes floatMascot {
  0% { transform: translateY(0px) rotate(-2deg); }
  100% { transform: translateY(-8px) rotate(2deg); }
}

.party-badge {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  padding: 0.35rem 0.9rem;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-purple));
  border-radius: 999px;
  box-shadow: 0 0 15px rgba(255, 42, 141, 0.4);
}

h1#title {
  font-size: 2.8rem;
  font-weight: 900;
  margin: 0;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 30%, var(--neon-yellow) 80%, var(--neon-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 20px rgba(255, 230, 0, 0.2);
}

.tagline {
  color: #c4b5fd;
  font-size: 1rem;
  line-height: 1.4;
  margin: 0;
  max-width: 300px;
}

.glow-btn {
  font-size: 1.35rem;
  font-weight: 800;
  padding: 1rem 2.2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--neon-yellow), #ff9100);
  color: #110826;
  border: none;
  box-shadow: 0 0 25px rgba(255, 230, 0, 0.5), 0 4px 10px rgba(0,0,0,0.3);
  cursor: pointer;
  letter-spacing: 0.02em;
}

/* Play Screen Layout */
.screen[data-screen="play"] {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  gap: 0.5rem;
  inset: 0;
  height: 100%;
}

.top-bar {
  display: flex;
  justify-content: center;
  width: 100%;
}

.mode-toggle-wrap {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: 100%;
  max-width: 360px;
}

.tab-btn {
  flex: 1;
  min-height: 38px;
  padding: 0.4rem 0.6rem;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 999px;
  background: transparent;
  color: #bbb;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.tab-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: #fff;
  box-shadow: 0 0 14px rgba(255, 42, 141, 0.5);
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
}

.section-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #8f84b6;
  text-align: left;
  padding-left: 4px;
}

.pill-group {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.pill-group::-webkit-scrollbar { display: none; }

.pill-btn {
  flex-shrink: 0;
  min-height: 32px;
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ddd;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.pill-btn.active {
  background: var(--neon-blue);
  color: #031b28;
  border-color: var(--neon-blue);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.diff-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: 100%;
}

.diff-btn {
  min-height: 32px;
  padding: 0.35rem 0.2rem;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ddd;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  white-space: nowrap;
}

.diff-btn.active {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  border-color: var(--neon-yellow);
  box-shadow: 0 0 8px rgba(255, 230, 0, 0.3);
}

/* Big Word Card */
.word-card-container {
  flex: 1;
  display: flex;
  align-items: stretch;
  min-height: 180px;
  max-height: 230px;
}

.word-card {
  width: 100%;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease;
}

.card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.meta-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  color: #eee;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.cat-pill {
  color: var(--neon-blue);
  border-color: rgba(0, 229, 255, 0.3);
}

.diff-pill {
  color: var(--neon-yellow);
  border-color: rgba(255, 230, 0, 0.3);
}

.word-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.5rem;
}

#current-word {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.15;
  margin: 0;
  text-align: center;
  color: #ffffff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 3px 6px rgba(0,0,0,0.5);
  word-break: break-word;
}

.deck-counter {
  font-size: 0.75rem;
  font-weight: 600;
  color: #a79ec7;
}

/* Big Action Button */
.action-section {
  width: 100%;
}

.giant-gen-btn {
  width: 100%;
  min-height: 58px;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  border-radius: 16px;
  background: linear-gradient(135deg, #00e5ff 0%, #7c4dff 50%, #ff2a8d 100%);
  background-size: 200% 200%;
  color: #ffffff;
  border: none;
  box-shadow: 0 6px 20px rgba(124, 77, 255, 0.5), inset 0 1px 1px rgba(255,255,255,0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: transform 0.1s ease;
}

.giant-gen-btn:active {
  transform: scale(0.97);
}

.gen-icon-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Built-in Timer Card */
.timer-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 0.6rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.timer-icon-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  margin-right: -2px;
}

.timer-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.timer-display {
  font-size: 1.8rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--neon-yellow);
  text-shadow: 0 0 10px rgba(255, 230, 0, 0.4);
  min-width: 65px;
  text-align: left;
}

.timer-display.danger {
  color: var(--neon-pink);
  animation: pulse 0.5s infinite alternate;
}

@keyframes pulse {
  from { opacity: 0.6; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1.04); }
}

.timer-presets {
  display: flex;
  gap: 4px;
}

.preset-btn {
  min-height: 28px;
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #bbb;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.preset-btn.active {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.timer-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.timer-btn {
  min-height: 38px;
  padding: 0.4rem 1rem;
  font-size: 0.95rem;
  font-weight: 800;
  border-radius: 10px;
  border: none;
  cursor: pointer;
}

.timer-btn.play {
  background: var(--neon-green);
  color: #042414;
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
}

.timer-btn.stop {
  background: var(--neon-pink);
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 42, 141, 0.4);
}

.timer-reset-btn {
  min-height: 38px;
  width: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 800;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #ddd;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
}
