/* Shared quiz/answer styles extracted from answer.html */
html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  font-family: 'Playpen Sans', sans-serif;
  background: linear-gradient(120deg, #8fd3f4 0%, #84fab0 100%);
  color: #fff;
  min-width: 100vw;
  min-height: 100vh;
  overflow: hidden;
}
.answer-container {
  width: 100vw;
  min-height: 100vh;
  height: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}
.answer-header {
  width: 100%;
  margin-bottom: 40px;
}
.header-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.question-number {
  flex: 0 0 auto;
  font-size: 1.5rem;
  font-weight: 700;
  color: #222;
  letter-spacing: 1px;
  min-width: 110px;
}
.header-progress {
  flex: 1 1 0;
  margin: 0 18px;
  min-width: 80px;
  width: 100%;
  display: flex;
  align-items: center;
  max-width: none;
  height: 38px;
  position: relative;
}
.header-progress-bar-bg {
  width: 100%;
  height: 38px;
  background: rgba(0,0,0,0.18);
  border-radius: 19px;
  overflow: hidden;
  position: relative;
  margin-left: 10px;
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #2ecc71, #27ae60);
  border-radius: 19px;
  min-width: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 1;
  transform-origin: right;
  transition: width 0.2s linear;
}
.header-progress-bar.red {
  background: linear-gradient(90deg, #e74c3c, #c0392b);
}
.header-pin {
  font-family: monospace;
  font-size: 1.1rem;
  background: rgba(0,0,0,0.15);
  border-radius: 8px;
  padding: 4px 12px;
  color: #222;
  z-index: 2;
  flex: 0 0 auto;
}
@media (max-width: 600px) {
  .answer-header {
    margin-bottom: 18px;
  }
  .header-row {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0;
  }
  .header-mobile-stack {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
  }
  .header-progress {
    margin: 0;
    max-width: 100%;
    width: 100%;
    min-width: 0;
  }
}
.answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  flex-grow: 1;
  margin-bottom: 40px;
  height: 100%;
  min-height: 0;
}
.answers.grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.answer-btn {
  padding: 0;
  border: none;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  outline: none;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.15s;
  height: 100%;
  min-height: 0;
  max-height: none;
}
.answer-btn svg {
  height: 50%;
  width: auto;
  display: block;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  pointer-events: none;
  fill: currentColor;
  color: inherit;
  transition: color 0.15s;
}
.answer-btn:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  transform: scale(1.04) translateY(-4px);
  z-index: 2;
}
.answer-btn:active {
  animation: jump 0.25s cubic-bezier(.4,1.5,.5,1) 1;
  outline: none;
}
@keyframes jump {
  0% { transform: scale(1.04) translateY(-4px); }
  30% { transform: scale(1.12) translateY(-24px); }
  60% { transform: scale(0.98) translateY(-6px); }
  100% { transform: scale(1.04) translateY(-4px); }
}
.answer-btn:nth-child(1) { background-color: #e74c3c; color: #fff; } /* red */
.answer-btn:nth-child(2) { background-color: #f1c40f; color: #fff; } /* yellow */
.answer-btn:nth-child(3) { background-color: #2ecc71; color: #fff; } /* green */
.answer-btn:nth-child(4) { background-color: #3498db; color: #fff; } /* blue */
.answer-btn:nth-child(5) { background-color: #9b59b6; color: #fff; } /* purple */
.answer-btn:nth-child(6) { background-color: #ff6f00; color: #fff; } /* orange */
.answer-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0 0 0;
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 1px;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-emoji {
  font-size: 2rem;
}
.footer-right {
  font-size: 1.3rem;
  font-weight: 700;
  color: #222;
  background: rgba(0,0,0,0.10);
  border-radius: 8px;
  padding: 4px 16px;
}

/* Answer-order specific styles */
.answer-btn .icon-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 32px;
  width: 100%;
  height: 100%;
}
.answer-btn svg.sign {
  height: 50%;
  width: auto;
  display: block;
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  pointer-events: none;
  fill: currentColor;
  color: inherit;
  transition: color 0.15s;
  flex-shrink: 0;
}
.order-circle {
  position: static;
  margin: 0;
  height: 50%;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  background: none;
  pointer-events: auto;
  flex-shrink: 0;
  aspect-ratio: 1;
}
.order-circle svg {
  height: 100%;
  width: 100%;
  display: block;
  fill: #111;
  color: #111;
}
@media (max-width: 600px) {
  .answer-btn .icon-row {
    flex-direction: column;
    gap: 16px;
  }
  .answer-btn svg.sign {
    height: 35%;
  }
  .order-circle {
    height: 35%;
  }
}

/* Join page styles */
.join-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  padding: 0;
}
.logo {
  font-size: 2rem;
  font-weight: 700;
  color: #222;
  letter-spacing: 1px;
}
.join-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-grow: 1;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}
.nickname-input {
  width: 100%;
  max-width: 500px;
  height: 80px;
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  border: 4px solid rgba(255, 255, 255, 0.5);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.9);
  color: #222;
  font-family: 'Playpen Sans', sans-serif;
  outline: none;
  transition: all 0.2s;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}
.nickname-input:focus {
  border-color: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  transform: scale(1.02);
}
.nickname-input::placeholder {
  color: #aaa;
}
.emoji-section {
  width: 100%;
  max-width: 600px;
}
.emoji-label {
  font-size: 1.5rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 15px;
  text-align: center;
}
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding: 15px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}
.emoji-btn {
  width: 50px;
  height: 50px;
  font-size: 2rem;
  border: 2px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}
.emoji-btn:hover {
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}
.emoji-btn.selected {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.2);
  transform: scale(1.2);
}
.join-submit-btn {
  width: 100%;
  max-width: 500px;
  height: 80px;
  font-size: 2rem;
  font-weight: 700;
  border: none;
  border-radius: 15px;
  background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%);
  color: #fff;
  font-family: 'Playpen Sans', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  outline: none;
}
.join-submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}
.join-submit-btn:active {
  animation: submitJump 0.3s cubic-bezier(.4,1.5,.5,1) 1;
}
@keyframes submitJump {
  0% { transform: translateY(-3px); }
  40% { transform: translateY(-15px) scale(1.05); }
  70% { transform: translateY(-2px); }
  100% { transform: translateY(-3px); }
}
@media (max-width: 600px) {
  .logo {
    font-size: 1.5rem;
  }
  .nickname-input {
    height: 70px;
    font-size: 1.6rem;
  }
  .emoji-label {
    font-size: 1.3rem;
  }
  .emoji-grid {
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    max-height: 250px;
  }
  .emoji-btn {
    width: 45px;
    height: 45px;
    font-size: 1.8rem;
  }
  .join-submit-btn {
    height: 70px;
    font-size: 1.6rem;
  }
}

