.input-group {
  margin-bottom: 20px;
}

.input-section {
  padding: 20px;
  background: #2f3136;
  border-radius: 8px;
  border: 1px solid #202225;
}

.section-header {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #202225;
}

/* No Server Hint */
.no-server-hint {
  text-align: center;
  padding: 40px 20px;
  background: #36393f;
  border-radius: 8px;
  border: 2px dashed #4f545c;
  margin-bottom: 20px;
  display: block;
}

/* Hide hint when server is selected */
.server-selected .no-server-hint {
  display: none !important;
}

.hint-icon {
  color: #4f545c;
  margin-bottom: 16px;
}

.no-server-hint h3 {
  margin: 0 0 12px 0;
  color: #b9bbbe;
  font-size: 1.1rem;
  font-weight: 600;
}

.no-server-hint p {
  margin: 0;
  color: #8e9297;
  font-size: 0.9rem;
  line-height: 1.5;
}

.no-server-hint strong {
  color: #57f287;
  font-weight: 600;
}

/* Server Management */
.server-management {
  margin-bottom: 20px;
  display: none;
}

/* Icon Selection Section */
.icon-selection-section {
  display: none;
}


/* Show elements when server is selected */
.server-selected .server-management {
  display: block !important;
}

.server-selected .upload-section {
  display: block !important;
}

.server-selected .icon-selection-section {
  display: block !important;
}

.input-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #b9bbbe;
  font-size: 0.9rem;
}

.input-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #202225;
  border-radius: 4px;
  background: #40444b;
  color: #dcddde;
  font-size: 0.9rem;
  font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  transition: border-color 0.2s ease;
}

.input-group select:focus {
  outline: none;
  border-color: #5865f2;
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.3);
}

/* Upload Sections */
.upload-section {
  background: #36393f;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid #202225;
  display: none !important;
}

.upload-section h4 {
  margin: 0 0 12px 0;
  color: #b9bbbe;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Banner Upload Styles */
.banner-upload-container {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.banner-preview-small {
  width: 100%;
  max-width: 200px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #202225;
  background: #2f3136;
}

.banner-preview-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Icon Upload Styles */
.icon-upload-container {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.icon-preview-small {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #202225;
  background: #2f3136;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-preview-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Backup Modal */
.backup-modal {
  max-width: 500px;
}

.backup-section {
  margin-bottom: 20px;
}

.backup-section:last-child {
  margin-bottom: 0;
}

.backup-section h4 {
  margin: 0 0 10px 0;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.button-group .btn {
  width: 100%;
  margin: 0;
}

.backup-section .button-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.preview-content {
  min-height: 400px;
  padding: 15px;
  background: #36393f;
  border-radius: 6px;
  border: 1px solid #202225;
  font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.5;
  overflow-y: auto;
}

.preview-content .placeholder {
  color: #72767d;
  font-style: italic;
  text-align: center;
  margin-top: 150px;
}

.category {
  margin-bottom: 8px;
}

.category h2 {
  margin: 0;
  padding: 8px 12px 4px 12px;
  font-size: 0.75rem;
  color: #8e9297;
  display: flex;
  align-items: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category h2 span {
  flex: 1;
}

.category h2 button {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 2px;
  color: #8e9297;
  font-size: 0.7rem;
  cursor: pointer;
  margin-left: 8px;
  transition: all 0.2s ease;
  opacity: 0;
}

.category:hover .category h2 button {
  opacity: 1;
}

.category h2:hover button {
  opacity: 1;
}

.category h2 button:hover {
  background: #40444b;
  color: #ffffff;
}

.channel-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.channel-list li {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  margin: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  transition: all 0.2s ease;
  color: #b9bbbe;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.channel-list li.dragging {
  opacity: 0.5;
  background: #40444b;
  transform: rotate(2deg);
}

.channel-list li:hover {
  background: #40444b;
  color: #ffffff;
}

.channel-list li span {
  cursor: pointer;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-align: left;
  flex-shrink: 0;
}

.channel-list li span:hover {
  color: inherit;
}

.channel-list li button {
  background: transparent;
  border: none;
  color: #8e9297;
  font-size: 0.7rem;
  cursor: pointer;
  margin-left: auto;
  padding: 2px;
  border-radius: 2px;
  transition: all 0.2s ease;
  opacity: 0;
  flex-shrink: 0;
}

.channel-list li:hover button {
  opacity: 1;
}

.channel-list li button:hover {
  background: #f04747;
  color: #ffffff;
}

.add-channel {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding: 0 12px 8px 12px;
}

.add-channel input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #202225;
  background: #2f3136;
  color: #dcddde;
  font-size: 0.9rem;
  font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  transition: border-color 0.2s ease;
}

.add-channel input:focus {
  outline: none;
  border-color: #5865f2;
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.3);
}

.add-channel input::placeholder {
  color: #72767d;
}

.add-channel button {
  background: #5865f2;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.add-channel button:hover {
  background: #4752c4;
  transform: translateY(-1px);
}

/* Custom scrollbar */
.preview-content::-webkit-scrollbar {
  width: 8px;
}

.preview-content::-webkit-scrollbar-track {
  background: #2f3136;
  border-radius: 4px;
}

.preview-content::-webkit-scrollbar-thumb {
  background: #4f545c;
  border-radius: 4px;
  border: 1px solid #2f3136;
}

.preview-content::-webkit-scrollbar-thumb:hover {
  background: #5d6269;
}

.preview-content::-webkit-scrollbar-thumb:active {
  background: #6a6f77;
}

/* Firefox scrollbar */
.preview-content {
  scrollbar-width: thin;
  scrollbar-color: #4f545c #2f3136;
}

/* Banner Preview Container */
.banner-preview-container {
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 15px 0;
  gap: 0;
  min-height: 400px;
}

/* Discord Server List */
.discord-server-list {
  width: 72px;
  background: #202225;
  border-radius: 8px 0 0 8px;
  border: 1px solid #202225;
  border-right: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

.server-list-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
  height: 100%;
  justify-content: flex-start;
}

.server-item {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #36393f;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  margin: 0 12px;
}

.server-item:hover {
  background: #5865f2;
  border-radius: 16px;
}

.server-item.active {
  background: #5865f2;
  border-radius: 16px;
}

.server-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 8px;
  background: #ffffff;
  border-radius: 0 2px 2px 0;
}

.server-item.add-server {
  background: #36393f;
  color: #3ba55c;
}

.server-item.add-server:hover {
  background: #3ba55c;
  color: #ffffff;
}

.server-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dcddde;
}


.server-item.add-server .server-icon {
  color: inherit;
}

.server-separator {
  width: 32px;
  height: 2px;
  background: #36393f;
  border-radius: 1px;
  margin: 4px 0;
}

#serverListItems {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  align-items: center;
}

/* Discord Sidebar */
.discord-sidebar {
  width: 315px;
  background: #2f3136;
  border-radius: 0 8px 8px 0;
  border: 1px solid #202225;
  border-left: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

/* Server Header */
.server-header {
  position: relative;
}

.server-banner {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, #5865f2, #4752c4);
  position: relative;
  overflow: hidden;
}

.server-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(255, 255, 255, 0.7);
  gap: 8px;
}

.banner-placeholder svg {
  width: 32px;
  height: 32px;
}

.banner-placeholder span {
  font-size: 0.8rem;
  font-weight: 500;
}

/* Banner Overlay */
.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 16px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent);
  pointer-events: none;
  z-index: 2;
}

