/* games/lucky-or-not/style.css */
:root {
  --bg-primary: #f7fafc;
  --bg-card: #fff;
  --bg-hover: #f1f5f9;
  --text-primary: #1a202c;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px #0000000d;
  --shadow-md: 0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a;
  --shadow-lg: 0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;
  --radius: 8px;
  --radius-lg: 12px;
}

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

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
}

.game-container {
  display: flex;
  gap: 24px;
  height: 100vh;
  padding: 24px;
}

.wheel-area {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: center;
  align-items:  center;
  gap: 24px;
  min-width: 0;
  min-height: 0;
}

.wheel-wrapper {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items:  center;
  width: 100%;
  min-height: 0;
}

.wheel-wrapper canvas {
  image-rendering: auto;
}

.empty-state {
  text-align: center;
  color: var(--text-secondary);
}

.empty-state h2 {
  margin-bottom: 16px;
  font-size: 24px;
  font-weight: 700;
}

.winner-screen {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items:  center;
  gap: 24px;
}

.winner-screen h1 {
  color: #38a169;
  font-size: 36px;
  font-weight: 700;
}

.winner-name {
  display: inline-block;
  border-radius: var(--radius-lg);
  border: 2px solid;
  padding: 24px 32px;
  font-size: 24px;
  font-weight: 700;
}

.btn-row {
  display: flex;
  flex-shrink: 0;
  gap: 16px;
}

.btn {
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  padding: 10px 32px;
  transition: opacity .15s, background-color .15s;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.btn-primary {
  color: #fff;
  background: #1a202c;
}

.btn-primary:hover:not(:disabled) {
  background: #2d3748;
}

.btn-outline {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-outline:hover:not(:disabled) {
  background: var(--bg-hover);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 14px;
}

.btn-full {
  width: 100%;
}

.btn-lg {
  padding: 12px 32px;
  font-size: 18px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  width: 320px;
  min-height: 0;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 16px;
}

.card-header {
  display: flex;
  flex-shrink: 0;
  justify-content: space-between;
  align-items:  center;
  margin-bottom: 16px;
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.card-header-actions {
  display: flex;
  align-items:  center;
  gap: 8px;
}

.add-entry-form {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
  margin-bottom: 16px;
}

.add-entry-form input {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  outline: none;
  flex: 1;
  padding: 8px 12px;
  transition: border-color .15s;
  font-family: inherit;
  font-size: 14px;
}

.add-entry-form input:focus {
  border-color: #3182ce;
}

.entries-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 2px;
  min-height: 0;
}

.entries-list::-webkit-scrollbar {
  width: 6px;
}

.entries-list::-webkit-scrollbar-track {
  background: none;
}

.entries-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.entry-item {
  display: flex;
  border-radius: var(--radius);
  justify-content: space-between;
  align-items:  center;
  padding: 8px;
  transition: background-color .1s;
  font-size: 14px;
}

.entry-item:hover {
  background: var(--bg-hover);
}

.entry-color-dot {
  border-radius: 50%;
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-right: 8px;
}

.entry-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.entry-remove {
  cursor: pointer;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: 4px;
  flex-shrink: 0;
  margin-left: 8px;
  padding: 2px 4px;
  transition: color .15s, background-color .15s;
  font-size: 16px;
  line-height: 1;
}

.entry-remove:hover {
  color: #e53e3e;
  background: #fee2e2;
}

.entries-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 32px 0;
  font-size: 14px;
}

.modal-overlay {
  position: fixed;
  display: flex;
  z-index: 100;
  animation: fadeIn .15s ease-out;
  background: #00000080;
  justify-content: center;
  align-items:  center;
  inset: 0;
}

.modal-overlay.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px)scale(.96);
  }

  to {
    opacity: 1;
    transform: translateY(0)scale(1);
  }
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: slideUp .2s ease-out;
  width: 90%;
  max-width: 420px;
  padding: 32px;
}

.modal-title {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 600;
}

.modal-subtitle {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 14px;
}

.modal-label {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
}

.modal-eliminated-name {
  display: inline-block;
  border-radius: var(--radius-lg);
  border: 2px solid;
  margin-bottom: 12px;
  padding: 16px 24px;
  font-size: 24px;
  font-weight: 700;
}

.modal-note {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 14px;
}

.btn-icon-only {
  display: flex;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  justify-content: center;
  align-items:  center;
  width: 32px;
  height: 32px;
  padding: 0;
  transition: color .15s, background-color .15s, border-color .15s;
}

.btn-icon-only svg {
  width: 15px;
  height: 15px;
}

.btn-icon-only:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-color: #cbd5e1;
}

.btn-icon-only:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.btn-icon-filled {
  background: var(--text-primary);
  color: #fff;
  border-color: var(--text-primary);
}

.btn-icon-filled:hover:not(:disabled) {
  color: #fff;
  background: #2d3748;
  border-color: #2d3748;
}

.btn-icon-filled:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.spin-label {
  display: inline-flex;
  align-items:  center;
  gap: 4px;
}

.spin-label-hidden {
  visibility: hidden;
}

#spin-btn {
  position: relative;
  display: inline-grid;
}

#spin-btn > .spin-label {
  grid-area: 1 / 1;
  justify-content: center;
}

@keyframes spin-rotate {
  to {
    transform: rotate(360deg);
  }
}

.spin-icon-anim {
  animation: spin-rotate .8s linear infinite;
}

.btn-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.modal-icon-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.modal-icon {
  color: var(--text-primary);
  width: 64px;
  height: 64px;
}

.winner-icon {
  display: flex;
  justify-content: center;
}

.winner-icon svg {
  color: #38a169;
  width: 64px;
  height: 64px;
}
