.jedi-rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
}

.jedi-rank-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 50%;
}

.jedi-rank-title {
  font-size: 0.75rem;
  opacity: 0.75;
}

.jedi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.jedi-card,
.jedi-profile-card,
.jedi-form,
.jedi-lesson {
  background: rgba(10, 18, 32, 0.72);
  border: 1px solid rgba(102, 194, 255, 0.25);
  border-radius: 12px;
  padding: 1rem;
}

.jedi-form input:not([type="radio"]):not([type="checkbox"]),
.jedi-form textarea,
.jedi-form select {
  width: 100%;
  padding: 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(102, 194, 255, 0.4);
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
}

.jedi-mcq-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.jedi-mcq-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid rgba(102, 194, 255, 0.35);
  border-radius: 10px;
  background: rgba(7, 15, 28, 0.55);
  padding: 0.7rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.jedi-mcq-option:hover {
  border-color: rgba(114, 216, 255, 0.75);
  background: rgba(12, 24, 43, 0.7);
  transform: translateY(-1px);
}

.jedi-mcq-option input[type="radio"] {
  width: auto;
  margin: 0;
  accent-color: #72d8ff;
  flex: 0 0 auto;
}

.jedi-mcq-option:has(input[type="radio"]:focus-visible) {
  outline: 2px solid rgba(114, 216, 255, 0.6);
  outline-offset: 2px;
}

.jedi-mcq-option:has(input[type="radio"]:checked) {
  border-color: rgba(157, 255, 205, 0.75);
  background: rgba(20, 46, 48, 0.65);
}

.jedi-mcq-text {
  line-height: 1.35;
}

.jedi-button,
button.submit,
input[type="submit"] {
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: linear-gradient(120deg, #ffd56b, #f3a833);
  color: #1a1200;
  font-weight: 700;
  cursor: pointer;
}

.jedi-button.jedi-button-outline {
  background: rgba(7, 15, 28, 0.6);
  color: #9dd8ff;
  border: 1px solid rgba(102, 194, 255, 0.45);
}

.jedi-button.jedi-button-outline:hover {
  border-color: rgba(114, 216, 255, 0.8);
  background: rgba(15, 28, 48, 0.72);
}

.jedi-journey {
  display: grid;
  gap: 1rem;
  position: relative;
  padding-left: 1rem;
}

.jedi-journey::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.25rem;
  bottom: 0.25rem;
  width: 2px;
  background: linear-gradient(180deg, rgba(114, 216, 255, 0.65), rgba(255, 213, 107, 0.3));
}

.jedi-lesson.is-locked {
  border-color: rgba(255, 128, 128, 0.35);
}

.jedi-lesson {
  position: relative;
}

.jedi-lesson::before {
  content: "";
  position: absolute;
  left: -1.25rem;
  top: 1.1rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #72d8ff;
  box-shadow: 0 0 0 3px rgba(114, 216, 255, 0.2);
}

.jedi-lesson.is-locked::before {
  background: #ff9a9a;
  box-shadow: 0 0 0 3px rgba(255, 154, 154, 0.22);
}

.jedi-journey.is-compact {
  gap: 0.6rem;
}

.jedi-journey.is-compact .section-title {
  margin: 0.8rem 0 0.45rem;
  font-size: 1.02rem;
}

.jedi-journey.is-compact .jedi-lesson {
  padding: 0.7rem;
}

.jedi-journey.is-compact .jedi-lesson h3 {
  margin: 0.2rem 0;
  font-size: 1.02rem;
}

.jedi-journey.is-compact .jedi-meta,
.jedi-journey.is-compact .jedi-alert,
.jedi-journey.is-compact .jedi-success,
.jedi-journey.is-compact .jedi-unlocked {
  font-size: 0.82rem;
  margin: 0.25rem 0 0;
}

.jedi-meta {
  opacity: 0.85;
  font-size: 0.9rem;
}

.jedi-alert {
  color: #ffc1c1;
}

.jedi-success {
  color: #9dffcd;
}