/* Landing page styles */
.landing-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 40px 20px;
  gap: 20px;
}

.landing-logo {
  font-size: 4rem;
  font-weight: 700;
  color: #222;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 20px;
}

.landing-logo-img {
  max-width: 100%;
  width: 300px;
  height: auto;
  margin-bottom: 5px;
}

.landing-brand {
  font-family: 'Geologica', sans-serif;
  font-size: 4rem;
  font-weight: 700;
  color: #222;
  letter-spacing: 1px;
  text-align: center;
  margin-bottom: 30px;
}

.pin-form-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.pin-form-title {
  font-size: 2rem;
  font-weight: 700;
  color: #222;
  text-align: center;
  margin: 0;
}

.pin-input {
  width: 100%;
  height: 90px;
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 8px;
  border: 4px solid rgba(255, 255, 255, 0.5);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.9);
  color: #222;
  font-family: 'Playpen Sans', sans-serif;
  outline: none;
  transition: all 0.2s;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.pin-input:focus {
  border-color: #667eea;
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
  transform: scale(1.02);
}

.pin-input::placeholder {
  color: #aaa;
  letter-spacing: 4px;
  font-size: 1.8rem;
}

.pin-submit-btn {
  width: 100%;
  height: 80px;
  font-size: 2rem;
  font-weight: 700;
  border: none;
  border-radius: 15px;
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
  color: #fff;
  font-family: 'Playpen Sans', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  outline: none;
}

.pin-submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

.pin-submit-btn:active {
  animation: submitJump 0.3s cubic-bezier(.4,1.5,.5,1) 1;
}

.admin-link-section {
  width: 100%;
  text-align: center;
}

.admin-link {
  font-size: 1.2rem;
  font-weight: 600;
  color: #667eea;
  text-decoration: none;
  transition: all 0.15s;
  padding: 10px 20px;
  border-radius: 8px;
}

.admin-link:hover {
  color: #764ba2;
  background: rgba(102, 126, 234, 0.1);
  text-decoration: none;
}

@media (max-width: 600px) {
  .landing-content {
    gap: 10px;
  }
  .landing-logo {
    font-size: 3rem;
  }
  .landing-logo-img {
    width: 240px;
  }
  .landing-brand {
    font-size: 3.2rem;
  }
  .pin-form-title {
    font-size: 1.6rem;
  }
  .pin-input {
    height: 75px;
    font-size: 2rem;
    letter-spacing: 6px;
  }
  .pin-input::placeholder {
    font-size: 1.4rem;
  }
  .pin-submit-btn {
    height: 70px;
    font-size: 1.6rem;
  }
  .admin-link {
    font-size: 1.1rem;
  }
}

/* Action buttons (delete/submit) */
.action-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.action-btn {
  flex: 1 1 0;
  height: 60px;
  font-size: 2rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: all 0.2s;
  font-family: 'Playpen Sans', sans-serif;
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

.action-btn svg {
    height: 1em;
    width: 1em;
    vertical-align: middle;
    margin-right: 10px;
    fill: currentColor;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.action-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.delete-btn {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.submit-btn {
  background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%);
}

/* Shake animation for incomplete selections */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
  20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.answer-btn.shake {
  animation: shake 0.5s;
}
