:root {
  --primary: #ff90e8;
  --primary-hover: #ff7ce3;
  --background: #ffffff;
  --foreground: #2f2f2f;
  --muted: #f7f7f7;
  --muted-foreground: #6b7280;
  --border: #e5e7eb;
  --radius: 0.75rem;
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
}

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

body {
  font-family: var(--font-sans);
  line-height: 1.5;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  padding-top: 1rem;
}

h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, var(--foreground), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

header p {
  color: var(--muted-foreground);
  font-size: 1.125rem;
}

.card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.05);
}

.hint {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--muted);
  border-radius: var(--radius);
}

.input-group {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.select-wrapper {
  position: relative;
}

input,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-sans);
  background: var(--background);
  transition: all 0.2s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 144, 232, 0.1);
}

.dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  margin-top: 0.5rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.dropdown-list div {
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropdown-list div:hover {
  background: var(--muted);
  color: var(--primary);
}

.primary-button {
  background: var(--primary);
  color: var(--foreground);
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

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

.primary-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.guess-grid {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 1.5rem;
  overflow: hidden;
}

.guess-header {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted-foreground);
  background: var(--muted);
  border-bottom: 1px solid var(--border);
}

.guess-item {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
}

.guess-item:hover {
  background: var(--muted);
}

.guess-item:last-child {
  border-bottom: none;
}


.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-content {
  background: var(--background);
  padding: 2rem;
  border-radius: var(--radius);
  max-width: 32rem;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

.hidden {
  display: none;
}


.close-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--muted);
  border: none;
  height: 2rem;
  width: 2rem;
  border-radius: 9999px;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground);
  transition: all 0.2s ease;
}

.close-button:hover {
  background: var(--border);
  transform: scale(1.05);
}

.indicators-list {
  list-style: none;
  margin: 1.5rem 0;
}

.indicators-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  background: var(--muted);
  border-radius: var(--radius);
}

.header-buttons {
  position: fixed;
  right: 1rem;
  top: 1rem;
  z-index: 100;
}

.icon-button {
  background: var(--background);
  border: 1px solid var(--border);
  height: 2.5rem;
  width: 2.5rem;
  border-radius: 9999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground);
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.icon-button:hover {
  background: var(--muted);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.share-text {
  background: var(--muted);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-top: 1.5rem;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: monospace;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-text:hover {
  background: var(--border);
}

/* Modal Typography */
.modal-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(to right, var(--foreground), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

.modal-content p {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

/* Game Over Section */
#game-over {
  text-align: center;
  padding: 2rem;
}

#game-over h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(to right, var(--foreground), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#game-over p {
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .input-group {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 1rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  .guess-header,
  .guess-item {
    font-size: 0.875rem;
    gap: 0.5rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card,
.guess-item,
.modal-content {
  animation: fadeIn 0.3s ease-out;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.secondary-button {
  background: var(--background);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.secondary-button:hover {
  background: var(--muted);
  transform: translateY(-1px);
}

.button-icon {
  width: 20px;
  height: 20px;
}

/* Update header buttons to only show instructions */
.header-buttons {
  position: fixed;
  right: 1rem;
  top: 1rem;
  z-index: 100;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#game-over .modal-content {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

#game-over .close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 5px 10px;
  color: #666;
}

#game-over .close-button:hover {
  color: #000;
}

.hidden {
  display: none !important;
}

.input-error {
  border-color: #ff4444 !important;
  box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.1) !important;
}

.error-message {
  color: #ff4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  position: absolute;
  left: 0;
  bottom: -1.25rem;
}

