.servers-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  grid-auto-rows: 500px;
}

@media (max-width: 1200px) {
  .servers-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .servers-list {
    grid-template-columns: 1fr;
  }
}

.server-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(18, 18, 18, 0.85);
  border-radius: 16px;
  overflow: visible;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  height: 500px;
  width: 100%;
  max-width: 100%;
  grid-column: span 1;
}

.server-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(180deg, var(--card-accent, rgba(29, 184, 87, 0.15)) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.server-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--card-accent-border, rgba(29, 184, 87, 0.3));
  border-color: var(--card-accent-border, rgba(29, 184, 87, 0.4));
}

.server-card:hover::before {
  opacity: 1;
}

.server-card-premium {
  border-color: var(--card-accent);
}

.server-card-premium::before {
  background: linear-gradient(180deg, rgba(241, 196, 15, 0.2) 0%, transparent 40%);
}

.server-card-premium:hover {
  border-color: var(--card-accent-border)
}

.server-card-banner {
  position: relative;
  width: 100%;
  height: 120px;
  background: linear-gradient(135deg, var(--card-accent, rgba(29, 184, 87, 0.3)) 0%, rgba(0, 0, 0, 0.4) 100%);
  overflow: visible;
  z-index: 1;
  border-radius: 16px 16px 0 0;
  flex-shrink: 0;
}

.server-card-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px 16px 0 0;
  overflow: visible;
  z-index: -1;
}

.server-card-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px 16px 0 0;
}

.server-card-banner-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, rgba(18, 18, 18, 1) 0%, transparent 100%);
}

.server-card-icon {
  position: absolute;
  bottom: -40px;
  left: 20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 4px solid rgba(18, 18, 18, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 2;
  padding: 0;
}

.server-card-icon img.server-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.server-card-placeholder {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--card-accent-text, #1db857);
}

.server-card-badges {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  z-index: 3;
}

.server-badge-plus {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
  color: #000;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(241, 196, 15, 0.4);
}

.server-badge-trending {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
}

.server-card-content {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 50px 20px 20px 20px;
  z-index: 1;
  background: transparent;
  margin-top: 0;
}

.server-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 12px;
}

.server-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.server-card-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.server-stat {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  font-weight: 500;
}

.server-stat svg {
  color: var(--card-accent-text, #1db857);
  flex-shrink: 0;
  opacity: 0.8;
}

.server-card-description-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 16px;
}

.server-card-description {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  word-break: break-word;
  overflow-wrap: break-word;
  max-height: 4.8em;
  text-overflow: ellipsis;
}

.server-card-description h1,
.server-card-description h2,
.server-card-description h3 {
  color: #ffffff;
  margin: 8px 0 4px 0;
}

.server-card-description h1 { font-size: 1.1rem; }
.server-card-description h2 { font-size: 1rem; }
.server-card-description h3 { font-size: 0.95rem; }

.server-card-description strong {
  color: #ffffff;
  font-weight: 600;
}

.server-card-description em {
  font-style: italic;
}

.server-card-description u {
  text-decoration: underline;
}

.server-card-description del {
  text-decoration: line-through;
  opacity: 0.7;
}

.server-card-description code.inline-code {
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.85em;
  color: #e9e9e9;
}