.jedi-unlocked {
  color: #9dd8ff;
}

.jedi-warning {
  color: #ffd27c;
}

.jedi-request-item,
.jedi-message-item {
  border-top: 1px solid rgba(102, 194, 255, 0.2);
  padding-top: 0.65rem;
  margin-top: 0.65rem;
}

.jedi-inline-form {
  margin-top: 0.6rem;
}

.jedi-inline-form p {
  margin: 0;
}

.jedi-profile-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.jedi-profile-links a {
  display: inline-block;
  border: 1px solid rgba(102, 194, 255, 0.45);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  text-decoration: none;
}

.jedi-forum-category-list,
.jedi-forum-topic-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.jedi-forum-subcategory-list {
  margin: 0.25rem 0 0;
  padding-left: 1.05rem;
}

.jedi-forum-subcategory-list li {
  margin: 0.15rem 0;
}

.jedi-forum-filter {
  margin-bottom: 0.75rem;
}

.jedi-forum-item {
  padding: 0.7rem 0.9rem;
}

.jedi-forum-item-sticky,
.jedi-forum-topic-view-sticky {
  border-color: rgba(255, 213, 107, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 213, 107, 0.15), 0 0 18px rgba(255, 213, 107, 0.14);
  background: linear-gradient(180deg, rgba(24, 20, 10, 0.72), rgba(10, 18, 32, 0.72));
}

.jedi-forum-pin {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(255, 213, 107, 0.65);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffe6a8;
  background: rgba(255, 213, 107, 0.13);
}

.jedi-forum-pin::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #ffd56b;
  box-shadow: 0 0 8px rgba(255, 213, 107, 0.7);
}

.jedi-forum-item h3,
.jedi-forum-item h4 {
  margin: 0 0 0.45rem;
}

.jedi-forum-item p {
  margin: 0.35rem 0;
}

.jedi-forum-excerpt {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jedi-forum-new-topic-toggle {
  margin-top: 0.9rem;
}

.jedi-forum-new-topic-form {
  margin-top: 0.65rem;
}

.jedi-forum-topic-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.jedi-forum-topic-actions .jedi-inline-form {
  margin: 0;
}

.jedi-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.55rem;
  height: 2.55rem;
  padding: 0;
  border-radius: 999px;
  line-height: 1;
}

.jedi-icon-button i {
  font-size: 1.02rem;
}

.jedi-icon-button[data-tooltip] {
  position: relative;
}

.jedi-icon-button[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  transform: translateX(-50%) translateY(4px);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(102, 194, 255, 0.35);
  background: rgba(6, 14, 27, 0.96);
  color: #dcecff;
  font-size: 0.72rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.jedi-icon-button[data-tooltip]:hover::after,
.jedi-icon-button[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.jedi-icon-button.jedi-toggle-on {
  border-color: rgba(157, 255, 205, 0.75);
  color: #9dffcd;
  background: rgba(23, 58, 45, 0.6);
}

.jedi-icon-button.jedi-toggle-on:hover {
  border-color: rgba(157, 255, 205, 0.95);
  background: rgba(28, 76, 56, 0.7);
}

.jedi-icon-button.jedi-toggle-off {
  border-color: rgba(255, 203, 128, 0.7);
  color: #ffd27c;
  background: rgba(64, 42, 18, 0.52);
}

.jedi-icon-button.jedi-toggle-off:hover {
  border-color: rgba(255, 203, 128, 0.95);
  background: rgba(86, 57, 23, 0.65);
}

.jedi-icon-button-danger {
  border-color: rgba(255, 122, 122, 0.55);
  color: #ffc7c7;
}

.jedi-icon-button-danger:hover {
  border-color: rgba(255, 122, 122, 0.85);
  background: rgba(70, 20, 20, 0.55);
}

.jedi-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 2000;
}

.jedi-modal.is-open {
  display: block;
}

.jedi-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 18, 0.76);
  backdrop-filter: blur(2px);
}

