:root {
  --color-bg: #ffffff;
  --color-text: #111827;
  --color-muted: #f9fafb;
  --color-primary: #173A8D;
  --color-secondary: #6b7280;
  --color-accent: #FACC15;
  --color-pink: #EC4899;
  --radius: 16px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  --transition: 0.2s ease-in-out;
}

html.dark {
  --color-bg: #0f172a;
  --color-text: #e2e8f0;
  --color-muted: #1e293b;
  --color-secondary: #94a3b8;
  --shadow: none;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: 'Inter', sans-serif;
  transition: all var(--transition);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.bg-white {
  background-color: var(--color-bg) !important;
}
.text-gray-700, .text-gray-800 {
  color: var(--color-text) !important;
}
.border-gray-200 {
  border-color: var(--color-muted) !important;
}

.mp-threads-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Nagłówek */
.mp-threads-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
}
.mp-threads-header p {
  font-size: 1rem;
  color: var(--color-secondary);
  margin-bottom: 1rem;
}

/* Formularz */
.mp-question-form {
  background: var(--color-muted);
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}
.mp-question-form input,
.mp-question-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 12px;
  background: var(--color-bg);
  color: var(--color-text);
}

/* Przyciski */
.mp-btn-primary {
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 0.6rem 1.4rem;
  border-radius: 9999px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.mp-btn-primary:hover {
  background: #0e2e74;
}

/* Karta pytania */
.mp-thread-item {
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid #e5e7eb;
}
.mp-thread-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--color-secondary);
}
.mp-thread-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 0.5rem;
  color: var(--color-text);
}
.mp-thread-content {
  font-size: 0.95rem;
  margin-top: 0.5rem;
}
.mp-thread-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--color-secondary);
}
.mp-thread-footer .mp-action {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}
.vote.voted,
.react.voted {
  opacity: 0.4;
  pointer-events: none;
}

/* Badge MP+ */
.mp-badge {
  background: var(--color-primary);
  color: white;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-weight: 600;
}

/* Alerty */
.mp-alert {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.mp-success {
  background: #dcfce7;
  color: #166534;
}
.mp-error {
  background: #fee2e2;
  color: #b91c1c;
}

/* Refleksje */
.mp-comment-thread > div {
  background: var(--color-muted);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.mp-comment-thread .children {
  margin-left: 2rem;
  margin-top: 0.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--color-secondary);
}
.mp-comment-thread .like-comment {
  color: var(--color-pink);
  cursor: pointer;
}

/* Mini-komentarze (na feedzie) */
.mp-mini-comments .mp-mini-comment {
  background: var(--color-muted);
  border: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}
.mp-mini-comment:hover {
  background-color: #f3f4f6;
}
[data-theme="dark"] .mp-mini-comment:hover {
  background-color: #1c1c1e;
}

/* Responsywność */
@media screen and (max-width: 480px) {
  .mp-thread-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  .mp-comment-thread .children {
    margin-left: 1rem;
  }
  .mp-question-form input,
  .mp-question-form textarea {
    font-size: 0.95rem;
  }
}

.mp-question-form {
  background: var(--color-muted);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  max-width: 100%;
}

.mp-input, .mp-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  background: var(--color-bg);
  color: var(--color-text);
  resize: vertical;
  transition: border-color 0.2s;
}

.mp-input:focus, .mp-textarea:focus {
  border-color: var(--color-primary);
  outline: none;
}

.mp-btn-primary {
  background: var(--color-primary);
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  transition: background 0.3s ease;
}

.mp-btn-primary:hover {
  background: #0d2f7a;
}

@media (max-width: 640px) {
  .mp-question-form {
    padding: 1.25rem;
  }
}

.mp-thread-item {
  background: var(--color-bg);
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.mp-thread-item:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.mp-thread-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0.5rem 0;
}

.mp-thread-content {
  color: var(--color-text);
  font-size: 0.95rem;
}

.mp-thread-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--color-secondary);
}

.mp-thread-footer .mp-action {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.mp-comment-bubble {
  background: var(--color-muted);
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.mp-comment-bubble .children {
  margin-left: 1.25rem;
  margin-top: 1rem;
  border-left: 2px solid #e5e7eb;
  padding-left: 1rem;
}

[data-theme="dark"] .mp-comment-bubble {
  background: #1e293b;
  border-color: #334155;
}

@media (max-width: 640px) {
  .mp-comment-bubble .children {
    margin-left: 0.75rem;
    padding-left: 0.75rem;
  }
}

input.mp-input {
  padding: 0.6rem 1rem;
  border-radius: 9999px;
  border: 1px solid #ccc;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 1rem;
  transition: all 0.3s ease;
}
input.mp-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(23, 58, 141, 0.2);
}

ul.space-y-2 li,
ul.space-y-3 li {
  background: var(--color-muted);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

