/* Server Detail Page - Dark Theme Styles */

.server-banner {
    height: 300px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    border-radius: 16px 16px 0 0;
}

/* When there's no banner image, show a minimal header */
.server-banner.no-banner {
    height: 200px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
}

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

.server-header {
    position: relative;
    z-index: 10;
    padding: 0 0 2rem 0;
    border-radius: 0 0 16px 16px;
    margin-bottom: 2rem;
    border-top: none;
}

/* Profile section that overlaps the banner - Twitter style */
.profile-section {
    padding: 1rem 2rem 0 2rem;
    margin-top: -80px;
    position: relative;
    z-index: 20;
}

/* Adjust header positioning when there's no banner */
.container .server-header:first-child {
    margin-top: 1rem;
    padding: 2rem 0;
    border-radius: 16px;
    border: 1px solid rgba(125, 25, 255, 0.1);
}

.container .server-header:first-child .profile-section {
    margin-top: 0;
    padding: 2rem 2rem 0 2rem;
}

/* Ensure breadcrumb is visible above the header */

.server-icon {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin-right: 2rem;
    border: 6px solid #1a1b1e;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    background-color: #2c2c2c;
    flex-shrink: 0;
    position: relative;
}

.server-name {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: #ffffff;
    line-height: 1.2;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Dynamic font sizing for long server names */
.server-name[data-length="medium"] {
    font-size: 2.2rem;
}

.server-name[data-length="long"] {
    font-size: 1.8rem;
}

.server-name[data-length="very-long"] {
    font-size: 1.5rem;
}

/* Server header content layout */
.server-header .header-content {
    padding: 1rem 2rem 0 2rem;
}

.server-header .profile-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.server-header .server-info {
    display: flex;
    align-items: flex-start;
    flex: 1;
}

.server-header .server-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 2rem;
    margin-bottom: 2rem;
}

/* Better spacing for server info section */
.server-details {
    margin-left: 0;
}

.server-header .social-links {
    margin-top: 1rem;
}

.verification-checkmark {
    color: #7d19ff;
    font-size: 0.6em;
    margin-left: 0.3rem;
    display: inline;
    cursor: pointer;
    transition: all 0.2s ease;
    vertical-align: baseline;
    position: relative;
    top: -0.1em;
}

.verification-checkmark:hover {
    color: #9146FF;
    transform: scale(1.1);
}

.verification-checkmark i {
    margin: 0;
    font-size: inherit;
    color: #7d19ff;
    filter: drop-shadow(0 1px 2px rgba(125, 25, 255, 0.3));
}

.verification-checkmark.unverified {
    color: #6c757d;
}

.verification-checkmark.unverified:hover {
    color: #8a9ba8;
    transform: scale(1.1);
}

.verification-checkmark.unverified i {
    color: #6c757d;
    filter: drop-shadow(0 1px 2px rgba(108, 117, 125, 0.3));
}

/* Legacy verification badge styles (keep for other uses) */
.verification-badge {
    background: linear-gradient(135deg, #F4CA81, #f5d491);
    color: #2c3e50;
    border-radius: 50%;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(244, 202, 129, 0.4);
    width: 32px;
    height: 32px;
    transition: all 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.verification-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(244, 202, 129, 0.6);
}

.verification-badge.unverified {
    background: #6c757d;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.verification-badge.unverified:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(108, 117, 125, 0.5);
}

.verification-badge i {
    margin: 0;
    font-size: 1rem;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-links a {
    color: #bdc3c7;
    font-size: 1.4rem;
    padding: 0.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    text-decoration: none;
}

.social-links a:hover {
    color: #7d19ff;
    background: rgba(125, 25, 255, 0.1);
    transform: translateY(-2px);
}

.analytics-card {
    background: #1a1b1e !important;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(125, 25, 255, 0.2);
    position: relative;
    z-index: 1;
}

.analytics-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(125, 25, 255, 0.4), rgba(244, 202, 129, 0.4));
    border-radius: 12px 12px 0 0;
}

.analytics-card h3,
.analytics-card h5 {
    color: #ffffff;
}

.analytics-stat {
    text-align: center;
    padding: 1rem;
}

.analytics-stat .number {
    font-size: 2rem;
    font-weight: 700;
    color: #7d19ff;
    display: block;
}

.analytics-stat .label {
    color: #bdc3c7;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.server-description {
    background: #1a1b1e !important;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(125, 25, 255, 0.2);
    position: relative;
}

.server-description::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(244, 202, 129, 0.4), rgba(125, 25, 255, 0.4));
    border-radius: 12px 12px 0 0;
}

.server-description h3,
.server-description h5 {
    color: #ffffff;
}

.description-content {
    line-height: 1.6;
    color: #e0e0e0;
}

.description-content p {
    color: #e0e0e0;
}

.description-content .text-muted {
    color: #95a5a6 !important;
}

.edit-description-btn,
.edit-categories-btn {
    background: none !important;
    border: none !important;
    color: #bdc3c7 !important;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.25rem !important;
    transition: all 0.2s ease;
    text-decoration: none !important;
    opacity: 0.7;
}

.edit-description-btn:hover,
.edit-categories-btn:hover {
    color: #7d19ff !important;
    opacity: 1;
    transform: scale(1.1);
}

.edit-description-btn:focus,
.edit-categories-btn:focus {
    box-shadow: none !important;
    outline: none !important;
}

.server-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Visual hierarchy spacing */
.server-tags:has(.primary-category) {
    margin-bottom: 1rem;
}

.server-tags:has(.secondary-category) {
    margin-bottom: 0.75rem;
}

.server-tag {
    background: #404040;
    color: #e0e0e0;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #555555;
}

