/* Custom Commands Page CSS */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*:focus,
*:focus-visible {
    outline: none !important;
}

html {
    background: #000000; /* Schwarzer Fallback-Hintergrund, verhindert weißen Flash */
}

html::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    z-index: -3; /* Hinter allen Background-Effekten */
    pointer-events: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: transparent !important; /* Transparent, damit Background-Effekte sichtbar sind */
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Server Management Header */
.server-management-header {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 70px;
    min-height: 70px;
    max-height: 70px;
    background: rgba(15, 15, 15, 0.3);
    backdrop-filter: var(--kynx-blur);
    -webkit-backdrop-filter: var(--kynx-blur);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    z-index: 999;
    margin-top: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 100%;
    max-height: 70px;
    overflow: hidden;
}

.back-btn {
    background: rgba(15, 15, 15, 0.3);
    backdrop-filter: var(--kynx-blur);
    -webkit-backdrop-filter: var(--kynx-blur);
    color: #b9bbbe;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 40px;
    max-height: 40px;
    min-width: 120px;
    line-height: 1;
    white-space: nowrap;
    box-sizing: border-box;
    flex-shrink: 0;
}

.back-btn:hover {
    background: rgba(15, 15, 15, 0.4);
    color: #fff;
    transform: translateX(-4px);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #b9bbbe;
    height: 100%;
    max-height: 70px;
    overflow: hidden;
    line-height: 1;
    font-size: 1.125rem;
}

.breadcrumb-separator {
    color: #5a5a5a;
}

.current-page {
    color: #fff;
    font-weight: 600;
}

/* Commands Container */
.commands-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 160px 20px 60px 20px;
    position: relative;
    z-index: 1;
}

/* Commands Header */
.commands-header {
    text-align: center;
    margin-bottom: 40px;
}

.commands-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(88, 101, 242, 0.3);
}

.commands-header p {
    font-size: 1.2rem;
    color: #b9bbbe;
}

/* Stats Overview */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
    max-width: 750px;
}

.stat-card {
    background: rgba(15, 15, 15, 0.3);
    backdrop-filter: var(--kynx-blur);
    -webkit-backdrop-filter: var(--kynx-blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.25rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(88, 101, 242, 0.5);
    box-shadow: 0 8px 30px rgba(88, 101, 242, 0.2);
}

.stat-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.2), rgba(114, 137, 218, 0.2));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #7289da;
    flex-shrink: 0;
}

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
}

.stat-info p {
    font-size: 0.8rem;
    color: #b9bbbe;
    font-weight: 500;
}

/* Actions Bar */
.actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-filter-group {
    display: flex;
    gap: 1rem;
    flex: 1;
    min-width: 300px;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #72767d;
}

