/* Tickets 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;
}

/* Navigation */
/* =============================================
   NAVIGATION STYLES - REMOVED
   These are now provided by /styles.css
   Keeping them would override the global navigation styles
   ============================================= */

/* Old navigation styles removed - using /styles.css instead */

/* Profile Section */
.profile-section {
    position: relative;
}

.profile-avatar {
    cursor: pointer;
}

.avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.profile-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.profile-menu.show,
.profile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.menu-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.profile-info {
    display: flex;
    flex-direction: column;
}

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

.discriminator {
    color: #b9bbbe;
    font-size: 0.875rem;
}

.profile-actions {
    padding: 0.5rem;
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: #b9bbbe;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.profile-link:hover {
    background: rgba(15, 15, 15, 0.5);
    color: #fff;
}

.profile-link i {
    width: 20px;
}

/* Login Button */
.login-btn {
    background: #5865f2;
    color: #fff;
    border: none;
    padding: 0.625rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.login-btn:hover {
    background: #4752c4;
    transform: translateY(-2px);
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1006;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.3s ease;
    outline: none;
}

.lang-btn:hover {
    background: #2a2a2a;
}

.lang-btn:focus,
.lang-btn:focus-visible,
.lang-btn:active {
    outline: none;
    box-shadow: none;
}

.language-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    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;
    min-width: 180px;
    padding: 0.5rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding: 0.5rem;
}

.language-menu.show,
.language-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.3s ease;
    color: #b9bbbe;
}

.lang-option:hover {
    background: rgba(15, 15, 15, 0.5);
    color: #fff;
}

/* Server Dropdown Section */
.server-section {
    position: relative;
    margin-left: 1rem;
    display: none;
}

.server-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(114, 137, 218, 0.1);
    border: 2px solid #7289da;
    border-radius: 8px;
    color: #7289da;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.server-dropdown-btn:hover {
    background: rgba(114, 137, 218, 0.2);
    border-color: #677bc4;
    box-shadow: 0 0 15px rgba(114, 137, 218, 0.3);
}

.server-dropdown-btn i:last-child {
    font-size: 10px;
    transition: transform 0.3s ease;
}

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

.server-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    min-width: 280px;
    max-width: 320px;
    background: rgba(15, 15, 15, 0.3);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10001;
    margin-top: 10px;
    max-height: none;
    overflow-x: hidden;
    overflow-y: visible;
}

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

.server-dropdown-list {
    padding: 8px 0;
    max-height: calc(100vh - 6.5rem);
    max-height: calc(100dvh - 6.5rem);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    color-scheme: dark;
    scrollbar-color: #45454e #121214;
}

.server-dropdown-list::-webkit-scrollbar {
    width: 8px;
}

.server-dropdown-list::-webkit-scrollbar-corner {
    background: #121214;
}

.server-dropdown-list::-webkit-scrollbar-track {
    background: #121214;
    border-radius: 8px;
}

.server-dropdown-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4a4a54 0%, #3a3a42 100%);
    border-radius: 8px;
    border: 2px solid #121214;
    min-height: 40px;
}

.server-dropdown-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5c5c66 0%, #484850 100%);
}

.server-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #ffffff;
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-size: 14px;
    cursor: pointer;
}

.server-dropdown-item:hover {
    background-color: rgba(15, 15, 15, 0.5);
}

.server-dropdown-item.add-server {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #7289da;
    font-weight: 600;
}

.server-dropdown-item.add-server:hover {
    background-color: rgba(114, 137, 218, 0.1);
}

.server-dropdown-item i {
    width: 20px;
    text-align: center;
    color: #99aab5;
}

.server-dropdown-item.add-server i {
    color: #7289da;
}

.server-dropdown-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.server-dropdown-empty {
    padding: 16px;
    text-align: center;
    color: #99aab5;
    font-size: 13px;
}

.server-dropdown-empty i {
    display: block;
    margin-bottom: 8px;
    font-size: 24px;
    opacity: 0.5;
}

.server-dropdown-loading {
    padding: 24px 16px;
    text-align: center;
    color: #99aab5;
    font-size: 13px;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #23272a;
    border-top-color: #7289da;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Hamburger Menu - REMOVED to use global styles from /styles.css */
/* .hamburger and .hamburger span styles are now in /styles.css */

/* Notification Container */
.notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
}

/* Editor Container */
.editor-container {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

/* 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);
    z-index: 999;
    box-sizing: border-box;
    overflow: hidden;
}

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

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    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;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    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;
    font-size: 1.125rem;
    height: 100%;
    max-height: 70px;
    overflow: hidden;
    line-height: 1;
}

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

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

/* Main Content */
.main-content {
    padding: 2rem;
    padding-top: 80px; /* Space for fixed server-management-header */
    min-height: calc(100vh - 160px);
    position: relative;
}

/* Content Wrapper */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

/* Tickets Overview */
.tickets-overview {
    max-width: 1200px;
    margin: 0 auto;
}

.overview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 2rem;
}

.overview-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.overview-title p {
    color: #b9bbbe;
    font-size: 1rem;
}

/* Content Placeholder */
.content-placeholder {
    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: 4rem 2rem;
    text-align: center;
    margin-top: 2rem;
}

.content-placeholder i {
    font-size: 4rem;
    margin-bottom: 2rem;
    display: block;
}

.content-placeholder h2 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.content-placeholder p {
    color: #99aab5;
    font-size: 1rem;
}

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

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

.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;
}

/* Notifications */
.notification {
    background: rgba(15, 15, 15, 0.3);
    backdrop-filter: var(--kynx-blur);
    -webkit-backdrop-filter: var(--kynx-blur);
    border-left: 4px solid #5865f2;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.notification-success {
    border-color: #43b581;
}

.notification-error {
    border-color: #ed4245;
}

.notification-warning {
    border-color: #faa61a;
}

.notification-info {
    border-color: #5865f2;
}

.notification i {
    font-size: 1.25rem;
}

.notification-success i {
    color: #43b581;
}

.notification-error i {
    color: #ed4245;
}

.notification-warning i {
    color: #faa61a;
}

.notification-info i {
    color: #5865f2;
}

.notification span {
    color: #fff;
    font-weight: 500;
}

.notification.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Mobile Responsive */
@media (max-width: 1306px) {
    /* navbar-container, hamburger, nav-menu styles REMOVED - using /styles.css */
    
    /* 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;
    }
    
    .editor-container {
        margin-top: 60px;
    }

    .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;
    }

    .header-right {
        width: auto;
        justify-content: flex-end;
        flex-shrink: 0;
    }

    .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;
    }

    .main-content {
        padding: 1rem;
        padding-top: 150px;
        min-height: 400px;
    }

    .language-switcher {
        position: absolute;
        right: 60px;
        top: 50%;
        transform: translateY(-50%);
}

.overview-header {
        flex-direction: column;
        align-items: stretch;
}

.overview-title h2 {
        font-size: 1.5rem;
    }

    .content-placeholder {
        padding: 2rem 1rem;
    }

    .content-placeholder i {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .content-placeholder h2 {
        font-size: 1.25rem;
    }
}

/* ==================== TICKET SYSTEM SPECIFIC STYLES ==================== */

/* Overview Header Buttons */
.header-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.refresh-channels-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);
    color: #b9bbbe;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.refresh-channels-btn:hover {
    background: rgba(15, 15, 15, 0.4);
    color: #5865f2;
    border-color: #5865f2;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.2);
}

.refresh-channels-btn i {
    font-size: 1.125rem;
}

/* Add Channel Button */
.add-channel-btn {
    background: linear-gradient(135deg, #5865f2, #7289da);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    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;
    font-family: 'Inter', sans-serif;
}

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

.add-channel-btn i {
    font-size: 1.125rem;
}

/* Add Channel Button Large (for empty state) */
.add-channel-btn-large {
    background: linear-gradient(135deg, #5865f2, #7289da);
    color: #fff;
    border: none;
    padding: 1.25rem 2.5rem;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
    margin-top: 1.5rem;
    font-family: 'Inter', sans-serif;
}

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

.add-channel-btn-large i {
    font-size: 1.25rem;
}

/* Channel List */
.channel-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.channel-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: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.channel-card:hover {
    background: rgba(15, 15, 15, 0.4);
    border-color: #5865f2;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.3);
}

.channel-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;
}

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

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

.channel-card-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;
}

.channel-card-info {
    flex: 1;
}

.channel-card-info h3 {
    color: #fff;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.channel-card-info span {
    color: #b9bbbe;
    font-size: 0.875rem;
}