.jedi-modal__dialog {
  position: relative;
  z-index: 1;
  max-width: 440px;
  margin: 15vh auto 0;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(102, 194, 255, 0.35);
  background: rgba(6, 14, 27, 0.95);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

.jedi-modal__dialog h3 {
  margin: 0 0 0.55rem;
}

.jedi-modal__dialog p {
  margin: 0 0 0.9rem;
}

.jedi-forum-topic-view {
  padding-bottom: 0.85rem;
}

.jedi-replies-wrap {
  max-height: 420px;
  overflow: auto;
}

.jedi-replies-wrap .comment-body {
  border-top: 1px solid rgba(102, 194, 255, 0.2);
  padding-top: 0.55rem;
  margin-top: 0.55rem;
}

.jedi-replies-wrap .comment-body p {
  margin: 0.35rem 0;
}

.jedi-comment-form {
  margin-top: 0.75rem;
}

.jedi-comment-form .comment-reply-title {
  margin: 0 0 0.55rem;
}

.jedi-comment-form .logged-in-as,
.jedi-comment-form .comment-notes {
  margin: 0.25rem 0 0.55rem;
  color: rgba(226, 236, 255, 0.8);
}

.jedi-comment-form .comment-form-comment {
  margin: 0.35rem 0 0.7rem;
}

.jedi-comment-form label {
  display: block;
  margin-bottom: 0.3rem;
}

.jedi-comment-form textarea {
  width: 100%;
  min-height: 140px;
  border-radius: 10px;
  border: 1px solid rgba(102, 194, 255, 0.4);
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  padding: 0.65rem;
}

.jedi-comment-form .form-submit {
  margin: 0;
}

.jedi-profile-layout {
  display: grid;
  grid-template-columns: minmax(230px, 300px) 1fr;
  grid-template-areas:
    "hero hero"
    "stats stats"
    "sidebar main";
  gap: 1rem;
}

.jedi-profile-hero {
  grid-area: hero;
  border: 1px solid rgba(102, 194, 255, 0.2);
  border-radius: 10px;
  padding: 0.9rem;
  background: rgba(5, 12, 24, 0.35);
}

.jedi-profile-hero h2 {
  margin: 0;
}

.jedi-profile-stats {
  grid-area: stats;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.jedi-stat-card {
  border: 1px solid rgba(102, 194, 255, 0.2);
  border-radius: 10px;
  padding: 0.75rem;
  background: rgba(5, 12, 24, 0.35);
}

.jedi-stat-label {
  display: block;
  font-size: 0.84rem;
  opacity: 0.8;
}

.jedi-stat-value {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.jedi-profile-sidebar {
  grid-area: sidebar;
  border-right: 1px solid rgba(102, 194, 255, 0.22);
  padding-right: 1rem;
}

.jedi-profile-sidebar p {
  margin: 0.8rem 0;
}

.jedi-profile-main {
  grid-area: main;
  display: grid;
  gap: 1rem;
}

.jedi-profile-section {
  border: 1px solid rgba(102, 194, 255, 0.2);
  border-radius: 10px;
  padding: 0.85rem;
  background: rgba(5, 12, 24, 0.35);
}

.jedi-profile-section summary {
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 700;
  list-style: none;
}

.jedi-profile-section summary::-webkit-details-marker {
  display: none;
}

.jedi-profile-section[open] summary {
  margin-bottom: 0.75rem;
}

.jedi-profile-section ul {
  margin: 0;
  padding-left: 1.1rem;
}

.jedi-list-pagination {
  margin-top: 0.85rem;
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}

.jedi-list-pagination a,
.jedi-list-pagination span {
  display: inline-block;
  border: 1px solid rgba(102, 194, 255, 0.45);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  text-decoration: none;
}

@media (max-width: 860px) {
  .jedi-profile-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "stats"
      "sidebar"
      "main";
  }

  .jedi-profile-stats {
    grid-template-columns: 1fr;
  }

  .jedi-profile-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(102, 194, 255, 0.22);
    padding-right: 0;
    padding-bottom: 0.8rem;
  }
}