.server-name-container {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}

.server-icon-small {
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.server-icon-small svg {
  color: #5865f2;
  width: 12px;
  height: 12px;
}

.banner-overlay .server-name {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 28px);
}

/* Server Actions */
.server-actions {
  display: flex;
  flex-direction: column;
  padding: 8px;
  background: #2f3136;
  border-bottom: 1px solid #202225;
}

.action-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  color: #b9bbbe;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-item:hover {
  background: #40444b;
  color: #ffffff;
}

.action-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Sidebar Content */
.sidebar-content {
  background: #2f3136;
  min-height: 200px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Custom scrollbar for sidebar content */
.sidebar-content::-webkit-scrollbar {
  width: 8px;
}

.sidebar-content::-webkit-scrollbar-track {
  background: #2f3136;
  border-radius: 4px;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: #4f545c;
  border-radius: 4px;
  border: 1px solid #2f3136;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
  background: #5d6269;
}

.sidebar-content::-webkit-scrollbar-thumb:active {
  background: #6a6f77;
}

/* Firefox scrollbar for sidebar content */
.sidebar-content {
  scrollbar-width: thin;
  scrollbar-color: #4f545c #2f3136;
}

/* Modal System */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

/* Backup Modal - Lower z-index so other modals appear on top */
#backupModal {
  z-index: 999;
}

.modal-container {
  background: #2f3136;
  border-radius: 8px;
  border: 1px solid #202225;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  max-width: 400px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  animation: slideIn 0.3s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 0 20px;
  border-bottom: 1px solid #202225;
  margin-bottom: 20px;
}

.modal-header h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-close {
  background: transparent;
  border: none;
  color: #b9bbbe;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: #40444b;
  color: #ffffff;
}

.modal-body {
  padding: 0 20px 20px 20px;
}

.modal-body p {
  margin: 0 0 15px 0;
  color: #dcddde;
  line-height: 1.5;
}