.channel-card-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #b9bbbe;
    font-size: 0.875rem;
}

.stat-item i {
    color: #5865f2;
}

/* Delete Channel Button */
.delete-channel-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 8px;
    color: #ff4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.channel-card:hover .delete-channel-btn {
    opacity: 1;
}

.delete-channel-btn:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.5);
    transform: scale(1.1);
}

.delete-channel-btn i {
    font-size: 0.875rem;
}

/* Edit Channel Button */
.edit-channel-btn {
    position: absolute;
    top: 0.75rem;
    right: 3rem;
    width: 32px;
    height: 32px;
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: 8px;
    color: #5865f2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.channel-card:hover .edit-channel-btn {
    opacity: 1;
}

.edit-channel-btn:hover {
    background: rgba(88, 101, 242, 0.2);
    border-color: rgba(88, 101, 242, 0.5);
    transform: scale(1.1);
}

.edit-channel-btn i {
    font-size: 0.875rem;
}

/* Channel Detail View */
.channel-detail-view {
    max-width: 1400px;
    margin: 0 auto;
}

.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #3a3a3a;
    flex-wrap: wrap;
}

.back-to-overview-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.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.back-to-overview-btn:hover {
    background: rgba(15, 15, 15, 0.4);
    color: #fff;
    border-color: #5865f2;
}

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

.channel-info-header {
    flex: 1;
}

.channel-info-header h2 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 0.25rem;
}

.channel-id-badge {
    background: rgba(88, 101, 242, 0.1);
    color: #5865f2;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
    display: inline-block;
}

.detail-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.detail-header-actions .save-btn,
.detail-header-actions .deploy-btn {
    flex: 1;
    min-width: 0;
    padding: 0.625rem 1rem !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    height: auto !important;
    box-sizing: border-box !important;
}