.server-card-description pre.code-block {
  background: rgba(0, 0, 0, 0.5);
  padding: 12px;
  border-radius: 8px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.85em;
  overflow-x: auto;
  margin: 8px 0;
  border-left: 3px solid var(--card-accent-text, #1db857);
}

.server-card-description .spoiler {
  background: rgba(255, 255, 255, 0.1);
  color: transparent;
  padding: 0 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.server-card-description .spoiler:hover,
.server-card-description .spoiler.revealed {
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

.read-more-btn {
  background: none;
  border: none;
  color: var(--card-accent-text, #1db857);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  text-decoration: none;
  font-weight: 600;
  align-self: flex-start;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.read-more-btn:hover {
  opacity: 0.8;
}

.read-more-btn::after {
  content: '→';
  transition: transform 0.2s ease;
}

.read-more-btn:hover::after {
  transform: translateX(3px);
}

.server-card-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.server-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.server-tag {
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  line-height: 1;
  font-weight: 500;
  transition: all 0.2s ease;
}

.server-tag:hover {
  background: rgba(255, 255, 255, 0.12);
}

.server-tag-custom {
  background: rgba(var(--tag-color-rgb, 29, 184, 87), 0.15);
  border: 1px solid;
}

.server-card-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn-join-discord {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
  color: #fff;
}

.btn-join-discord:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(88, 101, 242, 0.4);
}

.btn-view-more {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
}

.btn-view-more:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.select {
  width: fit-content;
  cursor: pointer;
  position: relative;
  transition: 300ms;
  color: white;
  overflow: visible;
  z-index: 1000;
}

.selected {
  background-color: rgba(42, 42, 42, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 32px;
  margin-bottom: 3px;
  border-radius: 12px;
  position: relative;
  z-index: 100000;
  font-size: 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 240px;
  transition: all 0.3s ease;
}

.selected:hover {
  background: rgba(42, 42, 42, 0.8);
  border-color: rgba(29, 184, 87, 0.3);
}

.arrow {
  position: relative;
  right: 0px;
  height: 10px;
  transform: rotate(-90deg);
  width: 25px;
  fill: white;
  z-index: 100000;
  transition: 300ms;
}

.options {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  padding: 8px;
  background-color: rgba(42, 42, 42, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: absolute;
  top: 100%;
  left: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms, transform 300ms;
  transform: translateY(-10px);
  min-width: 240px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.select.active .options {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.select.active .selected .arrow {
  transform: rotate(0deg);
}

.option {
  border-radius: 8px;
  padding: 12px 16px;
  transition: 300ms;
  background-color: transparent;
  width: 100%;
  font-size: 1rem;
  cursor: pointer;
}

.option:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.options input[type="radio"] {
  display: none;
}

.options label {
  display: inline-block;
  cursor: pointer;
}

.options label::before {
  content: attr(data-txt);
}

.options input[type="radio"]:checked + label {
  display: none;
}

.options input[type="radio"]#all:checked + label {
  display: none;
}

.select:has(.options input[type="radio"]#all:checked) .selected::before {
  content: attr(data-default);
}
.select:has(.options input[type="radio"]#option-1:checked) .selected::before {
  content: attr(data-one);
}
.select:has(.options input[type="radio"]#option-2:checked) .selected::before {
  content: attr(data-two);
}
.select:has(.options input[type="radio"]#option-3:checked) .selected::before {
  content: attr(data-three);
}

.servers-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem 0;
}

.pagination-btn {
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(29, 184, 87, 0.2);
  border-color: rgba(29, 184, 87, 0.4);
}

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

.pagination-info {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.servers-loading,
.servers-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
}

.servers-error {
  color: #e74c3c;
}

.popular-tags {
  margin-top: 1.5rem;
}

.popular-tags-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin-right: 0.75rem;
}

.popular-tags-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.popular-tag {
  padding: 0.4rem 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.popular-tag:hover {
  background: rgba(29, 184, 87, 0.15);
  border-color: rgba(29, 184, 87, 0.3);
}

.popular-tag.active {
  background: rgba(29, 184, 87, 0.25);
  border-color: rgba(29, 184, 87, 0.5);
  color: #1db857;
}

.server-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 2rem;
}

.server-modal-card {
  position: relative;
  background: #1a1a1a;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.server-modal-accent {
  height: 100px;
  width: 100%;
}

.server-modal-main {
  padding: 0 24px 24px 24px;
  overflow-y: auto;
  max-height: calc(90vh - 100px);
}

.server-modal-header {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-top: -40px;
  margin-bottom: 20px;
}

.server-modal-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: #2a2a2a;
  border: 4px solid #1a1a1a;
  flex-shrink: 0;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.server-modal-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.server-modal-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #1db857;
}

.server-modal-header-text {
  flex: 1;
  padding-bottom: 8px;
}

.server-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.server-join-btn {
  padding: 10px 20px;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.server-modal-stats {
  display: flex;
  gap: 24px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.server-modal-description-wrapper h3 {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.server-description-formatted {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  font-size: 0.95rem;
}

.server-description-formatted h1,
.server-description-formatted h2,
.server-description-formatted h3 {
  color: #ffffff;
  margin: 12px 0 8px 0;
}

.server-description-formatted h1 { font-size: 1.3rem; }
.server-description-formatted h2 { font-size: 1.15rem; }
.server-description-formatted h3 { font-size: 1.05rem; }

.server-description-formatted code.inline-code {
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9em;
}

.server-description-formatted pre.code-block {
  background: rgba(0, 0, 0, 0.5);
  padding: 16px;
  border-radius: 8px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9em;
  overflow-x: auto;
  margin: 12px 0;
  border-left: 3px solid #1db857;
}

.server-description-formatted .spoiler {
  background: rgba(255, 255, 255, 0.1);
  color: transparent;
  padding: 0 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.server-description-formatted .spoiler:hover {
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

.server-modal-footer {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.server-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.server-tag-premium {
  background: linear-gradient(135deg, rgba(241, 196, 15, 0.2) 0%, rgba(243, 156, 18, 0.2) 100%);
  border-color: rgba(241, 196, 15, 0.4);
  color: #f1c40f;
}

.server-tag-trending {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.2) 0%, rgba(192, 57, 43, 0.2) 100%);
  border-color: rgba(231, 76, 60, 0.4);
  color: #e74c3c;
}

.server-tag-bump {
  background: rgba(88, 101, 242, 0.15);
  border-color: rgba(88, 101, 242, 0.3);
  color: #5865f2;
}

.server-modal-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
}

.server-meta-id {
  font-family: 'Consolas', 'Monaco', monospace;
}

.description-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.3s ease, backdrop-filter 0.3s ease;
}

.description-popup-overlay.active {
  opacity: 1;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
}

.description-popup {
  position: relative;
  background: linear-gradient(180deg, #1e1e1e 0%, #141414 100%);
  border-radius: 20px;
  max-width: 750px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: scale(0.85) translateY(30px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  overflow: hidden;
}

.description-popup-overlay.active .description-popup {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.description-popup-header {
  position: relative;
  padding: 0;
  flex-shrink: 0;
}

.description-popup-accent {
  height: 100px;
  width: 100%;
  position: relative;
}

.description-popup-accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  filter: brightness(1.2) saturate(1.3);
}

.description-popup-accent::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, #1e1e1e 0%, transparent 100%);
}

.description-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.description-popup-close:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg) scale(1.1);
}

.description-popup-server-info {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  margin-top: -40px;
  position: relative;
  z-index: 2;
}

.description-popup-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  border: 4px solid #1e1e1e;
  flex-shrink: 0;
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.description-popup-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.description-popup-icon-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
}

.description-popup-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  flex: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.description-popup-content {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
  min-height: 150px;
  max-height: calc(90vh - 280px);
}

.description-popup-content::-webkit-scrollbar {
  width: 8px;
}

.description-popup-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.description-popup-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.description-popup-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
  background-clip: padding-box;
}

.description-popup-text {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.85;
  font-size: 1rem;
}

.description-popup-text h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin: 20px 0 10px 0;
}

.description-popup-text h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  margin: 16px 0 8px 0;
}

.description-popup-text h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin: 14px 0 6px 0;
}

