:root {
  --primary: #e63946;
  --secondary: #457b9d;
  --accent: #f4a261;
  --dark: #1d3557;
  --light: #f1faee;
  --bg: #fef9ef;
  --text: #2d3436;
  --text-light: #636e72;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.features-header {
  background: var(--dark);
  color: white;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.features-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
}

.features-header a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.features-header a:hover {
  text-decoration: underline;
}

.features-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* Submit Form */
.submit-form {
  background: white;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(29, 53, 87, 0.08);
  margin-bottom: 1.5rem;
}

.submit-form textarea {
  width: 100%;
  border: 2px solid var(--light);
  border-radius: 8px;
  padding: 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  resize: none;
  transition: border-color 0.2s;
  line-height: 1.4;
}

.submit-form textarea:focus {
  outline: none;
  border-color: var(--secondary);
}

.submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.6rem;
}

.char-count {
  font-size: 0.8rem;
  color: var(--text-light);
  transition: color 0.2s;
}

.char-count.warn {
  color: var(--accent);
}

.char-count.over {
  color: var(--primary);
  font-weight: 600;
}

.submit-btn {
  background: var(--secondary);
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.submit-btn:hover:not(:disabled) {
  background: var(--dark);
}

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

/* Sort Toggle */
.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.sort-bar .count {
  font-size: 0.85rem;
  color: var(--text-light);
}

.sort-toggle {
  display: inline-flex;
  gap: 0;
  background: var(--light);
  border-radius: 8px;
  padding: 3px;
}

.sort-toggle button {
  padding: 0.3rem 0.7rem;
  border: none;
  background: transparent;
  color: var(--text-light);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
  font-family: inherit;
}

.sort-toggle button:hover {
  color: var(--text);
}

.sort-toggle button.active {
  background: var(--secondary);
  color: white;
}

/* Request Cards */
.request-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.request-card {
  background: white;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 4px rgba(29, 53, 87, 0.06);
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.request-text {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.45;
  word-break: break-word;
}

.request-meta {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.35rem;
}

.like-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 8px;
  transition: background 0.2s;
  flex-shrink: 0;
  min-width: 38px;
}

.like-btn:hover {
  background: var(--light);
}

.like-heart {
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 0.15s;
}

.like-btn:active .like-heart {
  transform: scale(1.3);
}

.like-heart.liked {
  color: var(--primary);
}

.like-heart:not(.liked) {
  color: var(--text-light);
  opacity: 0.5;
}

.like-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.pagination button {
  background: var(--light);
  border: none;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  transition: background 0.2s;
}

.pagination button:hover:not(:disabled) {
  background: var(--secondary);
  color: white;
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination .page-info {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Empty / Loading */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
}

.empty-state p {
  font-size: 0.95rem;
}

.loading-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
}

/* Responsive */
@media (max-width: 480px) {
  .features-header {
    padding: 0.8rem 1rem;
  }

  .features-container {
    padding: 1rem 0.75rem;
  }

  .submit-form {
    padding: 1rem;
  }
}
