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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #1a5c2a;
  color: #fff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

#app {
  width: 100%;
  max-width: 500px;
  padding: 20px;
}

.hidden {
  display: none !important;
}

/* Select Screen */
#select-screen {
  text-align: center;
}

#select-screen h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

#select-screen p {
  margin-bottom: 24px;
  opacity: 0.8;
}

.ruleset-btn {
  display: block;
  width: 100%;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: #fff;
  color: #1a5c2a;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.ruleset-btn:hover {
  background: #e8f5e9;
}

.ruleset-btn .rules {
  display: block;
  font-size: 0.85rem;
  font-weight: 400;
  margin-top: 4px;
  opacity: 0.7;
}

/* Quiz Screen */
.quiz-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

#back-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

#back-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

#ruleset-label {
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.8;
}

.table {
  background: #14752e;
  border-radius: 16px;
  padding: 32px 24px;
  border: 3px solid #0d5a20;
}

.hand-display {
  display: flex;
  justify-content: space-around;
  margin-bottom: 28px;
}

.hand-section {
  text-align: center;
}

.hand-section .label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
  margin-bottom: 8px;
}

.card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 84px;
  background: #fff;
  color: #333;
  border-radius: 8px;
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hand-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  height: 84px;
  padding: 0 12px;
  background: #fff;
  color: #333;
  border-radius: 8px;
  font-size: 1.3rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.feedback {
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.feedback.correct {
  background: #43a047;
  color: #fff;
}

.feedback.wrong {
  background: #b71c1c;
  color: #ffcdd2;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.action-btn {
  padding: 14px 8px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.action-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
}

.action-btn:disabled {
  cursor: default;
  opacity: 0.5;
}

.action-btn.chosen-correct {
  background: #43a047;
  border-color: #66bb6a;
}

.action-btn.chosen-wrong {
  background: #b71c1c;
  border-color: #f44336;
}

.action-btn.reveal-correct {
  border-color: #4caf50;
  border-width: 3px;
}

.next-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: #ffc107;
  color: #333;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.next-btn:hover {
  background: #ffca28;
}
