* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Vazirmatn", "Tahoma", sans-serif;
  background: linear-gradient(135deg, #e0f7fa 0%, #fff3e0 100%);
  color: #2d2d2d;
  min-height: 100vh;
}

.site-header {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}

.site-header h1 {
  font-size: 2.4rem;
  margin: 0;
}

.subtitle {
  color: #555;
  margin-top: 0.4rem;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.card h2 {
  margin-top: 0;
}

.hint {
  color: #777;
  font-size: 0.9rem;
  margin-top: -0.4rem;
}

.inline-form {
  display: flex;
  gap: 0.6rem;
}

input[type="text"],
textarea,
select {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ddd;
  border-radius: 10px;
  width: 100%;
}

textarea {
  resize: vertical;
  min-height: 70px;
}

button {
  font-family: inherit;
  font-size: 1rem;
  background: #ff8a65;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

button:hover {
  background: #ff7043;
}

button.secondary {
  background: #4db6ac;
}

button.secondary:hover {
  background: #00897b;
}

button.danger {
  background: #ef5350;
}

button.danger:hover {
  background: #e53935;
}

.error-text {
  color: #d32f2f;
  min-height: 1.2em;
  font-size: 0.9rem;
}

.leaderboard {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.person-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: #fafafa;
  border: 1px solid #eee;
}

.person-row.active {
  border-color: #ff8a65;
  background: #fff3ec;
}

.person-rank {
  font-weight: bold;
  font-size: 1.2rem;
  width: 2.2rem;
  text-align: center;
}

.person-info {
  flex: 1;
}

.person-name {
  font-weight: bold;
}

.person-title {
  display: block;
  font-size: 0.8rem;
  color: #ff8a65;
}

.person-time {
  font-family: monospace;
  font-size: 1.1rem;
  min-width: 6.5rem;
  text-align: center;
}

.person-actions {
  display: flex;
  gap: 0.4rem;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.comment-form-row {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.anon-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  font-size: 0.9rem;
}

.comments-list {
  margin-top: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.comment-item {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 0.8rem 1rem;
}

.comment-meta {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 0.3rem;
  display: flex;
  justify-content: space-between;
}

.comment-author {
  font-weight: bold;
  color: #555;
}

.comment-text {
  white-space: pre-wrap;
}

.site-footer {
  text-align: center;
  color: #999;
  padding: 1rem;
  font-size: 0.85rem;
}

.empty-state {
  color: #999;
  text-align: center;
  padding: 1rem;
}
