* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Roboto, system-ui, sans-serif;
  box-shadow: none !important;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  transition:
    background 0.25s,
    color 0.2s;
  background: #f5f2f0;
}

body.dark {
  background: #1a1f26;
  color: #e8e2db;
}

.game-wrapper {
  max-width: 860px;
  width: 100%;
  background: #ffffff;
  border-radius: 48px 48px 32px 32px;
  overflow: hidden;
  padding: 30px 30px 35px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition:
    background 0.25s,
    border 0.2s;
}

body.dark .game-wrapper {
  background: #262d36;
  border-color: #3d4652;
}

.header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  border-bottom: 2px dashed #d6cdc4;
  padding-bottom: 18px;
  transition: border-color 0.2s;
}

body.dark .header {
  border-color: #3f4a56;
}

.editor-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.avatar {
  background: #2c3e50;
  color: white;
  width: 52px;
  height: 52px;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 600;
}

body.dark .avatar {
  background: #3e4d5e;
}

.editor-detail {
  line-height: 1.3;
}

.editor-name {
  font-weight: 700;
  font-size: 1.2rem;
  color: #1e2b37;
  transition: color 0.2s;
}

body.dark .editor-name {
  color: #e8e2db;
}

.rating-stars {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.1rem;
  background: #f2eee9;
  padding: 4px 14px 4px 10px;
  border-radius: 40px;
  margin-top: 4px;
  width: fit-content;
  transition: background 0.2s;
}

body.dark .rating-stars {
  background: #323b45;
}

.subscribers {
  background: #e4ded7;
  padding: 4px 14px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e2b37;
  margin-top: 4px;
  transition:
    background 0.2s,
    color 0.2s;
  display: inline-block;
}

body.dark .subscribers {
  background: #3a4451;
  color: #d6cec4;
}

.badge {
  background: #d9d0c7;
  padding: 4px 14px;
  border-radius: 40px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2c3e50;
  transition:
    background 0.2s,
    color 0.2s;
}

body.dark .badge {
  background: #3f4a56;
  color: #d6cec4;
}

.theme-toggle,
.next-news-btn {
  background: #e4ded7;
  border: none;
  border-radius: 40px;
  padding: 8px 18px;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #1e2b37;
}

body.dark .theme-toggle,
body.dark .next-news-btn {
  background: #3a4451;
  color: #e8e2db;
}

.theme-toggle:hover,
.next-news-btn:hover {
  transform: scale(0.95);
}

.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.article-block {
  background: #fbf9f7;
  border-radius: 28px;
  padding: 22px 24px 20px;
  margin: 12px 0 20px;
  border-left: 6px solid #b8a99c;
  transition:
    background 0.2s,
    border-color 0.2s;
}

body.dark .article-block {
  background: #2d3640;
  border-left-color: #5e6b7a;
}

.article-headline {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.2;
  color: #1f2a33;
  transition: color 0.2s;
}

body.dark .article-headline {
  color: #ece6de;
}

.article-meta {
  display: flex;
  gap: 20px;
  margin-top: 10px;
  color: #5d6d7a;
  font-size: 0.9rem;
  flex-wrap: wrap;
  transition: color 0.2s;
}

body.dark .article-meta {
  color: #aab3be;
}

.sources {
  margin: 18px 0 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 30px;
  background: #f3efe9;
  padding: 14px 20px;
  border-radius: 40px;
  transition: background 0.2s;
}

body.dark .sources {
  background: #323b45;
}

.source-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  transition: color 0.2s;
}

.source-item.checked {
  color: #1f7b4d;
}

body.dark .source-item.checked {
  color: #6bbf8a;
}

.source-item.unchecked {
  color: #a28d7a;
}

body.dark .source-item.unchecked {
  color: #9aa6b3;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 6px;
}

.btn {
  background: white;
  border: none;
  padding: 12px 28px;
  border-radius: 60px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.15s;
  border: 1px solid #d0c4b8;
  color: #1e2b37;
  background: #f5f1ec;
  flex: 1 0 auto;
}

body.dark .btn {
  background: #323b45;
  border-color: #4b5664;
  color: #e8e2db;
}

.btn-primary {
  background: #1f3a4b;
  border: 1px solid #1f3a4b;
  color: white;
}

body.dark .btn-primary {
  background: #2b4a60;
  border-color: #2b4a60;
  color: white;
}

.btn-primary:hover {
  background: #142b39;
  transform: scale(0.97);
}

body.dark .btn-primary:hover {
  background: #1d374a;
}

.btn-outline {
  background: transparent;
  border: 1px solid #b8a99c;
}

