.tn-community-completion,
.tn-community-empty,
.tn-community-section {
  border: 1px solid rgba(145, 70, 255, .28);
  background: linear-gradient(135deg, rgba(31, 35, 42, .96), rgba(21, 24, 30, .96));
  border-radius: 8px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .22), 0 0 0 1px rgba(255, 255, 255, .03) inset;
}

.tn-community-completion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  margin: 18px 0;
}

.tn-community-completion__main { flex: 1; min-width: 180px; }
.tn-community-completion__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.tn-community-completion__label { color: #fff; font-weight: 800; }
.tn-community-completion__hint { color: rgba(229, 231, 235, .72); font-size: 14px; }
.tn-community-progress { height: 8px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.tn-community-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #9146ff, #c084fc); box-shadow: 0 0 18px rgba(145, 70, 255, .6); }

.tn-community-open,
.tn-community-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  background: #9146ff;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(145, 70, 255, .32);
}

.tn-community-open:hover,
.tn-community-submit:hover { filter: brightness(1.08); }
.tn-community-open--small { padding: 9px 13px; }

.tn-community-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  margin: 18px 0;
}
.tn-community-empty h2 { margin: 0 0 4px; color: #fff; font-size: 20px; }
.tn-community-empty p { margin: 0; color: rgba(229, 231, 235, .76); }

.tn-community-section { padding: 18px; margin: 22px 0; }
.tn-community-section__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tn-community-section__head h2 { margin: 0; color: #fff; font-size: 22px; }
.tn-community-link { border: 0; background: transparent; color: #c084fc; font-weight: 700; cursor: pointer; }

.tn-community-facts__list { display: grid; gap: 12px; }
.tn-community-fact {
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .07);
}
.tn-community-fact p { margin: 0 0 12px; color: #f3f4f6; line-height: 1.55; }
.tn-community-votes { display: flex; gap: 8px; }
.tn-community-votes button {
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(0, 0, 0, .18);
  color: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.tn-community-tournaments__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tn-community-tournament { padding: 14px; border-radius: 8px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .07); }
.tn-community-tournament h3 { margin: 0 0 10px; color: #fff; font-size: 17px; }
.tn-community-tournament dl { display: grid; gap: 7px; margin: 0; }
.tn-community-tournament dl div { display: flex; justify-content: space-between; gap: 12px; }
.tn-community-tournament dt { color: rgba(229, 231, 235, .62); }
.tn-community-tournament dd { margin: 0; color: #fff; text-align: right; }
.tn-community-tournament a { display: inline-block; margin-top: 10px; color: #c084fc; }
.tn-community-list { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.tn-community-list li { display: grid; gap: 4px; padding: 12px; border-radius: 8px; background: rgba(255, 255, 255, .045); color: #f3f4f6; }
.tn-community-list span { color: rgba(229, 231, 235, .72); }

.tn-community-modal[hidden] { display: none; }
.tn-community-modal {
  display: block;
  margin: 18px 0 24px;
  scroll-margin-top: 90px;
}
.tn-community-modal__dialog {
  position: relative;
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(145, 70, 255, .35);
  background: linear-gradient(135deg, rgba(23, 26, 33, .98), rgba(18, 20, 26, .98));
  color: #fff;
  padding: 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .32), 0 0 26px rgba(145, 70, 255, .12);
}
.tn-community-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}
.tn-community-modal h2 { margin: 0 38px 18px 0; font-size: 24px; }
.tn-community-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tn-community-choices button {
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 8px;
  background: rgba(255, 255, 255, .055);
  color: #fff;
  text-align: left;
  padding: 12px;
  cursor: pointer;
}
.tn-community-choices button:hover { border-color: rgba(145, 70, 255, .65); background: rgba(145, 70, 255, .15); }
.tn-community-choices button.is-active { border-color: rgba(145, 70, 255, .9); background: rgba(145, 70, 255, .22); box-shadow: 0 0 0 1px rgba(145, 70, 255, .22) inset; }
.tn-community-form__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.tn-community-form__head h2 { margin: 0; }
.tn-community-back { border: 0; background: transparent; color: #c084fc; cursor: pointer; padding: 0; }
.tn-community-fields,
.tn-community-form { display: grid; gap: 12px; }
.tn-community-fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tn-community-fields-grid label:has(textarea) { grid-column: 1 / -1; }
.tn-community-form label { display: grid; gap: 6px; color: rgba(229, 231, 235, .8); font-weight: 700; }
.tn-community-form input,
.tn-community-form select,
.tn-community-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  background: rgba(0, 0, 0, .24);
  color: #fff;
  padding: 11px 12px;
}
.tn-community-form textarea { resize: vertical; }
.tn-community-hp { position: absolute; left: -9999px; opacity: 0; }
.tn-community-message { min-height: 20px; margin: 0; color: #c4b5fd; }
.tn-community-current {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .08);
  color: rgba(229, 231, 235, .78);
}
.tn-community-current strong { color: #fff; }
.tn-community-current p { margin: 0; line-height: 1.45; }
.tn-community-form input[readonly],
.tn-community-form textarea[readonly] {
  color: rgba(229, 231, 235, .62);
  background: rgba(255, 255, 255, .035);
}

@media (max-width: 640px) {
  .tn-community-completion,
  .tn-community-empty { align-items: stretch; flex-direction: column; }
  .tn-community-choices { grid-template-columns: 1fr; }
  .tn-community-fields-grid { grid-template-columns: 1fr; }
  .tn-community-open { width: 100%; }
}