.server-tag.primary-category {
    background: linear-gradient(135deg, #7d19ff, #9146FF);
    color: #ffffff;
    border: 1px solid #7d19ff;
    box-shadow: 0 2px 8px rgba(125, 25, 255, 0.3);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.375rem 1rem;
}

.server-tag.secondary-category {
    background: linear-gradient(135deg, rgba(125, 25, 255, 0.3), rgba(145, 70, 255, 0.3));
    color: #e0e0e0;
    border: 1px solid rgba(125, 25, 255, 0.5);
    box-shadow: 0 2px 6px rgba(125, 25, 255, 0.15);
    font-weight: 500;
}

.server-tag.special-tag {
    background: linear-gradient(135deg, #F4CA81, #f5d491);
    color: #2c3e50;
    border: 1px solid #F4CA81;
    box-shadow: 0 2px 8px rgba(244, 202, 129, 0.3);
    font-weight: 600;
}



/* Action buttons in header */
.server-header .server-actions .btn {
    padding: 0.5rem 1rem;
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.server-header .server-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #7d19ff, #9146FF);
    border-color: #7d19ff;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(125, 25, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6a15e6, #7d19ff);
    border-color: #6a15e6;
    box-shadow: 0 6px 20px rgba(125, 25, 255, 0.4);
}

.btn-outline-danger {
    color: #e74c3c;
    border-color: #e74c3c;
    background-color: transparent;
}

.btn-outline-danger:hover,
.btn-danger {
    background-color: #e74c3c;
    border-color: #e74c3c;
    color: #ffffff;
}

.btn-outline-success {
    color: #27ae60;
    border-color: #27ae60;
    background-color: transparent;
}

.btn-outline-success:hover,
.btn-success {
    background-color: #27ae60;
    border-color: #27ae60;
    color: #ffffff;
}

.powered-by-badge {
    background: linear-gradient(135deg, #1a1b1e 0%, #2a2d3a 100%) !important;
    border: 2px solid rgba(125, 25, 255, 0.2);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #bdc3c7;
    text-align: center;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.powered-by-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(125, 25, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.powered-by-badge:hover::before {
    left: 100%;
}

.powered-by-badge:hover {
    border-color: rgba(125, 25, 255, 0.4);
    box-shadow: 0 4px 15px rgba(125, 25, 255, 0.2);
    transform: translateY(-2px);
}

.powered-by-link {
    color: #e0e0e0;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.powered-by-link:hover {
    color: #7d19ff;
    text-decoration: none;
}

.powered-by-link i {
    color: inherit;
}

.powered-by-link .external-link-icon {
    font-size: 0.75rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.powered-by-link:hover .external-link-icon {
    opacity: 1;
    transform: translateX(2px) translateY(-2px);
}

/* Breadcrumb styles */
.breadcrumb {
    background: transparent !important;
    padding: 0.5rem 0 !important;
    margin-bottom: 1rem !important;
    border: none !important;
}

.breadcrumb-item a {
    color: #bdc3c7;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #7d19ff;
}

.breadcrumb-item.active {
    color: #e0e0e0;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #7f8c8d;
}

.edit-form {
    display: none;
}

.edit-form textarea {
    min-height: 120px;
    background-color: #404040;
    border: 1px solid #555555;
    color: #ffffff;
    border-radius: 8px;
}

.edit-form textarea:focus {
    background-color: #4a4a4a;
    border-color: #3498db;
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.edit-form .form-text {
    color: #95a5a6;
}

.edit-form .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #ffffff;
}

.edit-form .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* Alert styles for dark theme */
.alert-success {
    background-color: #155724;
    border-color: #c3e6cb;
    color: #d4edda;
}

.alert-dismissible .btn-close {
    filter: invert(1);
}

/* Icon colors */
.text-primary {
    color: #7d19ff !important;
}

.fas, .fab {
    color: inherit;
}

/* Hide dashboard search bar for server detail page */
#topNavbarSearch {
    display: none !important;
}

/* Container styling for server detail page */
.container {
    background-color: #1a1b1e;
    max-width: 1200px;
}

/* Better handling for long server names */
@media (max-width: 1200px) {
    .server-name {
        font-size: 2.4rem;
    }
}

/* Override global 1024px responsive styles for server detail */
@media (max-width: 1024px) {
    .server-header .server-actions {
        flex-direction: row !important;
        width: auto !important;
        justify-content: flex-end;
        gap: 0.75rem;
        margin-left: 2rem;
    }
    
    .server-header .server-actions .btn {
        width: auto !important;
        flex: none !important;
    }
}

@media (max-width: 992px) {
    .server-name {
        font-size: 2.2rem;
    }
    
    .server-banner {
        height: 280px;
    }
    
    .server-banner.no-banner {
        height: 180px;
    }
    
    .profile-section {
        margin-top: -75px;
    }
    
    /* Adjust button spacing for medium screens */
    .server-header .server-actions {
        margin-left: 1rem;
        gap: 0.5rem;
    }
    
    .server-header .server-actions .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .server-name {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .server-icon {
        width: 120px;
        height: 120px;
        margin-right: 1.5rem;
        border-width: 4px;
    }
    
    .profile-section {
        padding: 1rem 1rem 0 1rem;
        margin-top: -70px;
    }
    
    .server-banner {
        height: 250px;
    }
    
    .server-banner.no-banner {
        height: 160px;
    }
    
    .server-header .header-content {
        padding: 1rem 1rem 0 1rem;
    }
    
    .server-header .profile-info {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }
    
    .server-header .server-info {
        flex-direction: column;
        text-align: left;
        margin-bottom: 0;
        flex: 1;
    }
    
    .server-header .server-actions {
        justify-content: flex-end;
        margin-left: 1rem;
        flex-wrap: wrap;
        align-self: flex-start;
    }
    
    .server-header .server-actions .btn {
        flex: none;
        min-width: 80px;
        font-size: 0.75rem;
        padding: 0.35rem 0.7rem;
        white-space: nowrap;
    }
    
    .breadcrumb {
        padding: 0.4rem 0 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .verification-checkmark {
        font-size: 0.5em;
    }
    
    .social-links a {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
    
    .container .server-header:first-child .profile-section {
        margin-top: 0;
        padding: 1.5rem 1rem 0 1rem;
    }
}

/* Compact mobile layout for small phones */
@media (max-width: 425px) {
    .server-banner {
        height: 200px;
    }
    
    .server-banner.no-banner {
        height: 130px;
    }

    .profile-section {
        margin-top: -60px;
        padding: 0.75rem 0.75rem 0 0.75rem;
    }

    /* Icon smaller and positioned better */
    .server-icon {
        width: 86px;
        height: 86px;
        margin-right: 0.75rem;
        border-width: 3px;
    }

    .server-name {
        font-size: 1.4rem;
        margin-bottom: 0.25rem;
        line-height: 1.1;
        margin-left: 0.8rem;
    }

    /* Compact mobile layout */
    .server-header .profile-info {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        margin-bottom: 0.75rem;
    }
    
    .server-header .server-info {
        flex-direction: column;
        text-align: left;
        margin-bottom: 0;
        flex: 1;
    }

    .server-header .server-actions {
        justify-content: flex-start;
        gap: 0rem;
        margin-left: 1rem;
        flex-direction: column !important;
        align-self: flex-start;
        width: auto;
        margin-bottom: 0rem;
    }

    .server-header .server-actions .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        width: 80px;
        height: 36px;
        border-radius: 6px;
        white-space: nowrap;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .social-links a {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .verification-checkmark {
        font-size: 0.45em;
    }
    
    /* Adjust header content padding */
    .server-header .header-content {
        padding: 0.75rem 0.75rem 0 0.75rem;
    }
    
    .container .server-header:first-child .profile-section {
        margin-top: 0;
        padding: 1rem 0.75rem 0 0.75rem;
    }
}

/* Additional dark theme overrides */
body {
    background-color: #1a1b1e !important;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

html {
    overflow: auto;
    height: auto;
}

/* Force dark theme for all sections */
* {
    color: inherit;
}

.row {
    background-color: transparent;
}

.col, .col-lg-8, .col-lg-4, .col-md-3, .col-6 {
    background-color: transparent;
}

/* Ensure main content area has proper styling */
main {
    background-color: #1a1b1e !important;
    min-height: 100vh;
}

/* Override any Bootstrap or base template backgrounds */
.main-content {
    background-color: #1a1b1e !important;
}

/* Override any base template row/col spacing for server detail */
.row.h-100.g-0 {
    background-color: #1a1b1e !important;
}

.col {
    background-color: #1a1b1e !important;
}

/* Fix any potential spacing issues */
.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

/* Ensure no unwanted margins on the main container */
.container-fluid.p-0 {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
}

p {
    color: #e0e0e0;
}

/* Form controls dark theme */
.form-control {
    background-color: #404040;
    border: 1px solid #555555;
    color: #ffffff;
}

.form-control:focus {
    background-color: #4a4a4a;
    border-color: #3498db;
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Collab button states */
.collab-btn.liked,
.collab-btn.scheduled,
.collab-btn.ongoing {
    opacity: 0.7;
    cursor: not-allowed;
}

.collab-btn.confirm {
    background-color: #e74c3c;
    border-color: #e74c3c;
    color: #ffffff;
}

.collab-btn.confirm:hover {
    background-color: #c0392b;
    border-color: #c0392b;
}

.collab-btn.recollab {
    background-color: #f39c12;
    border-color: #f39c12;
    color: #ffffff;
}

.collab-btn.recollab:hover {
    background-color: #e67e22;
    border-color: #e67e22;
}

/* These conflicting light theme styles have been removed to prevent override of dark theme */

/* Modal form styling */
.modal .form-control {
    background-color: #2a2d3a;
    border: 1px solid #4b5563;
    color: #e5e7eb;
}

/* Make modal description textarea much larger */
.modal #editDescription {
    min-height: 350px;
    resize: vertical;
}

.modal .form-control:focus {
    background-color: #374151;
    border-color: #7e3af2;
    color: #e5e7eb;
    box-shadow: 0 0 0 0.25rem rgba(126, 58, 242, 0.25);
}

.modal .form-check-input {
    background-color: #374151;
    border-color: #4b5563;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.modal .form-check-input:checked {
    background-color: #7e3af2;
    border-color: #7e3af2;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.modal .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(126, 58, 242, 0.25);
    border-color: #7e3af2;
}

.modal .input-group-text {
    background-color: #2a2d3a;
    color: #9ca3af;
    border-color: #4b5563;
}

/* Category selector styling for modal */
.modal .category-select-wrapper {
    position: relative;
    width: 100%;
}

.modal .selected-categories-display {
    border: 1px solid #4b5563;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    background-color: #2a2d3a;
    color: #e5e7eb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: calc(1.5em + 0.75rem + 2px);
    font-size: 1rem;
}

.modal .selected-category-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-grow: 1;
}

.modal .category-badge {
    display: inline-flex;
    align-items: center;
    background-color: rgba(126, 58, 242, 0.15);
    border: 1px solid rgba(126, 58, 242, 0.25);
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    color: #e5e7eb;
}

.modal .category-badge i {
    margin-right: 0.25rem;
    color: #7e3af2;
}

.modal .remove-category {
    background: none;
    border: none;
    color: #9ca3af;
    padding: 0;
    margin-left: 0.25rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.modal .remove-category:hover {
    color: #e5e7eb;
}

.modal .dropdown-arrow {
    margin-left: 0.5rem;
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.modal .category-select-wrapper.active .dropdown-arrow {
    transform: rotate(180deg);
}

.modal .category-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #2a2d3a;
    border: 1px solid #4b5563;
    border-radius: 0.375rem;
    margin-top: 0.25rem;
    z-index: 100;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.modal .category-select-wrapper.active .category-dropdown-content {
    max-height: 300px;
    opacity: 1;
}

/* Ensure active modal category selector has higher priority */
.modal .category-select-wrapper.active {
    z-index: 100;
    position: relative;
}

.modal .category-search {
    padding: 0.75rem;
    position: relative;
    border-bottom: 1px solid #4b5563;
}

.modal .category-search input {
    padding-right: 2.5rem;
    background-color: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

.modal .category-search input:focus {
    border-color: #7e3af2;
    box-shadow: 0 0 0 0.25rem rgba(126, 58, 242, 0.25);
    outline: 0;
}

.modal .category-search i {
    position: absolute;
    top: 50%;
    right: 1.5rem;
    transform: translateY(-50%);
    color: #9ca3af;
}

.modal .category-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
}

.modal .category-item {
    padding: 0.5rem 0.75rem;
    color: #e5e7eb;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-radius: 0.25rem;
}

.modal .category-item:hover {
    background-color: rgba(126, 58, 242, 0.1);
}

.modal .category-item i {
    margin-right: 0.5rem;
    color: #7e3af2;
    width: 1.25rem;
    text-align: center;
}

.modal .category-item.custom-category {
    border-top: 1px solid #4b5563;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    background-color: rgba(16, 185, 129, 0.05);
    border-radius: 0.25rem;
}

.modal .category-item.custom-category:hover {
    background-color: rgba(16, 185, 129, 0.1);
}

.modal .category-item.custom-category i {
    color: #10b981;
}

/* Modal form switches styling */
.modal .form-check.form-switch {
    padding-left: 0;
}

.modal .form-check.form-switch .form-check-input {
    width: 3rem;
    height: 1.5rem;
    margin-left: 0;
    margin-right: 0.5rem;
    border-radius: 1rem;
    background-color: #374151;
    border: 2px solid #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal .form-check.form-switch .form-check-input:checked {
    background-color: #7d19ff;
    border-color: #7d19ff;
}

.modal .form-check.form-switch .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(125, 25, 255, 0.25);
    border-color: #7d19ff;
}

.modal .form-check.form-switch .form-check-label {
    color: #e5e7eb;
    font-weight: 500;
    cursor: pointer;
    margin-left: 0.25rem;
    line-height: 1.5rem;
}

/* Row styling for the toggle switches */
.modal .row.mb-3 {
    margin-bottom: 1.5rem;
    margin-left: 0;
    margin-right: 0;
}

.modal .row.mb-3 .col-md-4,
.modal .row.mb-3 .col-md-6 {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.5rem;
    flex: 0 0 auto;
    width: auto;
}

.modal .row.mb-3 .col-md-4:not(:last-child),
.modal .row.mb-3 .col-md-6:first-child {
    margin-right: 1rem;
}

/* Mobile responsive for toggle switches */
@media (max-width: 425px) {
    .modal .row.mb-3 {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .modal .row.mb-3 .col-md-4,
    .modal .row.mb-3 .col-md-6 {
        width: 100%;
        margin-bottom: 0.75rem;
        padding: 0.25rem 0;
    }
    
    .modal .row.mb-3 .col-md-4:not(:last-child),
    .modal .row.mb-3 .col-md-6:first-child {
        margin-right: 0;
        margin-bottom: 0rem;
    }
    
    .modal .form-check.form-switch .form-check-input {
        width: 2.5rem;
        height: 1.25rem;
        margin-right: 0.5rem;
    }
    
    .modal .form-check.form-switch .form-check-label {
        font-size: 0.9rem;
        margin-left: 0.25rem;
        line-height: 1.25rem;
    }
}

/* Inline editing styles */
.description-edit-form,
.categories-edit-form {
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 0.75rem;
    backdrop-filter: blur(10px);
}

/* Special styling for description edit form to make it more prominent */
.description-edit-form {
    padding: 2rem;
}

.description-edit-form .form-control {
    background-color: #2a2d3a;
    border: 1px solid #4b5563;
    color: #e5e7eb;
    border-radius: 6px;
}

.description-edit-form .form-control:focus {
    background-color: #374151;
    color: #e5e7eb;
    box-shadow: 0 0 0 0.25rem rgba(126, 58, 242, 0.25);
}

/* Large textarea styling for description editing */
.description-edit-form .large-textarea {
    min-height: 300px;
    font-size: 1rem;
    line-height: 1.6;
    padding: 1rem;
    resize: vertical;
    background-color: #1e2128;
    border: 2px solid #4b5563;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.description-edit-form .large-textarea:focus {
    background-color: #2a2d3a;
    border-color: #7d19ff;
    box-shadow: 0 0 0 0.25rem rgba(125, 25, 255, 0.15);
    transform: scale(1.01);
}

.description-edit-form .large-textarea::placeholder {
    color: #9ca3af;
    font-style: italic;
    opacity: 0.8;
}

/* Character counter styling */
.character-counter {
    font-weight: 500;
    transition: color 0.3s ease;
}

.description-edit-form .d-flex small:first-child {
    color: #bdc3c7;
    font-weight: 500;
}

.categories-edit-form .form-check.form-switch .form-check-input {
    width: 3rem;
    height: 1.5rem;
    margin-left: 0;
    margin-right: 0.5rem;
    border-radius: 1rem;
    background-color: #374151;
    border: 2px solid #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
}

.categories-edit-form .form-check.form-switch .form-check-input:checked {
    background-color: #7d19ff;
    border-color: #7d19ff;
}

.categories-edit-form .form-check.form-switch .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(125, 25, 255, 0.25);
    border-color: #7d19ff;
}

.categories-edit-form .form-check.form-switch .form-check-label {
    color: #e5e7eb;
    font-weight: 500;
    cursor: pointer;
    margin-left: 0.25rem;
    line-height: 1.5rem;
}

/* Inline category selector inherits modal styles but with some adjustments */
.categories-edit-form .category-select-wrapper {
    position: relative;
    width: 100%;
}

.categories-edit-form .selected-categories-display {
    border: 1px solid #4b5563;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    background-color: #2a2d3a;
    color: #e5e7eb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: calc(1.5em + 0.75rem + 2px);
    font-size: 1rem;
}

.categories-edit-form .selected-category-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-grow: 1;
}

.categories-edit-form .category-badge {
    display: inline-flex;
    align-items: center;
    background-color: rgba(126, 58, 242, 0.15);
    border: 1px solid rgba(126, 58, 242, 0.25);
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    color: #e5e7eb;
}

.categories-edit-form .category-badge i {
    margin-right: 0.25rem;
    color: #7e3af2;
}

.categories-edit-form .remove-category {
    background: none;
    border: none;
    color: #9ca3af;
    padding: 0;
    margin-left: 0.25rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.categories-edit-form .remove-category:hover {
    color: #e5e7eb;
}

.categories-edit-form .dropdown-arrow {
    margin-left: 0.5rem;
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.categories-edit-form .category-select-wrapper.active .dropdown-arrow {
    transform: rotate(180deg);
}

.categories-edit-form .category-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #2a2d3a;
    border: 1px solid #4b5563;
    border-radius: 0.375rem;
    margin-top: 0.25rem;
    z-index: 100;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.categories-edit-form .category-select-wrapper.active .category-dropdown-content {
    max-height: 300px;
    opacity: 1;
}

/* Ensure active category selector has higher priority than other elements */
.categories-edit-form .category-select-wrapper.active {
    z-index: 100;
    position: relative;
}

/* When categories dropdown is active, boost the parent section's z-index */
.analytics-card.dropdown-active {
    z-index: 50 !important;
}

.categories-edit-form .category-search {
    padding: 0.75rem;
    position: relative;
    border-bottom: 1px solid #4b5563;
}

.categories-edit-form .category-search input {
    padding-right: 2.5rem;
    background-color: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

.categories-edit-form .category-search input:focus {
    border-color: #7e3af2;
    box-shadow: 0 0 0 0.25rem rgba(126, 58, 242, 0.25);
    outline: 0;
}

.categories-edit-form .category-search i {
    position: absolute;
    top: 50%;
    right: 1.5rem;
    transform: translateY(-50%);
    color: #9ca3af;
}

.categories-edit-form .category-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
}

.categories-edit-form .category-item {
    padding: 0.5rem 0.75rem;
    color: #e5e7eb;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-radius: 0.25rem;
}

.categories-edit-form .category-item:hover {
    background-color: rgba(126, 58, 242, 0.1);
}

.categories-edit-form .category-item i {
    margin-right: 0.5rem;
    color: #7e3af2;
    width: 1.25rem;
    text-align: center;
}

.categories-edit-form .category-item.custom-category {
    border-top: 1px solid #4b5563;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    background-color: rgba(16, 185, 129, 0.05);
    border-radius: 0.25rem;
}

.categories-edit-form .category-item.custom-category:hover {
    background-color: rgba(16, 185, 129, 0.1);
}

.categories-edit-form .category-item.custom-category i {
    color: #10b981;
}

/* Modern Categories Editor */
.modern-categories-editor {
    background: linear-gradient(135deg, rgba(26, 27, 30, 0.9) 0%, rgba(42, 45, 58, 0.9) 100%);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(125, 25, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 1rem;
}

.category-section {
    margin-bottom: 2rem;
    position: relative;
}

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

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.section-indicator {
    width: 4px;
    height: 24px;
    border-radius: 2px;
    flex-shrink: 0;
}

.primary-indicator {
    background: linear-gradient(135deg, #7d19ff, #9146FF);
    box-shadow: 0 2px 8px rgba(125, 25, 255, 0.3);
}

.secondary-indicator {
    background: linear-gradient(135deg, rgba(125, 25, 255, 0.4), rgba(145, 70, 255, 0.4));
    box-shadow: 0 2px 6px rgba(125, 25, 255, 0.2);
}

.special-indicator {
    background: linear-gradient(135deg, #F4CA81, #f5d491);
    box-shadow: 0 2px 8px rgba(244, 202, 129, 0.3);
}

.section-header h6 {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    flex-grow: 1;
}

.required-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.optional-badge {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.modern-select {
    width: 100%;
    background: rgba(55, 65, 81, 0.8);
    border: 2px solid rgba(75, 85, 99, 0.5);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    color: #e5e7eb;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modern-select:focus {
    outline: none;
    border-color: #7d19ff;
    box-shadow: 0 0 0 4px rgba(125, 25, 255, 0.1);
    background: rgba(55, 65, 81, 1);
}

.modern-select option {
    background: #374151;
    color: #e5e7eb;
    padding: 0.5rem;
}

.tags-input-area {
    background: rgba(55, 65, 81, 0.6);
    border: 2px solid rgba(75, 85, 99, 0.3);
    border-radius: 12px;
    padding: 0.75rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.tags-input-area:focus-within {
    border-color: rgba(125, 25, 255, 0.5);
    box-shadow: 0 0 0 4px rgba(125, 25, 255, 0.05);
    background: rgba(55, 65, 81, 0.8);
}

.current-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    min-height: 1rem;
}

.modern-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(125, 25, 255, 0.15);
    border: 1px solid rgba(125, 25, 255, 0.3);
    border-radius: 8px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #e5e7eb;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.modern-tag:hover {
    background: rgba(125, 25, 255, 0.2);
    border-color: rgba(125, 25, 255, 0.4);
}

.modern-tag .remove-tag {
    background: none;
    border: none;
    color: #9ca3af;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    line-height: 1;
}

.modern-tag .remove-tag:hover {
    color: #ffffff;
    background-color: rgba(239, 68, 68, 0.8);
}

.tag-input {
    width: 100%;
    background: transparent;
    border: none;
    color: #e5e7eb;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    outline: none;
    font-weight: 500;
}

.tag-input::placeholder {
    color: #9ca3af;
    opacity: 0.8;
    font-weight: 400;
}

.input-hint {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 0.5rem;
    font-weight: 400;
    line-height: 1.4;
}

.special-toggles {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.modern-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem 0;
}

.modern-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 48px;
    height: 24px;
    background: rgba(75, 85, 99, 0.8);
    border-radius: 24px;
    transition: all 0.3s ease;
    border: 2px solid rgba(75, 85, 99, 0.5);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.modern-toggle input[type="checkbox"]:checked + .toggle-slider {
    background: #7c3aed;
    border-color: #F4CA81;
}

.modern-toggle input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(24px);
    background: #2c3e50;
}

.toggle-label {
    color: #e5e7eb;
    font-size: 0.9rem;
    font-weight: 500;
    user-select: none;
}

/* Modal specific adjustments */
.modal-version {
    background: rgba(26, 27, 30, 0.7);
    border-color: rgba(125, 25, 255, 0.15);
}

/* Inline form switches layout */
.categories-edit-form .d-flex.gap-4 {
    flex-wrap: wrap;
    align-items: center;
}

.categories-edit-form .d-flex.gap-4 .form-check.form-switch {
    margin-bottom: 0;
    padding-left: 0;
}

/* Inline edit buttons */
.description-edit-form .btn,
.categories-edit-form .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    min-width: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.description-edit-form .btn-primary,
.categories-edit-form .btn-primary {
    background: linear-gradient(135deg, #7d19ff, #9146FF);
    border-color: #7d19ff;
    color: #ffffff;
}

.description-edit-form .btn-primary:hover,
.categories-edit-form .btn-primary:hover {
    background: linear-gradient(135deg, #6a15e6, #7d19ff);
    border-color: #6a15e6;
}

.description-edit-form .btn-secondary,
.categories-edit-form .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #ffffff;
}

.description-edit-form .btn-secondary:hover,
.categories-edit-form .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* Responsive styling for large textarea */
@media (max-width: 768px) {
    .description-edit-form .large-textarea {
        min-height: 180px;
        font-size: 0.95rem;
        padding: 0.875rem;
    }
    
    .description-edit-form {
        padding: 1.5rem;
        margin-top: 0.5rem;
    }
    
    /* Ensure buttons have no extra margins in mobile */
    .description-edit-form .btn-primary,
    .categories-edit-form .btn-primary,
    .language-edit-form .btn-primary {
        margin: 0 !important;
    }
}

@media (max-width: 425px) {
    .description-edit-form .large-textarea {
        min-height: 160px;
        font-size: 0.9rem;
        padding: 0.75rem;
    }
    
    .description-edit-form {
        padding: 1rem;
        border-radius: 8px;
    }
    
    /* Ensure buttons have no extra margins in small mobile */
    .description-edit-form .btn-primary,
    .categories-edit-form .btn-primary,
    .language-edit-form .btn-primary {
        margin: 0 !important;
    }
}

/* Language section styling */
.language-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-tag {
    background: #404040;
    color: #e0e0e0;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #555555;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.language-tag:before {
    content: "🌐";
    font-size: 0.8rem;
}

/* Language edit form styling */
.language-edit-form {
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 0.5rem;
    position: relative;
    z-index: 1;
}

.language-edit-form .language-select {
    background-color: #2a2d3a;
    border: 1px solid #4b5563;
    color: #e5e7eb;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}

.language-edit-form .language-select:focus {
    background-color: #374151;
    border-color: #7d19ff;
    color: #e5e7eb;
    box-shadow: 0 0 0 0.25rem rgba(125, 25, 255, 0.25);
}

.language-edit-form .form-control {
    background-color: #2a2d3a;
    border: 1px solid #4b5563;
    color: #e5e7eb;
    border-radius: 6px;
}

.language-edit-form .form-control:focus {
    background-color: #374151;
    color: #e5e7eb;
    box-shadow: 0 0 0 0.25rem rgba(125, 25, 255, 0.25);
}

.language-edit-form .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    min-width: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.language-edit-form .btn-primary {
    background: linear-gradient(135deg, #7d19ff, #9146FF);
    border-color: #7d19ff;
    color: #ffffff;
}

.language-edit-form .btn-primary:hover {
    background: linear-gradient(135deg, #6a15e6, #7d19ff);
    border-color: #6a15e6;
}

.language-edit-form .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #ffffff;
}

.language-edit-form .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* Responsive styling for language section */
@media (max-width: 768px) {
    .language-edit-form {
        padding: 1rem;
        margin-top: 0.25rem;
    }
    
    /* Ensure language form buttons have no extra margins in mobile */
    .language-edit-form .btn-primary {
        margin: 0 !important;
    }
}

/* Visibility section styling - cautionary appearance */
.modal .visibility-section {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(239, 68, 68, 0.03) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.modal .visibility-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.modal .visibility-title {
    font-weight: 600;
    color: #f59e0b;
    font-size: 0.95rem;
}

.modal .visibility-toggle {
    margin-bottom: 0.5rem;
}

.modal .visibility-toggle-input {
    width: 3rem;
    height: 1.5rem;
    margin-left: 0;
    margin-right: 0.75rem;
    border-radius: 1rem;
    background-color: #374151;
    border: 2px solid #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal .visibility-toggle-input:checked {
    background-color: #10b981;
    border-color: #10b981;
}

.modal .visibility-toggle-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.25);
    border-color: #10b981;
}

.modal .visibility-label {
    color: #e5e7eb;
    font-weight: 500;
    cursor: pointer;
    margin-left: 0;
    line-height: 1.5rem;
}

.modal .visibility-status {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.modal .visibility-warning {
    color: #f59e0b !important;
    font-weight: 500;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    margin-top: 0.25rem;
}

    .modal .visibility-warning i {
        color: #f59e0b;
    }

/* Recommended Servers Section */
.recommended-servers {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recommended-server-card {
    background: rgba(55, 65, 81, 0.3);
    border: 1px solid rgba(75, 85, 99, 0.4);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

.recommended-server-card:hover {
    background: rgba(55, 65, 81, 0.5);
    border-color: rgba(125, 25, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(125, 25, 255, 0.1);
}

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

.server-card-icon {
    flex-shrink: 0;
}

.recommended-server-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(125, 25, 255, 0.2);
}

.recommended-server-icon.default-icon {
    background: #404040;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
}

.server-card-info {
    flex: 1;
    min-width: 0;
}

.server-card-name {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.server-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.server-card-category {
    background: rgba(125, 25, 255, 0.2);
    color: #e0e0e0;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(125, 25, 255, 0.3);
}

.server-card-members {
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.server-card-members:before {
    content: "👥";
    font-size: 0.7rem;
}

.server-card-description {
    color: #bdc3c7;
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.server-card-actions {
    flex-shrink: 0;
    margin-left: 1rem;
}

.server-card-actions .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.server-card-actions .btn-outline-primary {
    border-color: #7d19ff;
    color: #7d19ff;
    background: transparent;
}

.server-card-actions .btn-outline-primary:hover {
    background: #7d19ff;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(125, 25, 255, 0.3);
}

/* Responsive design for recommended servers */
@media (max-width: 768px) {
    .recommended-server-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.875rem;
    }
    
    .server-card-content {
        width: 100%;
        gap: 0.75rem;
    }
    
    .recommended-server-icon {
        width: 40px;
        height: 40px;
    }
    
    .recommended-server-icon.default-icon {
        font-size: 1rem;
    }
    
    .server-card-name {
        font-size: 0.95rem;
    }
    
    .server-card-meta {
        gap: 0.5rem;
        margin-bottom: 0.375rem;
    }
    
    .server-card-description {
        font-size: 0.8rem;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }
    
    .server-card-actions {
        width: 100%;
        margin-left: 0;
        display: flex;
        justify-content: flex-end;
    }
    
    .server-card-actions .btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 425px) {
    .recommended-servers {
        gap: 0.75rem;
    }
    
    .recommended-server-card {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .server-card-content {
        gap: 0.5rem;
    }
    
    .recommended-server-icon {
        width: 36px;
        height: 36px;
    }
    
    .recommended-server-icon.default-icon {
        font-size: 0.9rem;
    }
    
    .server-card-name {
        font-size: 0.9rem;
    }
    
    .server-card-category {
        font-size: 0.7rem;
        padding: 0.1rem 0.4rem;
    }
    
    .server-card-members {
        font-size: 0.7rem;
    }
    
    .server-card-description {
        font-size: 0.75rem;
    }
}

/* Sidebar Recommendations */
.sidebar-recommendations {
    background: #1a1b1e !important;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    position: relative;
}

.sidebar-recommendations::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(125, 25, 255, 0.4), rgba(244, 202, 129, 0.4));
    border-radius: 12px 12px 0 0;
}

.sidebar-recommendations-title {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.sidebar-recommendations-title i {
    color: #7d19ff;
}

.sidebar-recommendations-subtitle {
    color: #9ca3af;
    margin-top: 1rem;
    line-height: 1.4;
}

.sidebar-recommended-servers {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-server-card {
    background: rgba(55, 65, 81, 0.2);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    backdrop-filter: blur(5px);
}

.sidebar-server-card:hover {
    background: rgba(55, 65, 81, 0.4);
    border-color: rgba(125, 25, 255, 0.3);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(125, 25, 255, 0.1);
}


.sidebar-server-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.sidebar-server-icon {
    flex-shrink: 0;
}

.sidebar-server-image {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(125, 25, 255, 0.2);
}

.sidebar-server-image.default-icon {
    background: #404040;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.sidebar-server-info {
    flex: 1;
    min-width: 0;
}

.sidebar-server-name {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-server-meta {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.sidebar-server-members {
    color: #9ca3af;
    font-size: 0.7rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sidebar-server-members:before {
    content: "👥";
    font-size: 0.6rem;
}

.sidebar-server-category {
    background: rgba(125, 25, 255, 0.15);
    color: #e0e0e0;
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 500;
    border: 1px solid rgba(125, 25, 255, 0.25);
    display: inline-block;
    width: fit-content;
}

.sidebar-server-description {
    color: #9ca3af;
    font-size: 0.75rem;
    line-height: 1.4;
    margin: 0.5rem 0 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.9;
}

.sidebar-server-action {
    flex-shrink: 0;
    margin-left: 0.5rem;
    margin-top: 0.25rem;
}

.sidebar-view-btn {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
    border-radius: 4px !important;
    border-color: #7d19ff !important;
    color: #7d19ff !important;
    background: transparent !important;
    transition: all 0.3s ease !important;
    min-width: 32px;
    height: 28px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.sidebar-view-btn:hover {
    background: #7d19ff !important;
    color: #ffffff !important;
    transform: scale(1.05) !important;
    box-shadow: 0 2px 8px rgba(125, 25, 255, 0.3) !important;
}

/* Responsive design for sidebar recommendations */
@media (max-width: 1200px) {
    .sidebar-recommendations {
        margin-top: 1rem;
        padding: 1.25rem;
    }
    
    .sidebar-server-card {
        padding: 0.625rem;
    }
    
    .sidebar-server-image {
        width: 32px;
        height: 32px;
    }
    
    .sidebar-server-name {
        font-size: 0.8rem;
    }
    
    .sidebar-server-description {
        font-size: 0.65rem;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }
}

@media (max-width: 992px) {
    /* On tablet and below, hide sidebar recommendations */
    .sidebar-recommendations {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .sidebar-recommendations {
        display: none !important;
    }
}

/* Social Links Section Styling */
.modal .mb-4:has(.social-platform-btn) {
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
}

.social-platform-btn {
    background-color: #2a2d3a !important;
    border-color: #4b5563 !important;
    color: #e5e7eb !important;
    transition: all 0.2s ease;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.social-platform-btn:hover, .social-platform-btn:focus {
    background-color: #374151 !important;
    border-color: #6b7280 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.social-platform-dropdown {
    background-color: #2a2d3a;
    border-color: #4b5563;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.social-platform-dropdown .dropdown-item {
    color: #e5e7eb;
    background-color: transparent;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.social-platform-dropdown .dropdown-item:hover {
    background-color: rgba(126, 58, 242, 0.1);
    color: #ffffff;
}

.social-platform-dropdown .dropdown-item i {
    width: 1.25rem;
    text-align: center;
}

.social-url-input {
    background-color: #2a2d3a !important;
    border-color: #4b5563 !important;
    color: #e5e7eb !important;
    height: 38px !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
}

.social-url-input:focus {
    background-color: #374151 !important;
    border-color: #7e3af2 !important;
    color: #e5e7eb !important;
    box-shadow: 0 0 0 0.25rem rgba(126, 58, 242, 0.25) !important;
}

.social-link-row {
    position: relative;
    transition: all 0.2s ease;
    margin-bottom: 0.75rem !important;
    padding: 0.25rem 0;
}

.social-link-row:hover {
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    padding: 0.5rem;
    margin: 0.25rem 0 1rem 0;
}

.social-link-row .row {
    margin: 0 !important;
    align-items: center;
}

.social-link-row .col-md-4,
.social-link-row .col-md-7,
.social-link-row .col-md-1 {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

.remove-social-link {
    background-color: transparent !important;
    border-color: #dc3545 !important;
    color: #dc3545 !important;
    transition: all 0.2s ease;
    padding: 0.5rem !important;
    height: 38px !important;
    width: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.remove-social-link:hover {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

/* Clear/Delete button styling for Twitter and Website */
.clear-social-link {
    background-color: transparent !important;
    border-color: #dc3545 !important;
    color: #dc3545 !important;
    transition: all 0.2s ease;
    padding: 0.5rem !important;
    height: 38px !important;
    width: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.clear-social-link:hover {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

/* Input group styling for Twitter */
.modal .input-group .input-group-text {
    background-color: #374151 !important;
    border-color: #4b5563 !important;
    color: #9ca3af !important;
    height: 38px !important;
    font-size: 0.875rem !important;
    padding: 0.5rem 0.75rem !important;
}

.modal .input-group .form-control {
    height: 38px !important;
    border-left: none !important;
}

.modal .input-group .form-control:focus {
    border-color: #7e3af2 !important;
    box-shadow: none !important;
}

.modal .input-group:focus-within .input-group-text {
    border-color: #7e3af2 !important;
}

/* Ensure all social link rows have consistent alignment */
.modal .social-link-row {
    margin-bottom: 0.75rem !important;
    align-items: center;
}

.modal .social-link-row .col-md-4,
.modal .social-link-row .col-md-7,
.modal .social-link-row .col-md-1 {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

/* Add Social Link button styling */
#addSocialLinkBtn {
    margin-top: 1rem !important;
    margin-bottom: 0.5rem !important;
    padding: 0.5rem 1.5rem !important;
    font-size: 0.875rem !important;
    border-radius: 6px !important;
    border: 2px solid #7d19ff !important;
    background-color: transparent !important;
    color: #7d19ff !important;
    transition: all 0.2s ease;
}

#addSocialLinkBtn:hover {
    background-color: #7d19ff !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(125, 25, 255, 0.25) !important;
}

/* Additional social links container */
#additionalSocialLinks {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Social links section header spacing */
.modal h6:has(.fa-share-alt) {
    margin-top: 1.5rem !important;
    margin-bottom: 1rem !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Social Link Confirmation Modal Styling */
#socialLinkConfirmModal .social-platform-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: rgba(125, 25, 255, 0.1);
    border-radius: 50%;
    border: 2px solid rgba(125, 25, 255, 0.3);
}

#socialLinkConfirmModal .social-platform-icon i {
    color: #7d19ff !important;
}

#socialLinkConfirmModal .url-display {
    background-color: rgba(55, 65, 81, 0.8) !important;
    border: 1px solid #4b5563;
    word-break: break-all;
    font-family: 'Courier New', monospace;
}

#socialLinkConfirmModal .url-display code {
    color: #60a5fa !important;
    font-size: 0.9rem;
    font-weight: 500;
}

#socialLinkConfirmModal .modal-footer {
    gap: 1rem;
}

#socialLinkConfirmModal .btn-primary {
    background: linear-gradient(135deg, #7d19ff, #9146FF);
    border-color: #7d19ff;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}

#socialLinkConfirmModal .btn-primary:hover {
    background: linear-gradient(135deg, #6a15e6, #7d19ff);
    border-color: #6a15e6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(125, 25, 255, 0.3);
}

#socialLinkConfirmModal .btn-secondary {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}

#socialLinkConfirmModal h6 {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 1.1rem;
}

#socialLinkConfirmModal .text-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 6px;
    padding: 0.75rem;
    margin: 0;
}

/* Analytics Display - Design Language */
.activity-level-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
}

/* Category Badges - Uniform descriptive labels */
.activity-badge {
    color: #e0e0e0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.025em;
    display: inline-flex;
    align-items: center;
    min-width: fit-content;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

/* Data Section - Hard numbers with consistent styling */
.activity-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    min-width: 0;
    flex: 1;
}

/* Core Data Numbers - Consistent across all metrics */
.data-number {
    color: #7d19ff;
    font-size: 2rem;
    font-weight: 800;
    font-family: 'SF Mono', 'Monaco', 'Consolas', 'system-ui', monospace;
    text-shadow: 0 2px 12px rgba(125, 25, 255, 0.4);
    line-height: 1;
    margin-bottom: 0.25rem;
}

/* Data Labels - Consistent descriptive text */
.data-label {
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.9;
    text-transform: lowercase;
    letter-spacing: 0.025em;
}

/* Special handling for compound numbers (like "3 hours ago") */
.data-compound {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    justify-content: flex-end;
}

.data-compound .data-number {
    font-size: 1.75rem;
    margin-bottom: 0;
}

.data-compound .data-unit {
    color: #bdc3c7;
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.8;
}

/* Tier-specific subtle accent colors */
.activity-badge[data-tier="very_quiet"] {
    background: rgba(142, 154, 175, 0.12);
}

.activity-badge[data-tier="quiet_cozy"] {
    background: rgba(246, 193, 119, 0.12);
}

.activity-badge[data-tier="consistent_buzz"] {
    background: rgba(123, 201, 111, 0.12);
}

.activity-badge[data-tier="very_active"] {
    background: rgba(93, 173, 226, 0.12);
}

.activity-badge[data-tier="packed"] {
    background: rgba(187, 107, 217, 0.12);
}

.activity-badge[data-tier="present_quiet"] {
    background: rgba(142, 154, 175, 0.12);
}

.activity-badge[data-tier="relaxed_talk"] {
    background: rgba(246, 193, 119, 0.12);
}

.activity-badge[data-tier="friendly_conversations"] {
    background: rgba(123, 201, 111, 0.12);
}

.activity-badge[data-tier="deep_discussions"] {
    background: rgba(93, 173, 226, 0.12);
}

.activity-badge[data-tier="tight_knit"] {
    background: rgba(187, 107, 217, 0.12);
}

.activity-badge[data-tier="staff_active"] {
    background: rgba(23, 162, 184, 0.12);
}

.activity-badge[data-tier="recent_activity"] {
    background: rgba(187, 107, 217, 0.12);
}

.activity-badge[data-tier="founder_led"] {
    background: rgba(243, 156, 18, 0.12);
}

.activity-badge[data-tier="team_delegated"] {
    background: rgba(52, 152, 219, 0.12);
}

.activity-badge[data-tier="professionally_managed"] {
    background: rgba(39, 174, 96, 0.12);
}

/* Section headers in analytics */
.analytics-card h6 {
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.analytics-card h6 i:not(.analytics-tooltip) {
    color: #7d19ff;
    margin-right: 0.5rem;
    width: 1.25rem;
    text-align: center;
}

/* Fine print explanations */
.analytics-card .text-muted {
    color: #9ca3af !important;
    font-size: 0.8rem;
    line-height: 1.4;
    opacity: 0.8;
}

/* Analytics tooltips */
.analytics-tooltip {
    color: #9ca3af !important;
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
    padding: 0.25rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    min-height: 1.5rem;
}

.analytics-tooltip:hover {
    color: #bdc3c7 !important;
    opacity: 1;
    background-color: rgba(125, 25, 255, 0.1);
}

/* Enhanced mobile touch targets */
@media (max-width: 768px) {
    .analytics-tooltip {
        font-size: 0.9rem;
        padding: 0.375rem;
        min-width: 2rem;
        min-height: 2rem;
        opacity: 0.8;
    }
    
    .analytics-tooltip:active,
    .analytics-tooltip:focus {
        opacity: 1;
        background-color: rgba(125, 25, 255, 0.2);
        transform: scale(1.1);
    }
}

/* Tooltip styling */
.tooltip {
    z-index: 1070;
}

.tooltip .tooltip-inner {
    background-color: #2c2c2c;
    color: #e0e0e0;
    border: 1px solid #4a4a4a;
    border-radius: 6px;
    padding: 0.75rem;
    max-width: 300px;
    text-align: left;
    font-size: 0.875rem;
    line-height: 1.4;
}

.tooltip .tooltip-arrow {
    display: none;
}

/* Adjust spacing for repositioned explanatory text */
.analytics-card .mb-2 {
    margin-bottom: 0.75rem !important;
}

.activity-level-display {
    margin-top: 0.5rem;
}

/* Responsive design for analytics */
@media (max-width: 768px) {
    .activity-level-display {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }
    
    .activity-metric {
        align-items: flex-start;
        text-align: left;
    }
    
    .activity-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        align-self: flex-start;
    }
    
    .data-number {
        font-size: 1.75rem;
    }
    
    .data-compound .data-number {
        font-size: 1.5rem;
    }
    
    .data-label {
        font-size: 0.75rem;
    }
    
    .analytics-card h6 {
        font-size: 0.95rem;
    }
    
    .analytics-card .text-muted {
        font-size: 0.75rem;
    }
}

@media (max-width: 425px) {
    .activity-level-display {
        gap: 0.75rem;
        padding: 0.875rem;
    }
    
    .activity-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .data-number {
        font-size: 1.5rem;
    }
    
    .data-compound .data-number {
        font-size: 1.25rem;
    }
    
    .data-compound .data-unit {
        font-size: 0.9rem;
    }
    
    .data-label {
        font-size: 0.7rem;
    }
    
    .analytics-card h6 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .analytics-card .text-muted {
        font-size: 0.7rem;
    }
}