body.dark .btn-outline {
  border-color: #5e6b7a;
  background: transparent;
}

.btn-outline:hover {
  background: #e7dfd7;
}

body.dark .btn-outline:hover {
  background: #3a4451;
}

.btn-success {
  background: #2b6d4a;
  border: 1px solid #2b6d4a;
  color: white;
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: white;
  max-width: 640px;
  width: 100%;
  border-radius: 48px;
  padding: 32px 32px 28px;
  animation: fadeUp 0.25s ease;
  transition:
    background 0.2s,
    color 0.2s;
  max-height: 90vh;
  overflow-y: auto;
}

body.dark .modal-card {
  background: #262d36;
  color: #e8e2db;
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-card h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #1f2a33;
  transition: color 0.2s;
}

body.dark .modal-card h3 {
  color: #ece6de;
}

.fact-list {
  background: #f4f0ea;
  border-radius: 30px;
  padding: 20px 24px;
  margin: 18px 0;
  transition: background 0.2s;
}

body.dark .fact-list {
  background: #323b45;
}

.fact-list li {
  list-style: none;
  padding: 6px 0;
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #ddd2c6;
  transition: border-color 0.2s;
}

body.dark .fact-list li {
  border-bottom-color: #3f4a56;
}

.fact-list li:last-child {
  border-bottom: 0;
}

.fact-emoji {
  font-size: 1.5rem;
}

.highlight-box {
  background: #e7ded5;
  padding: 14px 20px;
  border-radius: 40px;
  margin: 16px 0 18px;
  font-weight: 500;
  transition: background 0.2s;
}

body.dark .highlight-box {
  background: #3a4451;
}

.new-headline-option {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 18px;
}

.headline-option {
  background: #f2ede7;
  padding: 12px 18px;
  border-radius: 60px;
  cursor: pointer;
  transition: 0.15s;
  border: 2px solid transparent;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

body.dark .headline-option {
  background: #323b45;
}

.headline-option:hover {
  opacity: 0.85;
  transform: scale(1.01);
}

.headline-option.selected {
  border-color: #1f3a4b;
  background: #e3dbd1;
}

body.dark .headline-option.selected {
  border-color: #6b8da8;
  background: #3a4a57;
}

.headline-option.clickbait {
  background: #e8e3dd;
  border-color: #c4b8ac;
  opacity: 0.85;
}

body.dark .headline-option.clickbait {
  background: #3d4652;
  border-color: #5a6572;
}

.headline-option.clickbait.selected {
  border-color: #8a7a6a;
  background: #d5cdc4;
}

body.dark .headline-option.clickbait.selected {
  border-color: #7a8a9a;
  background: #4a5562;
}

.headline-option .check-mark {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.final-report {
  background: #f0ebe4;
  border-radius: 28px;
  padding: 20px 24px;
  margin-top: 24px;
  transition: background 0.2s;
}

body.dark .final-report {
  background: #2d3640;
}

.hidden {
  display: none;
}

.mt-12 {
  margin-top: 12px;
}
.mt-8 {
  margin-top: 8px;
}
.mb-8 {
  margin-bottom: 8px;
}
.text-sm {
  font-size: 0.95rem;
}

.bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
  gap: 12px;
}

.next-news-btn {
  flex-shrink: 0;
}

body:not(.dark) .headline-option.clickbait {
  background: #f0ebe4;
  border-color: #d5cbc1;
}

body:not(.dark) .headline-option.clickbait.selected {
  background: #e0d7ce;
  border-color: #b8a99c;
}
/* ===== Кнопка правил ===== */
.rules-toggle {
  background: #e4ded7;
  border: none;
  border-radius: 40px;
  padding: 8px 18px;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #1e2b37;
}

body.dark .rules-toggle {
  background: #3a4451;
  color: #e8e2db;
}

.rules-toggle:hover {
  transform: scale(0.95);
}

/* ===== Модалка правил ===== */
.rules-card {
  max-width: 620px;
}

.rules-card p {
  line-height: 1.55;
  margin: 10px 0;
  color: #1f2a33;
}

body.dark .rules-card p {
  color: #e8e2db;
}

.rules-list {
  margin: 8px 0 14px;
  padding-left: 24px;
  line-height: 1.6;
  color: #1f2a33;
}

body.dark .rules-list {
  color: #e8e2db;
}

.rules-list li {
  margin: 6px 0;
}

.rules-footer {
  margin-top: 16px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #2b6d4a;
  text-align: center;
}

body.dark .rules-footer {
  color: #6bbf8a;
}