.search-box input {
    width: 100%;
    background: rgba(15, 15, 15, 0.3);
    backdrop-filter: var(--kynx-blur);
    -webkit-backdrop-filter: var(--kynx-blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.875rem 1rem 0.875rem 3rem;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

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

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

/* Filter Dropdown */
.filter-dropdown-wrapper {
    position: relative;
}

.filter-dropdown-btn {
    background: rgba(15, 15, 15, 0.3);
    backdrop-filter: var(--kynx-blur);
    -webkit-backdrop-filter: var(--kynx-blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.875rem 1.25rem;
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 200px;
}

.filter-dropdown-btn:hover {
    background: rgba(88, 101, 242, 0.1);
    border-color: rgba(88, 101, 242, 0.5);
}

.filter-dropdown-btn i:first-child {
    color: #7289da;
}

.filter-dropdown-btn i:last-child {
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.filter-dropdown-btn.active i:last-child {
    transform: rotate(180deg);
}

.filter-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 280px;
    background: rgba(15, 15, 15, 0.3);
    backdrop-filter: var(--kynx-blur);
    -webkit-backdrop-filter: var(--kynx-blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
}

.filter-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filter-dropdown-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(88, 101, 242, 0.2);
    font-size: 0.875rem;
    font-weight: 600;
    color: #7289da;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-dropdown-section {
    padding: 0.75rem 0;
}

.filter-section-title {
    padding: 0.5rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #72767d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: #b9bbbe;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-option:hover {
    background: rgba(88, 101, 242, 0.1);
    color: #fff;
}

.filter-option.active {
    background: rgba(88, 101, 242, 0.2);
    color: #fff;
    border-left: 3px solid #5865f2;
}

.filter-option i {
    width: 20px;
    text-align: center;
    color: #7289da;
}

/* Scrollbar for dropdown */
.filter-dropdown::-webkit-scrollbar {
    width: 6px;
}

.filter-dropdown::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.filter-dropdown::-webkit-scrollbar-thumb {
    background: rgba(88, 101, 242, 0.5);
    border-radius: 3px;
}

.filter-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(88, 101, 242, 0.7);
}

.quick-actions {
    display: flex;
    gap: 0.75rem;
}

.create-command-btn {
    background: linear-gradient(135deg, #5865f2, #7289da);
    color: #fff;
    border: none;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
    white-space: nowrap;
}

.create-command-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(88, 101, 242, 0.5);
    background: linear-gradient(135deg, #4752c4, #5865f2);
}

.create-command-btn i {
    font-size: 1.125rem;
}

/* Commands Grid */
.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Command Card */
.command-card {
    background: rgba(15, 15, 15, 0.3);
    backdrop-filter: var(--kynx-blur);
    -webkit-backdrop-filter: var(--kynx-blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.command-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #5865f2, #7289da);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.command-card:hover {
    background: rgba(15, 15, 15, 0.4);
    border-color: rgba(88, 101, 242, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(88, 101, 242, 0.3);
}

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

/* Command Card Header */
.command-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.command-icon {
    width: 48px;
    height: 48px;
    background: rgba(88, 101, 242, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5865f2;
    font-size: 1.5rem;
    flex-shrink: 0;
}

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

.command-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.25rem;
    font-family: 'Courier New', monospace;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.command-prefix {
    color: #7289da;
}

.command-description {
    color: #b9bbbe;
    font-size: 0.875rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Command Status Badge */
.command-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.command-status.active {
    background: rgba(67, 181, 129, 0.15);
    color: #43b581;
    border: 1px solid rgba(67, 181, 129, 0.3);
}

.command-status.inactive {
    background: rgba(114, 118, 125, 0.15);
    color: #72767d;
    border: 1px solid rgba(114, 118, 125, 0.3);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Command Meta */
.command-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(88, 101, 242, 0.2);
    font-size: 0.8125rem;
    color: #b9bbbe;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.meta-item i {
    color: #7289da;
    font-size: 0.875rem;
}

.category-badge {
    background: rgba(88, 101, 242, 0.15);
    color: #7289da;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Command Actions */
.command-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.action-icon-btn {
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7289da;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-icon-btn:hover {
    background: rgba(88, 101, 242, 0.2);
    border-color: rgba(88, 101, 242, 0.5);
    transform: scale(1.05);
}

.action-icon-btn.delete {
    background: rgba(237, 66, 69, 0.1);
    border-color: rgba(237, 66, 69, 0.3);
    color: #ed4245;
}

.action-icon-btn.delete:hover {
    background: rgba(237, 66, 69, 0.2);
    border-color: rgba(237, 66, 69, 0.5);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #b9bbbe;
}

.empty-state i {
    font-size: 4rem;
    color: #3a3a3a;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.empty-state p {
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto 2rem;
}

/* Command Editor Modal */
.command-editor-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    padding: 2rem;
}

.command-editor-modal.active {
    display: flex;
}

.editor-container-modal {
    background: #1a1a1a;
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: 20px;
    width: 100%;
    max-width: 1400px;
    max-height: 90vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Editor Left Panel - Settings */
.editor-left {
    background: #1a1a1a;
    padding: 1rem;
    overflow-y: auto;
    border-right: 1px solid rgba(88, 101, 242, 0.2);
    max-height: 90vh;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.editor-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.close-editor-btn {
    background: rgba(114, 118, 125, 0.2);
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b9bbbe;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-editor-btn:hover {
    background: rgba(237, 66, 69, 0.2);
    color: #ed4245;
}

/* Editor Sections */
.editor-section {
    margin-bottom: 1rem;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: #7289da;
}

.form-group {
    margin-bottom: 0.75rem;
}

.form-label {
    display: block;
    margin-bottom: 0.375rem;
    color: #b9bbbe;
    font-size: 0.8125rem;
    font-weight: 500;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    background: rgba(26, 26, 26, 0.6);
    border: 1px solid rgba(88, 101, 242, 0.2);
    border-radius: 6px;
    padding: 0.625rem 0.875rem;
    color: #fff;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #5865f2;
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.1);
}

.form-textarea {
    min-height: 50px;
    resize: vertical;
}

.form-hint {
    display: none; /* Hide hints to save space */
}

/* Response Type Tabs */
/* Command Message Input */
.command-message-input {
    margin-bottom: 1rem;
}

.command-text-input {
    width: 100%;
    min-height: 80px;
    background: #2f3136;
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    color: #dcddde;
    font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.9375rem;
    resize: vertical;
    transition: all 0.2s ease;
}

.command-text-input:focus {
    outline: none;
    border-color: #5865f2;
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.1);
}

.command-text-input::placeholder {
    color: #6a6e76;
}

.input-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #7289da;
}

/* Command Embeds Container */
.command-embeds-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.command-embed-item {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.command-embed-item:hover {
    transform: translateX(4px);
}

/* Add Embed Button */
.add-embed-btn {
    width: 100%;
    background: rgba(88, 101, 242, 0.1);
    border: 2px dashed rgba(88, 101, 242, 0.3);
    border-radius: 8px;
    padding: 1rem;
    color: #7289da;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-embed-btn:hover {
    background: rgba(88, 101, 242, 0.2);
    border-color: rgba(88, 101, 242, 0.5);
    color: #fff;
}

.add-embed-btn i {
    font-size: 1rem;
}

/* Embed Builder (Simplified from embeds.css) */
.embed-builder {
    background: rgba(26, 26, 26, 0.6);
    border: 1px solid rgba(88, 101, 242, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
}

.embed-builder .form-group {
    margin-bottom: 0.75rem;
}

.embed-builder p {
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
}

/* Variables Helper */
.variables-helper {
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.2);
    border-radius: 6px;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.variables-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #7289da;
    margin-bottom: 0.375rem;
}

.variables-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.variable-tag {
    background: rgba(88, 101, 242, 0.2);
    color: #7289da;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
}

.variable-tag:hover {
    background: rgba(88, 101, 242, 0.3);
    transform: translateY(-2px);
}

/* Toggle Switch */
.toggle-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.toggle-label {
    color: #b9bbbe;
    font-size: 0.875rem;
    font-weight: 500;
}

.toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
    background: #4f545c;
    border-radius: 11px;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.toggle-switch.active {
    background: #43b581;
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-switch.active .toggle-slider {
    transform: translateX(18px);
}

/* Editor Footer */
.editor-footer {
    display: flex;
    gap: 0.75rem;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 1px solid rgba(88, 101, 242, 0.2);
}

.btn {
    flex: 1;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.btn-secondary {
    background: rgba(114, 118, 125, 0.2);
    color: #b9bbbe;
}

.btn-secondary:hover {
    background: rgba(114, 118, 125, 0.3);
    color: #fff;
}

.btn-primary {
    background: linear-gradient(135deg, #5865f2, #7289da);
    color: #fff;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(88, 101, 242, 0.5);
}

/* Editor Right Panel - Preview */
.editor-right {
    background: #0f0f0f;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.preview-header {
    margin-bottom: 1.5rem;
}

.preview-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-header i {
    color: #7289da;
}

/* Discord Preview Container */
.discord-preview {
    background: #36393f;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    flex: 1;
}

.discord-chat-header {
    background: #2f3136;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #202225;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.discord-chat-header i {
    color: #72767d;
    font-size: 1.25rem;
}

.discord-chat-header span {
    color: #fff;
    font-weight: 600;
}

.discord-messages-area {
    padding: 1.5rem;
    min-height: 300px;
}

.discord-message {
    display: flex;
    gap: 1rem;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-content {
    flex: 1;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.message-author {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

.message-badge {
    background: #5865f2;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
}

.message-timestamp {
    color: #72767d;
    font-size: 0.75rem;
}

.message-text {
    color: #dcddde;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* Inline Embed Editor */
.inline-embed-editor {
    position: relative;
    max-width: 520px;
    margin-bottom: 0.5rem;
}

.inline-embed-editor.editing .embed-controls {
    display: flex;
}

.embed-controls {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.25rem;
    transition: opacity 0.2s ease;
}

.embed-drag-handle {
    display: flex;
    align-items: center;
    color: #72767d;
    cursor: grab;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.embed-drag-handle:hover {
    background: rgba(79, 84, 92, 0.16);
    color: #dcddde;
}

.delete-embed-icon {
    background: transparent;
    border: none;
    color: #72767d;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.delete-embed-icon:hover {
    background: rgba(237, 66, 69, 0.1);
    color: #ed4245;
}

.embed-color-picker {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
}

/* Discord Embed Live */
.discord-embed-live {
    background: #2f3136;
    border-radius: 4px;
    padding: 0.75rem 1rem 0.75rem 0.75rem;
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    transition: all 0.2s ease;
    border-left: 4px solid var(--embed-color, #5865f2);
}

.inline-embed-editor.editing .discord-embed-live {
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.3);
}

.inline-embed-editor:not(.editing) .discord-embed-live {
    cursor: pointer;
}

.inline-embed-editor:not(.editing) .discord-embed-live:hover {
    background: #32353b;
}

.embed-color-bar {
    display: none;
}

.embed-main-content {
    min-width: 0;
    grid-column: 1;
    grid-row: 1;
}

/* Author Section */
.embed-author-section {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.embed-author-section:not(:empty) {
    display: flex;
}

.author-icon-upload {
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #202225;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: visible;
    flex-shrink: 0;
}

.embed-author-input {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 0.125rem 0.25rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.embed-author-input:focus {
    outline: none;
    background: rgba(79, 84, 92, 0.16);
    border-color: #5865f2;
}

.embed-author-input:disabled {
    cursor: default;
    pointer-events: none;
}

/* Title */
.embed-title-edit {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 0.125rem 0.25rem;
    color: #00aff4;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    width: 100%;
    margin-bottom: 0.5rem;
}

.embed-title-edit:focus {
    outline: none;
    background: rgba(79, 84, 92, 0.16);
    border-color: #5865f2;
}

.embed-title-edit:disabled {
    cursor: default;
    pointer-events: none;
}

/* Description */
.embed-description-edit {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 0.125rem 0.25rem;
    color: #dcddde;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    width: 100%;
    min-height: 60px;
    resize: none;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.embed-description-edit:focus {
    outline: none;
    background: rgba(79, 84, 92, 0.16);
    border-color: #5865f2;
}

.embed-description-edit:disabled {
    cursor: default;
    pointer-events: none;
    resize: none;
}

/* Footer Section */
.embed-footer-section {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.embed-footer-section:not(:empty) {
    display: flex;
}

.footer-icon-upload {
    position: relative;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #202225;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: visible;
    flex-shrink: 0;
}

.embed-footer-input {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 0.125rem 0.25rem;
    color: #72767d;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
}

.embed-footer-input:focus {
    outline: none;
    background: rgba(79, 84, 92, 0.16);
    border-color: #5865f2;
}

.embed-footer-input:disabled {
    cursor: default;
    pointer-events: none;
}

/* Image Upload */
.embed-image-upload {
    position: relative;
    background: #202225;
    border: 2px dashed #2f3136;
    border-radius: 4px;
    min-height: 120px;
    max-width: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-top: 0.75rem;
    padding: 0;
    overflow: visible;
    transition: all 0.2s ease;
}

.inline-embed-editor.editing .embed-image-upload:hover {
    border-color: #5865f2;
    background: rgba(88, 101, 242, 0.05);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #72767d;
}

.upload-placeholder i {
    font-size: 2rem;
}

.upload-placeholder span {
    font-size: 0.875rem;
}

/* Thumbnail Upload */
.embed-thumbnail-upload {
    position: relative;
    width: 80px;
    height: 80px;
    background: #202225;
    border: 2px dashed #2f3136;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: visible;
    flex-shrink: 0;
    transition: all 0.2s ease;
    grid-column: 2;
    grid-row: 1;
    align-self: start;
}

.inline-embed-editor.editing .embed-thumbnail-upload:hover {
    border-color: #5865f2;
    background: rgba(88, 101, 242, 0.05);
}

.thumbnail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #72767d;
}

.thumbnail-placeholder i {
    font-size: 1.5rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .editor-container-modal {
        grid-template-columns: 1fr;
        max-height: 95vh;
    }
    
    .editor-right {
        display: none; /* Hide preview on smaller screens */
    }
}

@media (max-width: 1306px) {
    /* Mobile Profile Avatar Fix */
    .nav-menu .mobile-auth-buttons .profile-section .profile-avatar,
    .nav-menu .mobile-auth-buttons .profile-avatar {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        margin: 0 !important;
        padding: 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .nav-menu .mobile-auth-buttons .profile-section .profile-avatar img,
    .nav-menu .mobile-auth-buttons .profile-avatar img,
    .nav-menu .mobile-auth-buttons .profile-section .profile-avatar .avatar-img,
    .nav-menu .mobile-auth-buttons .profile-avatar .avatar-img {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
    }
    
    .server-management-header {
        top: 70px;
        padding: 0 1rem;
        height: 70px;
        min-height: 70px;
        max-height: 70px;
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
        margin-top: 0;
        margin-bottom: 0;
    }
    
    .header-left {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        width: auto;
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }
    
    .back-btn {
        padding: 0;
        min-width: 40px;
        width: 40px;
        height: 40px;
        max-height: 40px;
        justify-content: center;
        font-size: 0;
    }

    .back-btn i {
        font-size: 1rem;
        margin: 0;
    }

    .back-btn span,
    .back-btn::after {
        display: none !important;
    }
    
    .breadcrumb {
        font-size: 0.875rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: calc(100vw - 120px);
    }

    .breadcrumb span:not(.breadcrumb-separator) {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 150px;
    }
    
    .commands-container {
        padding-top: 150px;
    }
    
    .commands-header h1 {
        font-size: 2rem;
    }
    
    .stats-overview {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        max-width: 100%;
    }
    
    .stat-card {
        padding: 1rem 0.75rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .stat-info h3 {
        font-size: 1.5rem;
        margin-bottom: 0.125rem;
    }
    
    .stat-info p {
        font-size: 0.7rem;
    }
    
    .actions-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-filter-group {
        flex-direction: column;
        width: 100%;
        max-width: none;
    }
    
    .search-box {
        max-width: none;
    }
    
    .filter-dropdown-wrapper {
        width: 100%;
    }
    
    .filter-dropdown-btn {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-dropdown {
        width: 100%;
        left: 0;
        right: 0;
    }
    
    .commands-grid {
        grid-template-columns: 1fr;
    }
    
    .command-editor-modal {
        padding: 1rem;
    }
    
    .editor-left {
        padding: 1.5rem;
    }
}

/* Moderation Commands Button & Modal */
.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.commands-buttons-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.moderation-commands-btn,
.fun-utils-commands-btn {
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    border: none;
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(88, 101, 242, 0.25);
}

.fun-utils-commands-btn {
    background: linear-gradient(135deg, #43b581 0%, #3aa169 100%);
    box-shadow: 0 2px 8px rgba(67, 181, 129, 0.25);
}

.moderation-commands-btn:hover,
.fun-utils-commands-btn:hover {
    transform: translateY(-2px);
}

.moderation-commands-btn:hover {
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.fun-utils-commands-btn:hover {
    box-shadow: 0 4px 12px rgba(67, 181, 129, 0.4);
}

.moderation-commands-btn i,
.fun-utils-commands-btn i {
    font-size: 1rem;
}

/* Moderation Commands Modal */
.moderation-commands-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.moderation-modal-content {
    background: #1e1e1e;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.moderation-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.1) 0%, rgba(71, 82, 196, 0.1) 100%);
}

.moderation-modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.moderation-modal-title i {
    color: #5865f2;
    font-size: 1.5rem;
}

.moderation-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #b9bbbe;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.moderation-modal-close:hover {
    background: rgba(237, 66, 69, 0.2);
    color: #ed4245;
}

.moderation-modal-body {
    padding: 1.5rem;
    max-height: calc(80vh - 150px);
    overflow-y: auto;
}

.moderation-modal-body::-webkit-scrollbar {
    width: 8px;
}

.moderation-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.moderation-modal-body::-webkit-scrollbar-thumb {
    background: rgba(88, 101, 242, 0.4);
    border-radius: 4px;
}

.moderation-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(88, 101, 242, 0.6);
}

.moderation-modal-description {
    color: #b9bbbe;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid #5865f2;
    border-radius: 4px;
}

.moderation-commands-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mod-command-category {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mod-category-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #5865f2;
    padding-left: 0.5rem;
}

.mod-command-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    user-select: none;
}

.mod-command-item:active:not(.mod-command-wrapper.expanded .mod-command-item) {
    transform: scale(0.98);
}

.mod-command-wrapper.expanded .mod-command-item {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(88, 101, 242, 0.5);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: 2px dashed rgba(88, 101, 242, 0.3);
    margin-bottom: 0.5rem;
}

.mod-command-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(88, 101, 242, 0.4);
    transform: translateX(4px);
}

.mod-command-wrapper.expanded .mod-command-item {
    cursor: default !important;
}

.mod-command-wrapper.expanded .mod-command-item:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.1);
}

.mod-command-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.mod-command-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.125rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.mod-command-wrapper.expanded .mod-command-icon {
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.6), 0 0 40px rgba(88, 101, 242, 0.3);
    transform: scale(1.1);
}

.mod-command-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mod-command-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    transition: all 0.2s ease;
}

.mod-command-wrapper.expanded .mod-command-name {
    color: #5865f2;
    text-shadow: 0 0 10px rgba(88, 101, 242, 0.3);
}

.mod-command-wrapper.expanded .mod-command-name::before {
    content: "⚙️ ";
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.mod-command-description {
    font-size: 0.75rem;
    color: #b9bbbe;
}

/* Toggle Switch */
.mod-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.mod-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mod-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #4f545c;
    transition: 0.3s;
    border-radius: 34px;
}

.mod-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .mod-toggle-slider {
    background-color: #5865f2;
}

input:checked + .mod-toggle-slider:before {
    transform: translateX(20px);
}

.mod-toggle-slider:hover {
    box-shadow: 0 0 8px rgba(88, 101, 242, 0.4);
}

/* Responsive */
@media (max-width: 1306px) {
    .header-top {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .commands-buttons-group {
        flex-direction: column;
        width: 100%;
    }
    
    .moderation-commands-btn,
    .fun-utils-commands-btn {
        width: 100%;
        justify-content: center;
    }
    
    .moderation-modal-content {
        max-width: 95%;
        margin: 1rem;
    }
    
    .mod-command-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .mod-toggle-switch {
        align-self: flex-end;
    }
}

/* Moderation Command Permissions */
.mod-command-wrapper {
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    border-radius: 12px;
}

.mod-command-wrapper.expanded {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.08), rgba(71, 82, 196, 0.04));
    border: 2px solid rgba(88, 101, 242, 0.4);
    padding: 0.75rem;
    box-shadow: 0 8px 32px rgba(88, 101, 242, 0.25), 0 0 0 1px rgba(88, 101, 242, 0.1);
}

.mod-command-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mod-permissions-btn {
    background: rgba(88, 101, 242, 0.15);
    border: 1px solid rgba(88, 101, 242, 0.3);
    color: #5865f2;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    pointer-events: none;
    position: relative;
}

.mod-permissions-btn::after {
    content: "▼";
    font-size: 0.65rem;
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
}

.mod-command-wrapper.expanded .mod-permissions-btn::after {
    transform: rotate(180deg);
}

.mod-permissions-btn:hover {
    background: rgba(88, 101, 242, 0.25);
    border-color: rgba(88, 101, 242, 0.5);
    transform: translateY(-1px);
}

.mod-permissions-btn i {
    font-size: 0.875rem;
}

.mod-permissions-btn .role-count {
    font-size: 0.7rem;
    opacity: 0.8;
}

.mod-permissions-panel {
    margin-top: 0;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 0 0 8px 8px;
    border: none;
    border-top: 2px solid rgba(88, 101, 242, 0.15);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 1000px;
    }
}

.permissions-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #5865f2;
    margin-bottom: 1rem;
}

.permissions-option {
    margin-bottom: 1rem;
}

.permissions-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.permissions-checkbox:hover {
    background: rgba(255, 255, 255, 0.05);
}

.permissions-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.permissions-divider {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 1rem 0 0.75rem 0;
    padding-left: 0.5rem;
    border-left: 2px solid rgba(88, 101, 242, 0.3);
}

.permissions-roles {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.permissions-roles::-webkit-scrollbar {
    width: 6px;
}

.permissions-roles::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.permissions-roles::-webkit-scrollbar-thumb {
    background: rgba(88, 101, 242, 0.4);
    border-radius: 3px;
}

.role-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 0.8125rem;
}

.role-checkbox:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.05);
}

.role-checkbox.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.role-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.role-checkbox.disabled input[type="checkbox"] {
    cursor: not-allowed;
}

.role-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.permissions-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
}

.permissions-save-btn {
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    border: none;
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.permissions-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.permissions-save-btn i {
    font-size: 0.875rem;
}

/* Permission Tabs Navigation */
.permissions-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.permissions-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px 8px 0 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
}

.permissions-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.permissions-tab.active {
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

.permissions-tab i {
    font-size: 1rem;
}

.permissions-tab-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.25rem;
}

.permissions-tab.active .permissions-tab-badge {
    background: rgba(255, 255, 255, 0.25);
}

/* Permission Tab Content */
.permissions-tab-content {
    display: none;
}

.permissions-tab-content.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Permission Section Styling */
.permissions-section-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 1.5rem 0;
}

.permissions-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.permissions-section-title i {
    font-size: 1rem;
    color: var(--primary-color);
}

.channel-icon {
    font-size: 0.875rem;
    color: #72767d;
    font-weight: 600;
    margin-right: 0.25rem;
}

.channel-icon-fa {
    font-size: 0.8rem;
    color: #72767d;
    width: 1.1em;
    margin-right: 0.35rem;
    flex-shrink: 0;
}

/* Selected Items Pills */
.selected-items-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    min-height: 2.5rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.selected-items-container.empty {
    justify-content: center;
    align-items: center;
}

.empty-state {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-style: italic;
}

.selected-item-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.2), rgba(71, 82, 196, 0.2));
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.selected-item-pill:hover {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.3), rgba(71, 82, 196, 0.3));
    border-color: rgba(88, 101, 242, 0.5);
    transform: translateY(-1px);
}

.selected-item-pill .role-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.selected-item-pill .remove-icon {
    color: #ff6b6b;
    font-size: 0.875rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.selected-item-pill:hover .remove-icon {
    opacity: 1;
}

/* Improved Role/Channel List */
.permissions-roles {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.role-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.role-checkbox:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(88, 101, 242, 0.5);
    transform: translateX(4px);
}

.role-checkbox.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.role-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #5865f2;
}

.role-checkbox input[type="checkbox"]:checked {
    accent-color: #43b581;
}

/* Responsive für Permissions */
@media (max-width: 1306px) {
    .mod-command-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .mod-permissions-btn {
        flex: 1;
    }
    
    .permissions-roles {
        max-height: 150px;
    }
}

/* Moderation Modal Footer */
.moderation-modal-footer {
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.deploy-commands-btn {
    background: linear-gradient(135deg, #43b581 0%, #3aa169 100%);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(67, 181, 129, 0.3);
}

.deploy-commands-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 181, 129, 0.4);
}

.deploy-commands-btn:disabled {
    cursor: not-allowed;
}

.deploy-commands-btn i {
    font-size: 1rem;
}

.deploy-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.deploy-status i {
    font-size: 1rem;
}

@media (max-width: 1306px) {
    .moderation-modal-footer {
        flex-direction: column;
        padding: 1rem;
    }
    
    .deploy-commands-btn {
        width: 100%;
        justify-content: center;
    }
}

