/*
 * Birthday Pub Quiz - Style Guide
 * ================================
 * Theme: Light, casual, cheerful birthday vibes!
 *
 * Player views: Mobile-only (phones) - touch-optimized, 52px min targets
 * Presenter views: Desktop/TV - can use hover states
 *
 * Colors:
 *   --primary: #ff6b9d (warm pink - buttons, accents)
 *   --primary-hover: #ff8fb3
 *   --secondary: #ffd93d (sunny yellow - highlights)
 *   --accent: #6bcb77 (fresh green - success states)
 *   --background: #fff9f0 (warm cream)
 *   --surface: #ffffff (cards, inputs)
 *   --text: #2d3436 (soft black)
 *   --text-light: #636e72 (secondary text)
 *   --border: #ffe0e6 (soft pink border)
 *   --shadow: rgba(255, 107, 157, 0.15)
 *
 * Typography: Friendly, rounded system fonts
 * Corners: Generous rounding (12-20px)
 * Shadows: Soft, warm-tinted
 */

:root {
  --primary: #ff6b9d;
  --primary-hover: #ff8fb3;
  --secondary: #ffd93d;
  --accent: #6bcb77;
  --background: #fff9f0;
  --surface: #ffffff;
  --text: #2d3436;
  --text-light: #636e72;
  --border: #ffe0e6;
  --shadow: rgba(255, 107, 157, 0.15);
  --error: #ff7675;
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--background);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 20px;
}

.container.presenter {
  max-width: 1000px;
}

h1 {
  text-align: center;
  color: var(--text);
  margin-bottom: 24px;
  font-weight: 700;
  font-size: 1.75rem;
}

h2 {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 16px;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  margin-bottom: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--shadow);
}

input[type="text"]::placeholder,
input[type="number"]::placeholder {
  color: var(--text-light);
}

button {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  font-weight: 600;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 4px 12px var(--shadow);
}

button:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  background: #ddd;
  color: var(--text-light);
  cursor: not-allowed;
  box-shadow: none;
}

/* Secondary button style */
button.secondary {
  background: var(--surface);
  color: var(--primary);
  border: 2px solid var(--primary);
  box-shadow: none;
}

button.secondary:hover:not(:disabled) {
  background: #fff5f8;
}

p {
  text-align: center;
}

.success {
  color: var(--accent);
  font-weight: 500;
}

.error {
  color: var(--error);
  font-weight: 500;
}

/* Cards for content sections */
.card {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px var(--shadow);
  margin-bottom: 20px;
}

/* Player list (join screen, etc.) */
.player-count {
  font-size: 28px;
  text-align: center;
  font-weight: 700;
  color: var(--primary);
}

.player-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.player-list li {
  background: var(--surface);
  padding: 10px 20px;
  border-radius: 20px;
  border: 2px solid var(--border);
  font-weight: 500;
  transition: transform 0.2s, border-color 0.2s;
}

.player-list li:hover {
  transform: scale(1.05);
  border-color: var(--primary);
}

/* Badges/pills for status indicators */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}

.badge-success {
  background: #e8f5e9;
  color: var(--accent);
}

.badge-pending {
  background: #fff8e1;
  color: #f9a825;
}

/* Fun confetti-style decorative element */
.festive-header {
  position: relative;
  padding: 20px 50px;
  text-align: center;
}

.festive-header::before {
  content: "🎉";
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
}

.festive-header::after {
  content: "🎂";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
}

/* Submitted state styling */
.submitted {
  text-align: center;
  padding: 40px 20px;
}

.submitted h2 {
  color: var(--accent);
}

/* Animations */
@keyframes pop {
  0% { transform: scale(0.95); opacity: 0; }
  70% { transform: scale(1.02); }
  100% { transform: scale(1); opacity: 1; }
}

.animate-pop {
  animation: pop 0.3s ease-out;
}

/* ===========================================
   Mobile-First Player Styles
   Player screens are phone-only, optimized for touch
   =========================================== */

/* Prevent text selection on interactive elements */
button, .photo-placeholder, .photo-preview {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Larger touch targets (minimum 44px per Apple HIG) */
button {
  min-height: 52px;
}

input[type="text"],
input[type="number"] {
  min-height: 52px;
  font-size: 16px; /* Prevents iOS zoom on focus */
}

/* Safe area padding for notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .container {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}

/* Smooth scrolling on iOS */
html {
  -webkit-overflow-scrolling: touch;
}

/* Active states for touch feedback */
button:active:not(:disabled) {
  transform: scale(0.98);
}

/* Prevent pull-to-refresh interference on some elements */
.card {
  overscroll-behavior: contain;
}
