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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
  background-color: #f5f5f5;
  padding: 20px;
  padding-bottom: 120px; /* Space for sticky input */
}

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

#game-container {
  background: white;
  border-radius: 12px;
  padding: 30px;
  padding-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.language-selector {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.language-selector label {
  display: inline-block;
  margin-right: 10px;
  font-weight: 500;
  color: #333;
  font-size: 14px;
}

.language-selector select {
  padding: 8px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  background-color: white;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.language-selector select:hover {
  border-color: #4285f4;
}

.language-selector select:focus {
  border-color: #4285f4;
}

#article-content {
  margin-bottom: 20px;
}

.article-section {
  margin-bottom: 25px;
}

.article-section.title-section {
  margin-bottom: 30px;
}

.article-section.title-section .section-blocks {
  font-size: 24px;
  font-weight: 600;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
  margin-bottom: 20px;
}

.tag {
  display: inline-block;
  background-color: #e3f2fd;
  color: #1976d2;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
}

.section-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #333;
}

.section-blocks {
  font-size: 16px;
  line-height: 1.8;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.line-break {
  width: 100%;
}

.input-history {
  margin-top: 30px;
  margin-bottom: 20px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 8px;
}

.history-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.history-words {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-word {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.history-word.found {
  background-color: #4caf50;
  color: white;
}

.history-word.similar {
  background-color: #ff9800;
  color: white;
}

.history-word.none {
  background-color: #e0e0e0;
  color: #666;
  text-decoration: line-through;
}

.block {
  display: inline-block;
}

.block.hidden {
  background-color: #e0e0e0;
  padding: 4px 8px;
  border-radius: 4px;
  text-align: center;
  font-family: monospace;
  color: #cecece;
}

.block.visible {
  font-weight: 500;
}

.block.found {
  background-color: #4caf50;
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 600;
}

.block.similar {
  background-color: #ff9800;
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 600;
  cursor: help;
}

.block.revealed {
  font-weight: 500;
  /* No background, no padding - just regular text */
}

.input-section {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 10px;
  padding: 15px 20px;
  background: white;
  border-top: 1px solid #e0e0e0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

@media (min-width: 640px) {
  .input-section {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    max-width: 600px;
    width: 100%;
    border-radius: 12px 12px 0 0;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
  }
}

#user-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}

#user-input:focus {
  border-color: #4285f4;
}

#user-input:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

#submit-btn {
  padding: 12px 24px;
  background-color: #4285f4;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

#submit-btn:hover:not(:disabled) {
  background-color: #357ae8;
}

#submit-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.game-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.attempts {
  color: #666;
  font-size: 14px;
}

.reset-btn {
  padding: 8px 16px;
  background-color: #f44336;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.reset-btn:hover {
  background-color: #d32f2f;
}

.loading,
.error {
  text-align: center;
  padding: 20px;
  color: #666;
}

.error {
  color: #d32f2f;
}