.modal-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #202225;
  border-radius: 4px;
  background: #40444b;
  color: #dcddde;
  font-size: 0.9rem;
  font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  transition: border-color 0.2s ease;
  margin-top: 10px;
}

.modal-input:focus {
  outline: none;
  border-color: #5865f2;
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.3);
}

.modal-input::placeholder {
  color: #72767d;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  background: #36393f;
  border-top: 1px solid #202225;
}

.modal-footer .btn {
  margin: 0;
  min-width: 80px;
}

/* Modal Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .editor-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .container {
    padding: 15px;
  }

  .header-controls {
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
  }

  .copy-button {
    align-self: flex-end;
    font-size: 0.8rem;
    padding: 5px 10px;
  }

  .clear-button {
    align-self: flex-end;
    font-size: 0.8rem;
    padding: 5px 10px;
  }

  .button-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    margin-right: 0;
    margin-bottom: 8px;
  }

  .modal-container {
    width: 95%;
    margin: 20px;
  }

  .modal-footer {
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
  }
}

/* Icon Selection Section */
.icon-selection-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #202225;
}


.icon-categories {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.icon-category {
  background: #36393f;
  border-radius: 6px;
  padding: 12px;
  border: 1px solid #202225;
}

.icon-category h4 {
  margin: 0 0 10px 0;
  color: #b9bbbe;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(10, 35px);
  gap: 6px;
  max-width: 100%;
  justify-content: start;
}

.icon-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  background: #40444b;
  border: 1px solid #202225;
  border-radius: 4px;
  color: #dcddde;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  font-family: 'Inter', 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.icon-item:hover {
  background: #5865f2;
  border-color: #4752c4;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.3);
}

.icon-item:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(88, 101, 242, 0.3);
}

.icon-item.copied {
  background: #57f287;
  border-color: #43d67a;
  color: #2c2f33;
  animation: iconCopied 0.6s ease;
}

@keyframes iconCopied {
  0% {
    transform: scale(1);
    background: #57f287;
  }

  50% {
    transform: scale(1.1);
    background: #43d67a;
  }

  100% {
    transform: scale(1);
    background: #57f287;
  }
}

/* Layout Management Styles */
.layout-management {
    margin-top: 15px;
    border-top: 1px solid #202225;
    padding-top: 15px;
    background: #2f3136;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.layout-management h3 {
    color: #ffffff;
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.save-layout-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.save-layout-section input {
    flex: 1;
    padding: 10px;
    border: 1px solid #202225;
    border-radius: 4px;
    background: #40444b;
    color: #dcddde;
    font-size: 0.9rem;
    font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    transition: border-color 0.2s ease;
}

.save-layout-section input:focus {
    border-color: #5865f2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.3);
}

.save-button {
    padding: 10px 16px;
    background: #43b581;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.85rem;
}

.save-button:hover {
    background: #3ca374;
    transform: translateY(-1px);
}

.save-button:active {
    background: #2d7d46;
    transform: translateY(0);
}

.saved-layouts-section {
    margin-top: 20px;
}

.search-container {
    margin-bottom: 15px;
}

.search-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #202225;
    border-radius: 4px;
    background: #40444b;
    color: #dcddde;
    font-size: 0.9rem;
    font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.search-input:focus {
    border-color: #5865f2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.3);
}

.saved-layouts-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #202225;
    border-radius: 4px;
    background: #36393f;
}

.saved-layouts-list::-webkit-scrollbar {
    width: 8px;
}

.saved-layouts-list::-webkit-scrollbar-track {
    background: #2f3136;
    border-radius: 4px;
}

.saved-layouts-list::-webkit-scrollbar-thumb {
    background: #4f545c;
    border-radius: 4px;
    border: 1px solid #2f3136;
}

.saved-layouts-list::-webkit-scrollbar-thumb:hover {
    background: #5865f2;
}

.layout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #202225;
    transition: background-color 0.2s ease;
}

.layout-item:last-child {
    border-bottom: none;
}

.layout-item:hover {
    background-color: #40444b;
}

.layout-item-info {
    flex: 1;
}

.layout-item-name {
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 4px;
}

.layout-item-meta {
    color: #8e9297;
    font-size: 0.8rem;
}

.layout-item-actions {
    display: flex;
    gap: 8px;
}

.layout-action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 3px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.load-btn {
    background: #5865f2;
    color: white;
}

.load-btn:hover {
    background: #4752c4;
}

.delete-btn {
    background: #ed4245;
    color: white;
}

.delete-btn:hover {
    background: #c03537;
}

.cloud-indicator {
    color: #5865f2;
    margin-left: 8px;
    font-size: 0.8rem;
}

.local-indicator {
    color: #43b581;
    margin-left: 8px;
    font-size: 0.8rem;
}