.description-popup-text strong {
  color: #ffffff;
  font-weight: 600;
}

.description-popup-text em {
  font-style: italic;
}

.description-popup-text u {
  text-decoration: underline;
}

.description-popup-text del {
  text-decoration: line-through;
  opacity: 0.6;
}

.description-popup-text code.inline-code {
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9em;
  color: #e9e9e9;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.description-popup-text pre.code-block {
  background: rgba(0, 0, 0, 0.5);
  padding: 18px;
  border-radius: 10px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9em;
  overflow-x: auto;
  margin: 14px 0;
  border-left: 4px solid var(--popup-accent, #1db857);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--popup-accent, #1db857);
}

.description-popup-text .spoiler {
  background: rgba(255, 255, 255, 0.15);
  color: transparent;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.description-popup-text .spoiler:hover,
.description-popup-text .spoiler.revealed {
  background: rgba(255, 255, 255, 0.25);
  color: inherit;
}

.description-popup-text blockquote {
  border-left: 4px solid var(--popup-accent, #1db857);
  padding: 8px 16px;
  margin: 14px 0;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 8px 8px 0;
}

.description-popup-text a {
  color: var(--popup-accent, #1db857);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.description-popup-text a:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.description-popup-text li {
  margin: 6px 0 6px 24px;
}

.description-popup-text .discord-emoji {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin: 0 3px;
}

.description-popup-footer {
  padding: 20px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.2);
}

.description-popup-btn {
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.description-popup-btn-primary {
  background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.description-popup-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(88, 101, 242, 0.45);
  text-decoration: none;
}

.description-popup-btn-primary:active {
  transform: translateY(-1px);
}

.description-popup-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.description-popup-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
  .description-popup {
    max-width: 100%;
    width: 100%;
    max-height: 95vh;
    border-radius: 16px 16px 0 0;
    margin-top: auto;
  }
  
  .description-popup-overlay {
    padding: 0;
    align-items: flex-end;
  }
  
  .description-popup-server-info {
    padding: 0 20px;
  }
  
  .description-popup-content {
    padding: 20px;
  }
  
  .description-popup-footer {
    padding: 16px 20px;
    flex-direction: column;
  }
  
  .description-popup-btn {
    width: 100%;
  }
}