.deploy-btn {
    background: linear-gradient(135deg, #43b581, #3ca374);
    border: none;
    border-radius: 8px;
    color: #fff;
    padding: 0.625rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.deploy-btn:hover {
    background: linear-gradient(135deg, #3ca374, #43b581);
    box-shadow: 0 4px 12px rgba(67, 181, 129, 0.4);
    transform: translateY(-1px);
}

.channel-icon {
    width: 56px;
    height: 56px;
    background: rgba(88, 101, 242, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5865f2;
    font-size: 1.75rem;
}

.channel-name-container h3 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.channel-id {
    color: #72767d;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
}

/* Channel Actions */
.channel-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.action-btn {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: #fff;
    padding: 0.625rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

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

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

.save-btn {
    background: linear-gradient(135deg, #5865f2, #7289da);
    border: none;
    border-radius: 8px;
    color: #fff;
    padding: 0.625rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    border-color: transparent;
}

.save-btn:hover {
    background: linear-gradient(135deg, #4752c4, #5865f2);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.publish-btn {
    background: linear-gradient(135deg, #43b581, #3ca374);
    border-color: transparent;
}

.publish-btn:hover {
    background: linear-gradient(135deg, #3ca374, #43b581);
    box-shadow: 0 4px 12px rgba(67, 181, 129, 0.4);
}

.delete-btn {
    background: linear-gradient(135deg, #ed4245, #c03537);
    border-color: transparent;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #c03537, #ed4245);
    box-shadow: 0 4px 12px rgba(237, 66, 69, 0.4);
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.tab-button,
.tab-btn {
    background: none;
    border: none;
    color: #b9bbbe;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-button:hover,
.tab-btn:hover {
    color: #fff;
    background: rgba(88, 101, 242, 0.1);
}

.tab-button.active,
.tab-btn.active {
    color: #5865f2;
    border-bottom-color: #5865f2;
}

.tab-button i,
.tab-btn i {
    font-size: 1.125rem;
}

/* Tab Content */
.tab-content {
    margin-top: 2rem;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

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

/* Split View & Panels */
.split-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.config-panel,
.advanced-panel {
    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: 2rem;
}

.config-panel h3,
.advanced-panel h3 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.editor-description {
    color: #b9bbbe;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Split Editor View (backwards compatibility) */
.split-editor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.editor-panel {
    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: 1.5rem;
}

.editor-panel h3,
.preview-panel h3 {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 1rem;
    font-weight: 600;
}

.preview-panel {
    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: 1.5rem;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-header h4 {
    font-size: 1.125rem;
    color: #fff;
    font-weight: 600;
}

.panel-header i {
    color: #5865f2;
    font-size: 1.25rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: #b9bbbe;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: #5865f2;
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea,
.form-input,
.form-textarea,
.form-select {
    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: 8px;
    color: #fff;
    padding: 0.75rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.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-group small {
    display: block;
    color: #72767d;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.form-group .required {
    color: #ed4245;
}

.form-group textarea,
.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input[type="color"],
.color-picker {
    height: 48px;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 8px;
}

/* Form Section */
.form-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.form-section h4 {
    font-size: 1.125rem;
    color: #fff;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h4 i {
    color: #5865f2;
}

/* Color Input Group */
.color-input-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.color-input-group input[type="color"] {
    width: 60px;
    flex-shrink: 0;
}

.color-input-group input[type="text"] {
    flex: 1;
}

/* Button Style Selector */
.button-style-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.style-option {
    background: #2a2a2a;
    border: 2px solid #3a3a3a;
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #b9bbbe;
    font-weight: 500;
}

.style-option:hover {
    border-color: #5865f2;
    background: #323232;
}

.style-option.active {
    border-color: #5865f2;
    background: rgba(88, 101, 242, 0.1);
    color: #5865f2;
}

.style-option.primary {
    color: #5865f2;
}

.style-option.success {
    color: #43b581;
}

.style-option.danger {
    color: #ed4245;
}

.style-option.secondary {
    color: #b9bbbe;
}

/* Role List */
.role-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.role-badge .role-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.role-badge .remove-role {
    background: none;
    border: none;
    color: #ed4245;
    cursor: pointer;
    padding: 0;
    margin-left: 0.5rem;
    transition: all 0.2s ease;
}

.role-badge .remove-role:hover {
    transform: scale(1.2);
}

/* Settings Section */
.settings-section {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-section h4 {
    font-size: 1.125rem;
    color: #fff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-section h4 i {
    color: #5865f2;
}

/* Role Selector */
.role-selector {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.role-item {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.role-item:hover {
    background: #323232;
    border-color: #5865f2;
}

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

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

.role-name {
    color: #fff;
    font-weight: 500;
    flex: 1;
}

/* Discord Chat Preview */
.discord-chat-container {
    max-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;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.discord-chat-header {
    background: transparent;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.channel-info-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-weight: 600;
}

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

.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.5rem;
}

.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.25rem;
    border-radius: 3px;
}

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

.message-text {
    color: #dcddde;
    font-size: 1rem;
    line-height: 1.375;
}

/* Discord Preview Container */
.discord-preview {
    background: #36393f;
    border-radius: 12px;
    padding: 1.5rem;
    overflow: hidden;
}

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

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

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

.discord-content {
    flex: 1;
}

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

.discord-username {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

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

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

.discord-buttons {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.preview-embed {
    background: #2f3136;
    border-left: 4px solid #5865f2;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.embed-color-bar {
    width: 4px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    background: #5865f2;
}

.embed-preview {
    position: relative;
    padding-left: 1rem;
}

/* Discord Embed Preview */
.discord-embed {
    background: #2f3136;
    border-left: 4px solid #5865f2;
    border-radius: 4px;
    padding: 0;
    margin-top: 0.5rem;
    max-width: 520px;
    position: relative;
    display: flex;
}

.embed-content {
    flex: 1;
    padding: 0.75rem 1rem;
}

.embed-title {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.embed-description {
    color: #dcddde;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.embed-footer {
    color: #b9bbbe;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.embed-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    object-fit: cover;
    margin-left: 1rem;
    float: right;
}

.embed-image {
    width: 100%;
    max-width: 400px;
    border-radius: 4px;
    margin-top: 1rem;
}

/* Image Upload Area */
.image-upload-area {
    padding: 1rem;
    border: 2px dashed #3a3a3a;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

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

.upload-btn {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    color: #b9bbbe;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-btn:hover {
    background: #323232;
    border-color: #5865f2;
    color: #5865f2;
}

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

.image-preview {
    position: relative;
    margin-top: 1rem;
    display: inline-block;
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid #3a3a3a;
}

.remove-image-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    background: #ed4245;
    border: 2px solid #1a1a1a;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-image-btn:hover {
    background: #c03537;
    transform: scale(1.1);
}

.remove-image-btn i {
    font-size: 0.75rem;
}

/* Discord Button Preview */
.discord-btn {
    background: #4f545c;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.17s ease;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.discord-btn:hover {
    background: #5d6269;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: #5865f2;
}

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

.btn-success {
    background: #3ba55c;
}

.btn-success:hover {
    background: #2d7d46;
}

.btn-secondary {
    background: #4f545c;
}

.btn-secondary:hover {
    background: #5d6269;
}

.btn-danger {
    background: #ed4245;
}

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

/* Checkbox Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #3a3a3a;
    transition: 0.4s;
    border-radius: 24px;
}

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

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

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Setting Toggle */
.setting-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    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: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.setting-toggle:hover {
    background: rgba(15, 15, 15, 0.4);
    border-color: #5865f2;
}

.setting-toggle-info h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.setting-toggle-info p {
    color: #b9bbbe;
    font-size: 0.875rem;
}

.setting-content {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    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: 8px;
}

/* Ticket Button Preview */
.ticket-button {
    background: #43b581;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    transition: all 0.17s ease;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.ticket-button:hover {
    background: #3ca374;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(67, 181, 129, 0.3);
}

.ticket-button.primary {
    background: #5865f2;
}

.ticket-button.primary:hover {
    background: #4752c4;
}

.ticket-button.secondary {
    background: #4f545c;
}

.ticket-button.secondary:hover {
    background: #5d6269;
}

.ticket-button.danger {
    background: #ed4245;
}

.ticket-button.danger:hover {
    background: #c03537;
}

/* Modal Styles (für Add/Edit Channel) */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    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: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.modal-header h3 i {
    color: #5865f2;
}

.modal-close,
.modal-close-btn {
    background: none;
    border: none;
    color: #b9bbbe;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0.5rem;
}

.modal-close:hover,
.modal-close-btn:hover {
    color: #fff;
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.modal-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);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.modal-btn:hover {
    background: rgba(15, 15, 15, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.modal-btn-primary {
    background: linear-gradient(135deg, #5865f2, #7289da);
    border-color: transparent;
}

.modal-btn-primary:hover {
    background: linear-gradient(135deg, #4752c4, #5865f2);
}

/* Channel Selector Modal */
.channel-search {
    position: relative;
    margin-bottom: 1.5rem;
}

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

.channel-search input {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    padding: 0.875rem 1rem 0.875rem 3rem;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

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

.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #3a3a3a #1a1a1a;
}

.channels-grid::-webkit-scrollbar {
    width: 8px;
}

.channels-grid::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.channels-grid::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 4px;
}

.channels-grid::-webkit-scrollbar-thumb:hover {
    background: #5865f2;
}

.channel-option {
    background: #1a1a1a;
    border: 2px solid #3a3a3a;
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.channel-option:hover {
    background: #252525;
    border-color: #5865f2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.2);
}

.channel-option i {
    color: #72767d;
    font-size: 1.25rem;
    min-width: 20px;
}

.channel-option span {
    color: #fff;
    font-weight: 500;
    font-size: 0.95rem;
}

.loading-channels {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3rem;
    color: #b9bbbe;
}

.loading-channels .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #3a3a3a;
    border-top-color: #5865f2;
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
}

.no-channels {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #72767d;
}

.no-channels i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Loading States */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Responsive - Mobile */
@media (max-width: 1306px) {
    .split-editor,
    .split-view {
        grid-template-columns: 1fr;
    }

    .editor-panel,
    .preview-panel {
        position: static;
    }

    .channel-list {
        grid-template-columns: 1fr;
    }

    .detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .channel-actions,
    .detail-header-actions {
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
    }

    .channel-info-header h2 {
        font-size: 1.25rem;
    }

    .tab-navigation {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.25rem;
    }

    .tab-button,
    .tab-btn {
        white-space: nowrap;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .tab-button span,
    .tab-btn span {
        display: none;
    }

    .button-style-selector {
        grid-template-columns: 1fr;
    }

    .overview-header {
    flex-direction: column;
        align-items: stretch;
    }

    .header-buttons {
        width: 100%;
        justify-content: flex-end;
    }

    .add-channel-btn span {
        display: none;
    }

    .add-channel-btn {
        width: 48px;
    padding: 0;
    justify-content: center;
    }

    .channels-grid {
        grid-template-columns: 1fr;
        max-height: 300px;
    }

    .modal-content {
        width: 95%;
    padding: 1.5rem;
}

    .modal-header h3 {
        font-size: 1.25rem;
    }

    .server-dropdown {
        right: auto;
        left: 0;
        min-width: 250px;
    }

    .config-panel,
    .advanced-panel {
        padding: 1.5rem;
    }

    .form-section {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
}

/* ==================== ADDITIONAL MISSING STYLES ==================== */

/* Button Row Styles */
.button-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Add Role/Ping Role Buttons */
.add-role-btn,
.add-ping-role-btn {
    background: rgba(88, 101, 242, 0.1);
    border: 2px dashed #5865f2;
    color: #5865f2;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.add-role-btn:hover,
.add-ping-role-btn:hover {
    background: rgba(88, 101, 242, 0.2);
    transform: translateY(-2px);
}

/* Scrollbar Styles */
.role-list::-webkit-scrollbar,
.channels-grid::-webkit-scrollbar {
    width: 8px;
}

.role-list::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.role-list::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 4px;
}

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

/* Preview Tab Styles */
.preview-container {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 2rem;
}

.preview-container h3 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1.5rem;
}

/* Advanced Settings Toggles */
.advanced-settings {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.setting-item {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 1.5rem;
}

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

.setting-header h4 {
    font-size: 1.125rem;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting-header h4 i {
    color: #5865f2;
}

.setting-header p {
    color: #b9bbbe;
    font-size: 0.875rem;
    margin: 0.5rem 0 0 0;
}

/* Checkbox Styles */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #5865f2;
}

/* Help Text */
.help-text {
    color: #72767d;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: block;
}

/* Info Box */
.info-box {
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid #5865f2;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.info-box i {
    color: #5865f2;
    margin-right: 0.5rem;
}

.info-box p {
    color: #b9bbbe;
    margin: 0;
    font-size: 0.9rem;
}

/* Warning Box */
.warning-box {
    background: rgba(250, 166, 26, 0.1);
    border: 1px solid #faa61a;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.warning-box i {
    color: #faa61a;
    margin-right: 0.5rem;
}

.warning-box p {
    color: #b9bbbe;
    margin: 0;
    font-size: 0.9rem;
}

/* Success Box */
.success-box {
    background: rgba(67, 181, 129, 0.1);
    border: 1px solid #43b581;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.success-box i {
    color: #43b581;
    margin-right: 0.5rem;
}

.success-box p {
    color: #b9bbbe;
    margin: 0;
    font-size: 0.9rem;
}

/* Error Box */
.error-box {
    background: rgba(237, 66, 69, 0.1);
    border: 1px solid #ed4245;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.error-box i {
    color: #ed4245;
    margin-right: 0.5rem;
}

.error-box p {
    color: #b9bbbe;
    margin: 0;
    font-size: 0.9rem;
}

/* Divider */
.divider {
    height: 1px;
    background: #2a2a2a;
    margin: 2rem 0;
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: rgba(88, 101, 242, 0.2);
    color: #5865f2;
}

.badge-success {
    background: rgba(67, 181, 129, 0.2);
    color: #43b581;
}

.badge-warning {
    background: rgba(250, 166, 26, 0.2);
    color: #faa61a;
}

.badge-danger {
    background: rgba(237, 66, 69, 0.2);
    color: #ed4245;
}

.badge-secondary {
    background: rgba(185, 187, 190, 0.2);
    color: #b9bbbe;
}

/* Disabled State */
.disabled,
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* Hidden Elements */
.hidden {
    display: none !important;
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: #72767d;
}

.text-primary {
    color: #5865f2;
}

.text-success {
    color: #43b581;
}

.text-danger {
    color: #ed4245;
}

.text-warning {
    color: #faa61a;
}

/* Margin Utilities */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Padding Utilities */
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Flex Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* Width Utilities */
.w-full {
    width: 100%;
}

.w-auto {
    width: auto;
}

/* ==================== DISCORD CHAT PREVIEW (INLINE EDITOR) ==================== */

.discord-chat-container {
    max-width: 900px;
    margin: 2rem auto;
    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;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.discord-chat-header {
    background: transparent;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.channel-info-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-weight: 600;
}

.channel-info-header i {
    color: #72767d;
}

.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.25rem;
    border-radius: 3px;
}

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

.message-text {
    color: #dcddde;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    min-height: 1.5rem;
    outline: none;
    padding: 0.25rem 0;
}

.message-text:empty:before {
    content: attr(placeholder);
    color: #72767d;
}

.message-text:focus {
    background: rgba(79, 84, 92, 0.16);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
}

.message-text-wrapper {
    position: relative;
    margin-bottom: 0.5rem;
}

.message-emoji-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: transparent;
    border: none;
    color: #b9bbbe;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 1.125rem;
    transition: color 0.2s;
    z-index: 1;
}

.message-emoji-btn:hover {
    color: #dcddde;
}

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

.inline-embed-editor.dragging {
    opacity: 0.5;
}

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

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

.embed-drag-handle {
    cursor: grab;
    color: #72767d;
    padding: 0.25rem;
}

.embed-drag-handle:active {
    cursor: grabbing;
}

.embed-color-picker {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
}

.delete-embed-icon {
    background: rgba(237, 66, 69, 0.1);
    border: none;
    color: #ed4245;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.delete-embed-icon:hover {
    background: #ed4245;
    color: #fff;
}

.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;
}

.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 {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #5865f2;
    border-radius: 4px 0 0 4px;
}

.embed-main-content {
    min-width: 0;
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

/* Show in editing mode */
.inline-embed-editor.editing .embed-author-section {
    display: flex;
}

.author-icon-upload,
.footer-icon-upload {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #40444b;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

/* Show in editing mode */
.inline-embed-editor.editing .author-icon-upload,
.inline-embed-editor.editing .footer-icon-upload {
    display: flex;
}

/* Show if has image, even when not editing */
.inline-embed-editor:not(.editing) .author-icon-upload.has-image,
.inline-embed-editor:not(.editing) .footer-icon-upload.has-image {
    display: flex;
}

.inline-embed-editor.editing .author-icon-upload:hover,
.inline-embed-editor.editing .footer-icon-upload:hover {
    background: #5865f2;
}

.inline-embed-editor:not(.editing) .author-icon-upload,
.inline-embed-editor:not(.editing) .footer-icon-upload {
    cursor: default;
    pointer-events: none;
}

.author-icon-upload img,
.footer-icon-upload img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.author-icon-upload i,
.footer-icon-upload i {
    color: #4f545c;
    font-size: 0.75rem;
}

.footer-icon-upload {
    width: 20px;
    height: 20px;
}

.footer-icon-upload i {
    font-size: 0.625rem;
}

/* Embed Inputs */
.embed-title-edit,
.embed-author-input,
.embed-footer-input {
    background: transparent;
    border: 1px solid transparent;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: inherit;
    width: 100%;
    transition: all 0.2s ease;
}

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

.embed-description-edit {
    background: transparent;
    border: 1px solid transparent;
    color: #dcddde;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: inherit;
    width: 100%;
    min-height: 3rem;
    resize: none; /* Verhindert manuelles Vergrößern - nur dynamisch */
    overflow: hidden; /* Verhindert Scrollbar */
    transition: all 0.2s ease;
}

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

/* Input with Emoji */
.input-with-emoji {
    position: relative;
    display: flex;
    align-items: center;
}

.emoji-btn {
    display: none;
    position: absolute;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    background: rgba(79, 84, 92, 0.32);
    border: none;
    border-radius: 4px;
    color: #dcddde;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1.125rem;
}

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

.emoji-btn:hover {
    background: #5865f2;
    transform: scale(1.05);
}

.emoji-btn:active {
    transform: scale(0.95);
}

/* Ensure input fields take full width when emoji button is present */
.input-with-emoji input,
.input-with-emoji textarea {
    flex: 1;
    min-width: 0;
    padding-right: 2.5rem !important;
}

/* Embed Fields */
.embed-fields-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.embed-field {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.embed-field-inputs {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.embed-field input {
    background: transparent;
    border: 1px solid transparent;
    color: #fff;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    width: 100%;
    transition: all 0.2s ease;
}

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

.delete-field-btn {
    background: rgba(237, 66, 69, 0.1);
    border: none;
    color: #ed4245;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.delete-field-btn:hover {
    background: #ed4245;
    color: #fff;
}

/* Add Field Button */
.embed-add-field-btn {
    background: rgba(88, 101, 242, 0.1);
    border: 2px dashed #5865f2;
    color: #5865f2;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    width: 100%;
}

.embed-add-field-btn:hover {
    background: rgba(88, 101, 242, 0.2);
}

/* Image Uploads */
.embed-image-upload {
    position: relative;
    background: #202225;
    border: 2px dashed #2f3136;
    border-radius: 4px;
    min-height: 120px;
    max-width: 100%;
    width: 100%;
    aspect-ratio: 16 / 9;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0.5rem 0;
}

/* Show in editing mode */
.inline-embed-editor.editing .embed-image-upload {
    display: flex;
}

/* Show if has image, even when not editing */
.inline-embed-editor:not(.editing) .embed-image-upload.has-image {
    display: flex;
    border: none;
    min-height: auto;
}

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

.inline-embed-editor:not(.editing) .embed-image-upload {
    cursor: default;
    pointer-events: none;
}

.embed-image-upload img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #72767d;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

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

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

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

/* Show in editing mode */
.inline-embed-editor.editing .embed-thumbnail-upload {
    display: flex;
}

/* Show if has image, even when not editing */
.inline-embed-editor:not(.editing) .embed-thumbnail-upload.has-image {
    display: flex;
    border: none;
}

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

.inline-embed-editor:not(.editing) .embed-thumbnail-upload {
    cursor: default;
    pointer-events: none;
}

.embed-thumbnail-upload img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #72767d;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

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

.image-delete-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: none;
}

.inline-embed-editor.editing .embed-image-upload.has-image .image-delete-btn,
.inline-embed-editor.editing .embed-thumbnail-upload.has-image .image-delete-btn,
.inline-embed-editor.editing .author-icon-upload.has-image .image-delete-btn,
.inline-embed-editor.editing .footer-icon-upload.has-image .image-delete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.inline-embed-editor:not(.editing) .image-delete-btn {
    display: none;
}

.image-delete-btn:hover {
    background: #ed4245;
}

.image-delete-btn.small {
    width: 20px;
    height: 20px;
    font-size: 0.625rem;
    top: 0.25rem;
    right: 0.25rem;
}

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

/* Button Areea */    
.embed-button-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.5rem 0.5rem 0rem;
    margin-top: 0.5rem;
    background: transparent;
    border: none;
}

.buttons-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.add-button-icon {
    background: rgba(88, 101, 242, 0.1);
    border: 2px dashed #5865f2;
    color: #5865f2;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-button-icon:hover {
    background: rgba(88, 101, 242, 0.2);
}

/* Ticket Embed Container */
.ticket-embed-container {
    display: flex;
        flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Ticket Button Styles */  
.embed-buttons-section {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.embed-button {
    background: #4f545c;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: grab;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.17s ease;
    position: relative;
    white-space: nowrap;
    min-width: fit-content;
    height: 36px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-decoration: none;
    user-select: none;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
    border: 1px solid transparent;
}

.embed-button:active {
    cursor: grabbing;
}

.embed-button.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.embed-button.drag-over {
    border-left: 3px solid #5865f2;
}

.embed-button:hover {
    background: #5d6269;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.embed-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.embed-button.primary {
    background: #5865f2;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.embed-button.primary:hover {
    background: #4752c4;
    box-shadow: 0 2px 8px rgba(88, 101, 242, 0.3);
}

.embed-button.secondary {
    background: #4f545c;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.embed-button.secondary:hover {
    background: #5d6269;
    box-shadow: 0 2px 8px rgba(79, 84, 92, 0.3);
}

.embed-button.success {
    background: #3ba55c;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.embed-button.success:hover {
    background: #2d7d46;
    box-shadow: 0 2px 8px rgba(59, 165, 92, 0.3);
}

.embed-button.danger {
    background: #ed4245;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.embed-button.danger:hover {
    background: #c03e3e;
    box-shadow: 0 2px 8px rgba(237, 66, 69, 0.3);
}

.embed-button.warning {
    background: #faa61a;
    color: #000000;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.embed-button.warning:hover {
    background: #e8940f;
    box-shadow: 0 2px 8px rgba(250, 166, 26, 0.3);
}

.embed-button .button-content {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
}

.embed-button .button-icon {
    font-size: 0.875rem;
    flex-shrink: 0;
    line-height: 1;
}

.embed-button .button-text {
    text-align: center;
    white-space: nowrap;
    line-height: 1.2;
    font-weight: 500;
}

.embed-button .button-actions {
    display: none;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

/* Show button actions when button is active (clicked) */
.embed-button.active .button-actions {
    display: flex;
}

.embed-button .button-action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 3px;
    color: #ffffff;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.17s ease;
    opacity: 0.8;
}

.embed-button .button-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transform: scale(1.05);
}

.embed-button .button-action-btn.delete:hover {
    background: #ed4245;
    opacity: 1;
    transform: scale(1.05);
}

.add-button-icon {
    background: #4f545c;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.17s ease;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.add-button-icon:hover {
    background: #5d6269;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(79, 84, 92, 0.3);
}

.add-button-icon i {
    font-size: 0.875rem;
}

/* Modal Overlay Base Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

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

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

/* Button Edit Modal Specific Styles */
#ticket-button-edit-modal .modal-content {
    background: rgba(15, 15, 15, 0.3);
    backdrop-filter: var(--kynx-blur);
    -webkit-backdrop-filter: var(--kynx-blur);
    border-radius: 8px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.3s ease;
}

#ticket-button-edit-modal .modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

#ticket-button-edit-modal .modal-close {
    background: none;
    border: none;
    color: #b9bbbe;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    line-height: 1;
}

#ticket-button-edit-modal .modal-close:hover {
    color: #ffffff;
}

#ticket-button-edit-modal .modal-body {
    padding: 1.5rem;
}

#ticket-button-edit-modal .form-group {
    margin-bottom: 1rem;
}

#ticket-button-edit-modal .form-group:last-child {
    margin-bottom: 0;
}

#ticket-button-edit-modal .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #b9bbbe;
    font-size: 0.875rem;
    font-weight: 500;
}

#ticket-button-edit-modal .form-group small {
    display: block;
    margin-top: 0.375rem;
    color: #72767d;
    font-size: 0.75rem;
}

#ticket-button-edit-modal input[type="text"],
#ticket-button-edit-modal input[type="url"],
#ticket-button-edit-modal select {
    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);
    color: #dcddde;
    padding: 0.625rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

#ticket-button-edit-modal input[type="text"]:focus,
#ticket-button-edit-modal input[type="url"]:focus,
#ticket-button-edit-modal select:focus {
    outline: none;
    border-color: #5865f2;
}

#ticket-button-edit-modal .button-icon-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#ticket-button-edit-modal .icon-display-btn {
    width: 60px !important;
    height: 60px !important;
    font-size: 2rem;
    background: rgba(15, 15, 15, 0.3);
    backdrop-filter: var(--kynx-blur);
    -webkit-backdrop-filter: var(--kynx-blur);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0 !important;
    position: static !important;
    right: auto !important;
}

#ticket-button-edit-modal .icon-display-btn:hover {
    background: rgba(15, 15, 15, 0.4);
    border-color: #5865f2;
    transform: scale(1.05);
}

#ticket-button-edit-modal .modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

#ticket-button-edit-modal .btn-cancel,
#ticket-button-edit-modal .btn-save {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

#ticket-button-edit-modal .btn-cancel {
    background: transparent;
    color: #b9bbbe;
}

#ticket-button-edit-modal .btn-cancel:hover {
    background: rgba(15, 15, 15, 0.4);
    color: #ffffff;
}

#ticket-button-edit-modal .btn-save {
    background: #5865f2;
    color: #ffffff;
}

#ticket-button-edit-modal .btn-save:hover {
    background: #4752c4;
}

/* Discord Chat Input (Add Embed Button Area) */
.discord-chat-input {
    background: rgba(15, 15, 15, 0.3);
    backdrop-filter: var(--kynx-blur);
    -webkit-backdrop-filter: var(--kynx-blur);
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    }

.add-embed-button {
    background: linear-gradient(135deg, #5865f2, #7289da);
    border: none;
    color: #fff;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    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 12px rgba(88, 101, 242, 0.3);
}

.add-embed-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
    background: linear-gradient(135deg, #4752c4, #5865f2);
}

.add-embed-button i {
    font-size: 1.25rem;
}

/* Action Buttons (Save, Deploy, etc.) */
.action-btn {
    background: linear-gradient(135deg, #2a2a2a, #3a3a3a);
    border: 1px solid #3a3a3a;
    color: #b9bbbe;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
}

.action-btn:hover {
    background: linear-gradient(135deg, #3a3a3a, #4a4a4a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

.save-btn {
    background: linear-gradient(135deg, #43b581, #3ca374);
    border: 2px solid #43b581;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.85rem 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(67, 181, 129, 0.25);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.save-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.save-btn:hover::before {
    left: 100%;
}

.save-btn:hover {
    background: linear-gradient(135deg, #3ca374, #43b581);
    box-shadow: 0 6px 20px rgba(67, 181, 129, 0.5);
    transform: translateY(-2px);
    border-color: #3ca374;
}

.save-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(67, 181, 129, 0.3);
}

.publish-btn {
    background: linear-gradient(135deg, #5865f2, #7289da);
    border-color: #5865f2;
    color: #fff;
}

.publish-btn:hover {
    background: linear-gradient(135deg, #4752c4, #5865f2);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.deploy-btn {
    background: linear-gradient(135deg, #5865f2, #7289da);
    border-color: #5865f2;
    color: #fff;
}

.deploy-btn:hover {
    background: linear-gradient(135deg, #4752c4, #5865f2);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.delete-btn {
    background: linear-gradient(135deg, #ed4245, #c03537);
    border-color: #ed4245;
    color: #fff;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #c03537, #ed4245);
    box-shadow: 0 4px 12px rgba(237, 66, 69, 0.4);
}

/* MEE6-Style Emoji Picker */
.mee6-emoji-picker {
    background: #2f3136;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid #40444b;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    z-index: 10001;
        position: fixed;
}
.emoji-picker-header {
    background: #36393f;
    padding: 16px 20px;
    border-bottom: 1px solid #40444b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: grab;
    user-select: none;
}
.emoji-picker-header:active {
    cursor: grabbing;
}
.search-container {
    flex: 1;
    position: relative;
    margin-right: 12px;
}
.emoji-picker-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}
.emoji-picker-close {
    background: #40444b;
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #dcddde;
    transition: all 0.2s ease;
}
.emoji-picker-close:hover {
    background: #5865f2;
    color: white;
}
.emoji-picker-close i {
    font-size: 14px;
}
.emoji-search {
    width: 100%;
    background: #40444b;
    border: none;
    border-radius: 4px;
    padding: 8px 12px 8px 36px;
    color: #dcddde;
    font-size: 14px;
    outline: none;
}
.emoji-search::placeholder {
    color: #72767d;
}
.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    opacity: 0.6;
}
.variation-selector {
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}
.variation-selector:hover {
    background: #40444b;
}
.variation-icon {
    width: 24px;
    height: 24px;
    opacity: 0.8;
}
.emoji-picker-main {
    display: flex;
    height: 400px;
}
.emoji-categories-sidebar {
    width: 200px;
    background: #36393f;
    border-right: 1px solid #40444b;
    padding: 16px 16px 16px 12px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 400px;
    scrollbar-width: thin;
    scrollbar-color: #40444b #2f3136;
}
.emoji-categories-sidebar::-webkit-scrollbar {
    width: 6px;
}
.emoji-categories-sidebar::-webkit-scrollbar-track {
    background: #2f3136;
}
.emoji-categories-sidebar::-webkit-scrollbar-thumb {
    background: #40444b;
    border-radius: 3px;
}
.emoji-categories-sidebar::-webkit-scrollbar-thumb:hover {
    background: #5865f2;
}
.server-category {
    padding: 12px 16px;
    margin-bottom: 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #40444b;
}
.server-category:hover {
    background: #40444b;
}
.server-category.active {
    background: #5865f2;
}
.server-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}
.server-name {
    font-size: 13px;
    color: #dcddde;
    font-weight: 600;
    white-space: nowrap;
}
.category-item {
    padding: 12px 16px;
    margin-bottom: 6px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 12px;
}
.category-item:hover {
    background: #40444b;
    opacity: 0.8;
}
.category-item.active {
    background: #5865f2;
    opacity: 1;
}
.category-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    opacity: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}
.category-name {
    color: #dcddde;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}
.emoji-content-area {
    flex: 1;
    background: #2f3136;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.category-header {
    background: #36393f;
    padding: 12px 16px;
    border-bottom: 1px solid #40444b;
}
.category-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dcddde;
    font-weight: 600;
    font-size: 14px;
}
.category-server-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}
.emoji-grid {
    flex: 1;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 8px;
    overflow-y: auto;
}
.emoji-grid-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}
.emoji-grid-item:hover {
    background: #40444b;
}
.emoji-grid-item .emoji {
    width: 32px;
    height: 32px;
    user-select: none;
    -webkit-user-drag: none;
}
.emoji-picker-footer {
    background: #36393f;
    padding: 12px 16px;
    border-top: 1px solid #40444b;
    display: flex;
    align-items: center;
    gap: 12px;
}
.footer-emoji {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.footer-emoji-img {
    width: 32px;
    height: 32px;
}
.footer-text {
    flex: 1;
}
.footer-text p {
    color: #dcddde;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #72767d;
}
.no-results i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}
.no-results p {
    font-size: 16px;
    margin-bottom: 8px;
    color: #dcddde;
}
.no-results small {
    font-size: 14px;
    opacity: 0.7;
}
/* Scrollbar Styling für den Emoji-Picker */
.emoji-grid::-webkit-scrollbar {
    width: 8px;
}
.emoji-grid::-webkit-scrollbar-track {
    background: #2f3136;
}
.emoji-grid::-webkit-scrollbar-thumb {
    background: #40444b;
    border-radius: 4px;
}
.emoji-grid::-webkit-scrollbar-thumb:hover {
    background: #4f545c;
}

.simple-emoji-picker .emoji-grid::-webkit-scrollbar {
    width: 8px;
}

.simple-emoji-picker .emoji-grid::-webkit-scrollbar-track {
    background: #2f3136;
}

.simple-emoji-picker .emoji-grid::-webkit-scrollbar-thumb {
    background: #202225;
    border-radius: 4px;
}

.simple-emoji-picker .emoji-grid::-webkit-scrollbar-thumb:hover {
    background: #40444b;
}

/* Responsive */
@media (max-width: 1306px) {
    .discord-chat-container {
        margin: 1rem;
        border-radius: 8px;
    }

    .discord-messages-area {
        padding: 1rem;
    }
    
    .discord-message {
        gap: 0.5rem;
    }
    
    .message-avatar {
    width: 32px;
    height: 32px;
    }
    
    .discord-chat-input {
        padding: 1rem;
    }

    .add-embed-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }
    
    .action-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    .simple-emoji-picker {
        width: 280px;
    }
    
    .simple-emoji-picker .emoji-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

/* ===================================
   FORMS SYSTEM
   =================================== */

/* Forms Panel */
.forms-panel {
    padding: 2rem;
}

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

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

.add-form-btn {
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

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

.add-form-btn:active {
    transform: translateY(0);
}

/* Forms List */
.forms-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Empty State */
.empty-forms-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background: rgba(15, 15, 15, 0.3);
    backdrop-filter: var(--kynx-blur);
    -webkit-backdrop-filter: var(--kynx-blur);
    border-radius: 12px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

.empty-forms-state i {
    font-size: 4rem;
    color: #72767d;
    margin-bottom: 1rem;
}

.empty-forms-state p {
    font-size: 1.25rem;
    color: #b9bbbe;
    margin: 0.5rem 0;
}

.empty-forms-state .empty-hint {
    font-size: 0.95rem;
    color: #72767d;
}

/* Form Cards */
.form-card {
    background: rgba(15, 15, 15, 0.3);
    backdrop-filter: var(--kynx-blur);
    -webkit-backdrop-filter: var(--kynx-blur);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.form-card:hover {
    border-color: #5865f2;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(88, 101, 242, 0.3);
    background: rgba(15, 15, 15, 0.4);
}

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

.form-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.form-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-card-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.form-field-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #b9bbbe;
}

.form-field-count i {
    color: #72767d;
}

.form-card-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.form-action-btn {
    flex: 1;
    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);
    color: #b9bbbe;
    padding: 0.625rem;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form-action-btn.duplicate:hover {
    background: #7289da;
    color: white;
}

.form-action-btn.edit:hover {
    background: #5865f2;
    color: white;
}

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

/* Form Editor Container - Split View */
.form-editor-container {
    display: flex;
    flex-direction: column;
    width: 98%;
    max-width: 1800px;
    height: 95vh;
    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;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

/* Form Editor Header */
.form-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.form-editor-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.form-editor-header-left h3 {
    margin: 0;
    color: #dcddde;
    font-size: 1.25rem;
    font-weight: 600;
}

.form-editor-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-editor-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Form Editor Header Buttons */
/* Form Fields Section - Integrated into modal */
.form-fields-section {
    margin-top: 1.5rem;
}

.form-fields-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #40444b;
}

.form-fields-label {
    color: #dcddde;
    font-size: 0.9375rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-fields-label::before {
    content: '';
    width: 4px;
    height: 16px;
    background: #5865f2;
    border-radius: 2px;
}

.add-field-inline-btn {
    background: #5865f2;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    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;
}

.add-field-inline-btn:hover {
    background: #4752c4;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(88, 101, 242, 0.3);
}

.btn-close-header,
.btn-save-header {
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-close-header {
    background: transparent;
    color: #b9bbbe;
    border: 1px solid #40444b;
}

.btn-close-header:hover {
    background: #40444b;
    color: #dcddde;
}

.btn-save-header {
    background: linear-gradient(135deg, #43b581 0%, #3da76a 100%);
    color: white;
}

.btn-save-header:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(67, 181, 129, 0.4);
}

/* Form Welcome Embed Section */
.form-welcome-embed-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    padding: 1.5rem;
    background: #2f3136;
    min-width: 0;
}

.welcome-embed-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #dcddde;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #40444b;
}

.welcome-embed-title i {
    color: #5865f2;
}

.welcome-embed-subtitle {
    font-size: 0.85rem;
    font-weight: 400;
    color: #72767d;
    margin-left: auto;
}

.welcome-embed-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Discord Welcome Preview Container */
.discord-welcome-preview {
    background: #36393f;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
    max-width: 100%;
}

.discord-welcome-preview .discord-message {
    display: flex;
    gap: 1rem;
    max-width: 100%;
}

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

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

.discord-welcome-preview .message-content {
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

.discord-welcome-preview .embeds-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

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

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

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

/* Welcome Embed Container - Wider for better visibility */
.welcome-embed-container .inline-embed-editor {
    position: relative;
    max-width: 100%;
    margin-bottom: 0.5rem;
}

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

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

.welcome-embed-container .embed-controls .embed-color-picker {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
}

.welcome-embed-container .embed-controls .delete-embed-icon {
    background: rgba(237, 66, 69, 0.1);
    border: none;
    color: #ed4245;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.welcome-embed-container .embed-controls .delete-embed-icon:hover {
    background: #ed4245;
    color: #fff;
}

.welcome-embed-container .add-embed-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #5865f2;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

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

.welcome-embed-container .discord-embed-live .embed-color-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #5865f2;
    border-radius: 4px 0 0 4px;
}

.welcome-embed-container .embed-main-content {
    min-width: 0;
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Welcome Embed Input Styles - 1:1 copy from ticket embeds */
.welcome-embed-container .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;
}

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

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

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

.welcome-embed-container .author-name-input,
.welcome-embed-container .embed-title-input,
.welcome-embed-container .footer-text-input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 0;
    font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    outline: none;
    width: 100%;
}

.welcome-embed-container .author-name-input {
    font-size: 0.875rem;
}

.welcome-embed-container .embed-title-input {
    font-size: 1rem;
}

.welcome-embed-container .footer-text-input {
    font-size: 0.75rem;
    font-weight: 500;
    color: #b9bbbe;
}

.welcome-embed-container .embed-description-input {
    background: transparent;
    border: none;
    color: #dcddde;
    padding: 0;
    font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.875rem;
    line-height: 1.375;
    outline: none;
    resize: none;
    overflow: hidden;
    min-height: 40px;
    width: 100%;
}

.welcome-embed-container .inline-embed-editor.editing .author-name-input,
.welcome-embed-container .inline-embed-editor.editing .embed-title-input,
.welcome-embed-container .inline-embed-editor.editing .embed-description-input,
.welcome-embed-container .inline-embed-editor.editing .footer-text-input {
    border: 1px solid transparent;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.1);
}

.welcome-embed-container .inline-embed-editor.editing .author-name-input:hover,
.welcome-embed-container .inline-embed-editor.editing .embed-title-input:hover,
.welcome-embed-container .inline-embed-editor.editing .embed-description-input:hover,
.welcome-embed-container .inline-embed-editor.editing .footer-text-input:hover {
    background: rgba(0, 0, 0, 0.2);
    border-color: #202225;
}

.welcome-embed-container .inline-embed-editor.editing .author-name-input:focus,
.welcome-embed-container .inline-embed-editor.editing .embed-title-input:focus,
.welcome-embed-container .inline-embed-editor.editing .embed-description-input:focus,
.welcome-embed-container .inline-embed-editor.editing .footer-text-input:focus {
    background: rgba(0, 0, 0, 0.3);
    border-color: #00b0f4;
}

/* Welcome Embed Sections - 1:1 copy */
.welcome-embed-container .embed-author-section {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.welcome-embed-container .inline-embed-editor.editing .embed-author-section {
    display: flex;
}

/* Show author section if it has content (not in editing mode) */
.welcome-embed-container .inline-embed-editor:not(.editing) .embed-author-section:has(input[value]:not([value=""])),
.welcome-embed-container .inline-embed-editor:not(.editing) .embed-author-section:has(.has-image) {
    display: flex;
}

.welcome-embed-container .embed-footer-section {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.welcome-embed-container .inline-embed-editor.editing .embed-footer-section {
    display: flex;
}

/* Show footer section if it has content (not in editing mode) */
.welcome-embed-container .inline-embed-editor:not(.editing) .embed-footer-section:has(input[value]:not([value=""])),
.welcome-embed-container .inline-embed-editor:not(.editing) .embed-footer-section:has(.has-image) {
    display: flex;
}

.welcome-embed-container .author-icon-upload,
.welcome-embed-container .footer-icon-upload {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #40444b;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.welcome-embed-container .inline-embed-editor.editing .author-icon-upload,
.welcome-embed-container .inline-embed-editor.editing .footer-icon-upload {
    display: flex;
}

.welcome-embed-container .inline-embed-editor:not(.editing) .author-icon-upload.has-image,
.welcome-embed-container .inline-embed-editor:not(.editing) .footer-icon-upload.has-image {
    display: flex;
}

.welcome-embed-container .inline-embed-editor.editing .author-icon-upload:hover,
.welcome-embed-container .inline-embed-editor.editing .footer-icon-upload:hover {
    background: #5865f2;
}

.welcome-embed-container .inline-embed-editor:not(.editing) .author-icon-upload,
.welcome-embed-container .inline-embed-editor:not(.editing) .footer-icon-upload {
    cursor: default;
    pointer-events: none;
}

.welcome-embed-container .author-icon-upload img,
.welcome-embed-container .footer-icon-upload img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.welcome-embed-container .author-icon-upload i,
.welcome-embed-container .footer-icon-upload i {
    color: #4f545c;
    font-size: 0.75rem;
}

.welcome-embed-container .footer-icon-upload {
    width: 20px;
    height: 20px;
}

.welcome-embed-container .footer-icon-upload i {
    font-size: 0.625rem;
}

/* Welcome Embed Thumbnail - 1:1 copy */
.welcome-embed-container .embed-thumbnail-upload {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    background: #202225;
    grid-column: 2;
    grid-row: 1;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.welcome-embed-container .inline-embed-editor.editing .embed-thumbnail-upload {
    display: flex;
}

.welcome-embed-container .inline-embed-editor:not(.editing) .embed-thumbnail-upload.has-image {
    display: flex;
}

.welcome-embed-container .inline-embed-editor.editing .embed-thumbnail-upload:hover {
    background: #2a2d31;
}

.welcome-embed-container .inline-embed-editor:not(.editing) .embed-thumbnail-upload {
    cursor: default;
    pointer-events: none;
}

.welcome-embed-container .embed-thumbnail-upload img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.welcome-embed-container .thumbnail-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #4f545c;
    font-size: 0.625rem;
    text-align: center;
    width: 100%;
    height: 100%;
    padding: 0.5rem;
}

.welcome-embed-container .thumbnail-placeholder i {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

/* Welcome Embed Image - 1:1 copy */
.welcome-embed-container .embed-image-upload {
    width: 100%;
    max-width: 400px;
    min-height: 200px;
    border-radius: 4px;
    background: #202225;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
    transition: all 0.2s ease;
}

.welcome-embed-container .inline-embed-editor.editing .embed-image-upload {
    display: flex;
}

.welcome-embed-container .inline-embed-editor:not(.editing) .embed-image-upload.has-image {
    display: flex;
    min-height: auto;
}

.welcome-embed-container .inline-embed-editor.editing .embed-image-upload:hover {
    background: #2a2d31;
}

.welcome-embed-container .inline-embed-editor:not(.editing) .embed-image-upload {
    cursor: default;
    pointer-events: none;
}

.welcome-embed-container .embed-image-upload img {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.welcome-embed-container .upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #4f545c;
    font-size: 0.75rem;
    text-align: center;
    width: 100%;
    padding: 2rem;
}

.welcome-embed-container .upload-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Welcome Embed Delete Buttons - 1:1 copy */
.welcome-embed-container .image-delete-btn {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: rgba(237, 66, 69, 0.9);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    font-size: 0.75rem;
}

.welcome-embed-container .inline-embed-editor.editing .embed-image-upload.has-image .image-delete-btn,
.welcome-embed-container .inline-embed-editor.editing .embed-thumbnail-upload.has-image .image-delete-btn,
.welcome-embed-container .inline-embed-editor.editing .author-icon-upload.has-image .image-delete-btn,
.welcome-embed-container .inline-embed-editor.editing .footer-icon-upload.has-image .image-delete-btn {
    display: flex;
}

.welcome-embed-container .image-delete-btn:hover {
    background: #ed4245;
    transform: scale(1.05);
}

/* Welcome Embed Color Picker - 1:1 copy */
.welcome-embed-container .embed-color-picker {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.welcome-embed-container .inline-embed-editor.editing .embed-color-picker {
    display: flex;
}

.welcome-embed-container .embed-color-picker label {
    color: #b9bbbe;
    font-size: 0.75rem;
    font-weight: 500;
}

.welcome-embed-container .embed-color-input {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
}

/* Form Editor Sidebar */
.form-editor-sidebar {
    width: 280px;
    background: rgba(15, 15, 15, 0.3);
    backdrop-filter: var(--kynx-blur);
    -webkit-backdrop-filter: var(--kynx-blur);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-editor-sidebar h3 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.add-field-sidebar-btn {
    background: #5865f2;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-field-sidebar-btn:hover {
    background: #4752c4;
}

.form-actions-sidebar {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-cancel-sidebar,
.btn-save-sidebar {
    width: 100%;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-cancel-sidebar {
    background: transparent;
    color: #b9bbbe;
    border: 2px solid #40444b;
}

.btn-cancel-sidebar:hover {
    background: #40444b;
}

.btn-save-sidebar {
    background: linear-gradient(135deg, #43b581 0%, #3da76a 100%);
    color: white;
}

.btn-save-sidebar:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(67, 181, 129, 0.4);
}

/* Discord Modal Preview */
.discord-modal-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 3rem;
    overflow-y: auto;
    min-width: 0;
    overflow-x: hidden;
}

.discord-modal-window {
    background: #36393f;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    animation: modalSlideIn 0.2s ease;
}

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

.discord-modal-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #2f3136;
}

.modal-header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.modal-icon {
    color: #b9bbbe;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.modal-title-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #dcddde;
    font-size: 1.25rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.modal-title-input:hover {
    background: rgba(79, 84, 92, 0.32);
}

.modal-title-input:focus {
    background: #202225;
    color: #ffffff;
    outline: none;
}

.modal-close-preview {
    background: transparent;
    border: none;
    color: #b9bbbe;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.15s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-preview:hover {
    background: #ed4245;
    color: white;
}

/* Discord Modal Body */
.discord-modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-warning-box {
    background: #faa81a1a;
    border-left: 4px solid #faa81a;
    padding: 1rem;
    border-radius: 4px;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.modal-warning-box i {
    color: #faa81a;
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.modal-warning-box span {
    color: #dcddde;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Modal Field Preview (looks like real Discord field) */
.modal-field-preview {
    margin-bottom: 1.25rem;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0.25rem;
    margin: -0.25rem;
    border-radius: 4px;
}

.modal-field-preview:hover {
    background: rgba(79, 84, 92, 0.32);
}

.field-preview-label {
    color: #b9bbbe;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: block;
}

.required-star {
    color: #ed4245;
    margin-left: 0.125rem;
}

.field-preview-input {
    background: #202225;
    border: 1px solid #202225;
    color: #72767d;
    font-size: 1rem;
    padding: 0.625rem 0.75rem;
    border-radius: 4px;
    min-height: 42px;
    display: flex;
    align-items: center;
    transition: all 0.15s ease;
}

.field-preview-input.long {
    min-height: 120px;
    align-items: flex-start;
    padding: 0.75rem;
}

.modal-field-preview:hover .field-preview-input {
    border-color: #040405;
}

/* Discord Modal Footer */
.discord-modal-footer {
    padding: 1.5rem;
    background: #2f3136;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid #202225;
    border-radius: 0 0 16px 16px;
}

.modal-btn-cancel,
.modal-btn-submit {
    padding: 0.625rem 1.25rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
}

.modal-btn-cancel {
    background: transparent;
    color: #ffffff;
}

.modal-btn-cancel:hover {
    text-decoration: underline;
}

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

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

/* Field Editor Modal */
.field-editor-modal {
    background: #36393f;
    border-radius: 16px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.field-editor-header {
    background: #2f3136;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #202225;
}

.field-editor-header h3 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.field-editor-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.editor-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.editor-field-group label {
    color: #b9bbbe;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.editor-input,
.editor-textarea {
    background: #202225;
    border: 1px solid #202225;
    color: #dcddde;
    font-size: 1rem;
    padding: 0.625rem 0.75rem;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-family: inherit;
}

.editor-input:hover,
.editor-textarea:hover {
    border-color: #040405;
}

.editor-input:focus,
.editor-textarea:focus {
    border-color: #00aff4;
    outline: none;
}

.editor-textarea {
    resize: none; /* Verhindert manuelles Vergrößern - nur dynamisch */
    overflow: hidden; /* Verhindert Scrollbar */
    min-height: 60px;
    transition: min-height 0.3s ease;
    line-height: 1.5;
}

.char-count {
    color: #72767d;
    font-size: 0.75rem;
    text-align: right;
}

.editor-toggles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 0.5rem;
}

.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #2f3136;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.toggle-row:hover {
    background: #32353b;
}

.toggle-label {
    color: #dcddde;
    font-size: 0.9375rem;
    font-weight: 500;
}

/* Modern Toggle Switch */
.modern-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

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

.modern-toggle .toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #72767d;
    border-radius: 34px;
    transition: all 0.3s ease;
}

.modern-toggle .toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.modern-toggle input:checked + .toggle-slider {
    background-color: #43b581;
}

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

.modern-toggle:hover .toggle-slider {
    opacity: 0.9;
}

.field-editor-footer {
    padding: 1.25rem 1.5rem;
    background: #2f3136;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #202225;
}

.btn-delete-field {
    background: transparent;
    color: #ed4245;
    border: 2px solid #ed4245;
    padding: 0.625rem 1rem;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

.btn-secondary,
.btn-primary {
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-secondary {
    background: transparent;
    color: #b9bbbe;
    border: 2px solid #40444b;
}

.btn-secondary:hover {
    background: #40444b;
}

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

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


/* Modal Overlay for Forms */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* Responsive */
@media (max-width: 1306px) {
    .forms-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .add-form-btn {
        width: 100%;
        justify-content: center;
    }
    
    .forms-list {
        grid-template-columns: 1fr;
    }
    
    .discord-form-modal {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .form-footer-actions {
    flex-direction: column;
        width: 100%;
    }
    
    .discord-btn-secondary,
    .discord-btn-primary {
        width: 100%;
    }
    
    .field-limits-group {
        flex-direction: column;
    }
}

/* ===================================
   FORM CONFIGURATION SYSTEM
   =================================== */

/* Config Header */
.config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.config-title-section h3 {
    margin: 0 0 0.5rem 0;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
}

.config-subtitle {
    margin: 0;
    color: #b9bbbe;
    font-size: 0.9rem;
}

.form-select-with-reload {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-select-with-reload select {
    flex: 1;
}

.reload-forms-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    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);
    color: #b9bbbe;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.reload-forms-btn:hover {
    background: rgba(15, 15, 15, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
    color: #dcddde;
    transform: translateY(-1px);
}

.reload-forms-btn:active {
    transform: translateY(0);
}

.reload-forms-btn.loading {
    opacity: 0.7;
    cursor: wait;
}

.reload-forms-btn i {
    font-size: 0.875rem;
}

.reload-forms-btn span {
    font-size: 0.875rem;
}

/* Form Config Tabs */
.form-config-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0.5rem;
    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;
    overflow-x: auto;
}

.form-config-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: #b9bbbe;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.form-config-tab:hover {
    background: rgba(15, 15, 15, 0.4);
    color: #ffffff;
}

.form-config-tab.active {
    background: #5865f2;
    color: white;
}

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

/* Loading Config State */
.config-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #72767d;
    text-align: center;
    min-height: 200px;
}

.config-loading-state .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #5865f2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.config-loading-state p {
    margin: 0;
    font-size: 0.9rem;
    color: #b9bbbe;
}

/* Empty Config State */
.empty-config-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #72767d;
    text-align: center;
    min-height: 200px;
}

.empty-config-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
    color: #72767d;
}

.empty-config-state p {
    margin: 0.5rem 0;
    font-size: 1rem;
    color: #b9bbbe;
}

.empty-config-state .hint {
    color: #5865f2;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Form Config Content */
.form-config-content {
    display: block;
}

.form-config-panel {
    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;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.form-config-panel.open {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.config-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 2rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-radius: 12px;
}

.config-panel-header:hover {
    background: rgba(15, 15, 15, 0.4);
}

.config-panel-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.config-panel-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    border-radius: 12px;
    font-size: 1.5rem;
    color: white;
}

.config-panel-header h4 {
    margin: 0 0 0.25rem 0;
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
}

.config-hint {
    margin: 0;
    color: #b9bbbe;
    font-size: 0.85rem;
}

.config-panel-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.config-panel-toggle i {
    color: #b9bbbe;
    font-size: 1rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.form-config-panel.open .config-panel-toggle i {
    transform: rotate(180deg);
    color: #5865f2;
}

.config-panel-content {
    padding: 0 2rem 2rem 2rem;
}

/* Config Sections */
/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    background: #dbdbdb;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.toggle-switch:hover {
    background: #c0c0c0;
}

.toggle-slider {
    position: absolute;
    height: 20px;
    width: 20px;
    left: 2px;
    top: 2px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch[style*="#48c774"] .toggle-slider {
    transform: translateX(20px);
}

.config-section {
    margin-bottom: 2rem;
}

.config-label-with-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.config-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
    color: #dcddde;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1;
}

.config-label i {
    color: #5865f2;
    font-size: 1rem;
}

.required-mark {
    color: #ed4245;
    font-weight: bold;
}

.config-select,
.config-input {
        width: 100%;
    padding: 0.875rem 1rem;
    background: #202225;
    color: #dcddde;
    border: 2px solid #40444b;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.config-select:hover,
.config-input:hover {
    border-color: #5865f2;
}

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

.config-hint-text {
    display: block;
    margin-top: 0.5rem;
    color: #72767d;
    font-size: 0.85rem;
}

/* Role Tags */
.role-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.role-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #2f3136;
    border: 2px solid #5865f2;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.role-tag:hover {
    background: #36393f;
    transform: translateY(-1px);
}

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

.role-name {
    color: #dcddde;
    font-size: 0.9rem;
    font-weight: 500;
}

.role-remove-btn {
    background: none;
    border: none;
    color: #ed4245;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.role-remove-btn:hover {
    background: rgba(237, 66, 69, 0.1);
}

/* Role Selector Modal */
.role-selector-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.role-selector-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #2f3136;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.role-selector-item:hover {
    background: #36393f;
    border-color: #5865f2;
    transform: translateX(4px);
}

.role-selector-item .role-color {
    width: 14px;
    height: 14px;
}

.role-selector-item .role-name {
    flex: 1;
    color: #dcddde;
    font-weight: 500;
}

.role-selector-item i {
    color: #5865f2;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.role-selector-item:hover i {
    transform: scale(1.2);
}

.empty-state-text {
    text-align: center;
    color: #72767d;
    padding: 2rem;
    font-size: 0.95rem;
}

.add-role-tag-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #40444b;
    color: #b9bbbe;
    border: 2px dashed #5865f2;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-role-tag-btn:hover {
    background: #5865f2;
    color: white;
    border-style: solid;
}

.role-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #5865f2;
    color: white;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.role-tag .role-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: currentColor;
}

.role-tag .remove-role-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    margin-left: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.role-tag .remove-role-btn:hover {
        opacity: 1;
    }

/* Responsive */
@media (max-width: 1306px) {
    .config-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .reload-forms-btn {
        width: auto;
        justify-content: center;
    }

    .form-config-tabs {
        flex-direction: column;
    }

    .form-config-tab {
        width: 100%;
        justify-content: center;
    }

    .form-config-panel {
        padding: 1.5rem 1rem;
    }
}
