/* --- Music Tab Custom Styles --- */
.music-dropdown {
    background: rgba(40, 30, 70, 0.85);
    border: 2px solid var(--primary);
    border-radius: 14px;
    color: var(--text);
    font-size: 1.08rem;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(147, 112, 219, 0.10);
    transition: border-color 0.18s, box-shadow 0.18s;
    padding: 0.9rem 3.5rem 0.9rem 1.25rem;
    margin-bottom: 0.5rem;
}
.music-dropdown:focus, .music-dropdown:hover {
    border-color: var(--light-blue);
    box-shadow: 0 0 0 3px rgba(0, 206, 209, 0.13);
    background: rgba(60, 40, 120, 0.95);
}
.music-dropdown option {
    background: #1a1a2e;
    color: var(--text);
    font-weight: 500;
    border-radius: 8px;
    padding: 1rem;
}
.music-slider {
    width: 100%;
    max-width: 500px;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, rgba(147, 112, 219, 0.25), rgba(0, 206, 209, 0.25));
    border-radius: 10px;
    outline: none;
    margin: 0;
    padding: 8px 0;
    box-shadow: 0 2px 8px rgba(147, 112, 219, 0.15), inset 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease, background 0.3s ease;
    cursor: pointer;
    display: block;
}

.music-volume-wrapper {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: 0.75rem;
}

.music-volume-display {
    min-width: 45px;
    text-align: right;
    font-weight: 700;
    color: #00CED1;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.music-slider:hover {
    background: linear-gradient(90deg, rgba(147, 112, 219, 0.35), rgba(0, 206, 209, 0.35));
    box-shadow: 0 0 12px rgba(147, 112, 219, 0.25), inset 0 1px 3px rgba(0, 0, 0, 0.2);
}
.music-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00CED1, #9370DB);
    box-shadow: 0 0 16px rgba(0, 206, 209, 0.7), 0 0 8px rgba(147, 112, 219, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.95);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.music-slider:focus::-webkit-slider-thumb, .music-slider:hover::-webkit-slider-thumb {
    box-shadow: 0 0 28px rgba(0, 206, 209, 0.95), 0 0 14px rgba(147, 112, 219, 0.7), 0 2px 8px rgba(0, 0, 0, 0.4);
    transform: scale(1.15);
    border-color: rgba(255, 255, 255, 1);
}
.music-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00CED1, #9370DB);
    box-shadow: 0 0 16px rgba(0, 206, 209, 0.7), 0 0 8px rgba(147, 112, 219, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.95);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.music-slider:focus::-moz-range-thumb, .music-slider:hover::-moz-range-thumb {
    box-shadow: 0 0 28px rgba(0, 206, 209, 0.95), 0 0 14px rgba(147, 112, 219, 0.7), 0 2px 8px rgba(0, 0, 0, 0.4);
    transform: scale(1.15);
    border-color: rgba(255, 255, 255, 1);
}
.music-slider::-ms-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00CED1, #9370DB);
    box-shadow: 0 0 16px rgba(0, 206, 209, 0.7), 0 0 8px rgba(147, 112, 219, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.95);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.music-slider:focus::-ms-thumb, .music-slider:hover::-ms-thumb {
    box-shadow: 0 0 28px rgba(0, 206, 209, 0.95), 0 0 14px rgba(147, 112, 219, 0.7), 0 2px 8px rgba(0, 0, 0, 0.4);
    transform: scale(1.15);
    border-color: rgba(255, 255, 255, 1);
}
.music-slider::-webkit-slider-runnable-track {
    height: 8px;
    background: linear-gradient(90deg, rgba(0, 206, 209, 0.6), rgba(147, 112, 219, 0.6));
    border-radius: 10px;
}
.music-slider::-moz-range-track {
    height: 8px;
    background: linear-gradient(90deg, rgba(0, 206, 209, 0.6), rgba(147, 112, 219, 0.6));
    border-radius: 10px;
    border: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}
.music-slider::-moz-range-progress {
    background: linear-gradient(90deg, #00CED1, #9370DB);
    height: 8px;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(0, 206, 209, 0.4);
}
.music-slider::-ms-fill-lower {
    background: linear-gradient(90deg, #00CED1, #9370DB);
    border-radius: 10px;
}
.music-slider::-ms-fill-upper {
    background: linear-gradient(90deg, rgba(0, 206, 209, 0.3), rgba(147, 112, 219, 0.3));
    border-radius: 10px;
}
.music-slider:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 206, 209, 0.3);
}
.music-slider:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
/* Dashboard Specific Styles */

/* Base Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark, #7c5fd3));
    color: white;
    box-shadow: 0 2px 8px rgba(147, 112, 219, 0.3), 0 0 20px rgba(147, 112, 219, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a88be6, var(--primary));
    box-shadow: 0 0 25px rgba(147, 112, 219, 0.6), 0 0 45px rgba(0, 206, 209, 0.4);
}

.btn-secondary {
    background: var(--card-bg, #2a2a4a);
    color: var(--text, #ffffff);
    border: 1px solid var(--border, #3a3a6a);
}

.btn-secondary:hover {
    background: var(--border, #3a3a6a);
    border-color: var(--primary, #9370DB);
}

/* GIF Mode Buttons */
.gif-mode-btn {
    position: relative;
    padding: 10px 12px;
    transition: all 0.3s ease;
}

.gif-mode-btn.active {
    background: linear-gradient(135deg, #9370DB, #7B68EE);
    border-color: #9370DB;
    color: white;
    box-shadow: 0 2px 8px rgba(147, 112, 219, 0.3);
}

.gif-mode-btn.active:hover {
    background: linear-gradient(135deg, #7B68EE, #9370DB);
    border-color: #7B68EE;
}

/* Performance Optimizations */
*,
*::before,
*::after {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* FIX: Prevent double scrollbars - only body should scroll */
html {
    overflow-x: hidden;
    overflow-y: auto;
    filter: contrast(1.08) saturate(1.08) brightness(1.015);
}

body {
    overflow-x: hidden;
    overflow-y: visible;
}

/* Navbar */
.navbar {
    background: rgba(10, 12, 18, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0;
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    animation: slideDown 0.4s ease;
    will-change: transform;
    transform: translateZ(0);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

@keyframes slideDown {
    from {
        transform: translate3d(0, -100%, 0);
        opacity: 0;
    }
    to {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(147, 112, 219, 0.3), 0 0 40px rgba(147, 112, 219, 0.15);
    }
    50% {
        box-shadow: 0 0 30px rgba(147, 112, 219, 0.5), 0 0 60px rgba(147, 112, 219, 0.25);
    }
}

.nav-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-width: 0;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(147, 112, 219, 0.1);
    border: 1px solid rgba(147, 112, 219, 0.3);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(147, 112, 219, 0.15);
    border-color: rgba(147, 112, 219, 0.5);
    box-shadow: 0 4px 12px rgba(147, 112, 219, 0.2);
}

.server-info {
    display: none;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    padding: 6px 12px 6px 6px;
    border-radius: 50px;
    background: rgba(15, 10, 30, 0.95);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: visible;
    height: 44px;
    max-width: fit-content;
    background-clip: padding-box;
}

/* Shine traveling along the border - always visible */
.server-info::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    padding: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        transparent 40%,
        rgba(255, 255, 255, 0.8) 50%,
        transparent 60%,
        transparent 100%
    );
    background-size: 200% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    border-radius: 50px;
    animation: shineTravel 12s linear infinite;
    pointer-events: none;
    z-index: 1;
    opacity: 1;
}

/* Gradient border - only on hover */
.server-info::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50px;
    padding: 2px;
    background: linear-gradient(45deg, #9370DB, #00CED1, #9370DB, #00CED1);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes shineTravel {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.server-info:hover {
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.18), rgba(0, 206, 209, 0.12));
    box-shadow: 0 0 20px rgba(147, 112, 219, 0.4), 0 0 35px rgba(0, 206, 209, 0.25);
}

.server-info:hover::after {
    opacity: 1;
}

.server-info:active {
    transform: translateY(0);
}

.server-icon-nav {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(147, 112, 219, 0.3);
    background: rgba(147, 112, 219, 0.1);
    object-fit: cover;
    flex-shrink: 0;
}

/* Server info text handled inline in markup */

.server-info h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    line-height: 1.2;
}

/* Tier badge in navbar - smaller styling */
.server-info .tier-badge {
    padding: 0.2rem 0.45rem !important;
    font-size: 0.6rem !important;
    border-radius: 6px !important;
    vertical-align: middle;
    display: inline-block;
    white-space: nowrap;
    line-height: 1;
    flex-shrink: 0;
}

.nav-brand {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.2px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: var(--text);
    background: rgba(30, 36, 56, 0.7);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-btn:hover {
    background: rgba(45, 55, 88, 0.85);
    border-color: rgba(147, 112, 219, 0.45);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.4);
    transform: translateY(-1px);
}

.nav-btn-primary {
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.9), rgba(0, 206, 209, 0.75));
    border-color: transparent;
    color: white;
}

.nav-btn-primary:hover {
    background: linear-gradient(135deg, rgba(147, 112, 219, 1), rgba(0, 206, 209, 0.9));
}

.nav-pill {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(30, 41, 59, 0.6);
    color: #cbd5f5;
}

.nav-pill--success {
    background: rgba(16, 185, 129, 0.14);
    color: #8ef5b6;
    border-color: rgba(16, 185, 129, 0.45);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    transition: box-shadow 0.15s ease;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.user-avatar:hover {
    box-shadow: 0 0 12px var(--glow);
}

.user-avatar::after {
    content: attr(data-user-id);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: var(--text);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0s;
    z-index: 1000;
}

.user-avatar:hover::after {
    opacity: 1;
}

.user-name {
    font-weight: 600;
}

.logout-btn {
    padding: 0.5rem 1.5rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s linear, border-color 0.15s linear;
}

.logout-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.profile-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--primary);
}

.nav-btn-primary {
    background: transparent;
    border: 1px solid transparent;
    color: white;
    position: relative;
}

.nav-btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    padding: 1px;
    background: linear-gradient(135deg, #9370DB, #00CED1);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.nav-btn-primary:hover {
    background: rgba(147, 112, 219, 0.08);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.35);
}

.profile-btn svg {
    transition: transform 0.15s ease;
}

.profile-btn.active svg {
    transform: rotate(180deg);
}

.profile-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 280px;
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.15s ease, 
                transform 0.15s ease, 
                visibility 0.15s;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

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

.profile-menu-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(0, 206, 209, 0.1) 100%);
    border-radius: 16px 16px 0 0;
}

.profile-menu-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.profile-menu-name {
    font-weight: 600;
    color: var(--text);
}

.profile-menu-status {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(139, 92, 246, 0.15);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    display: inline-block;
    margin-top: 0.35rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.profile-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.85rem 1.25rem;
    background: transparent;
    border: none;
    color: var(--text);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-left-color 0.15s ease;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.profile-menu-item:hover {
    background: rgba(139, 92, 246, 0.15);
    border-left-color: var(--primary);
}

.profile-menu-item.logout-item {
    color: #ef4444;
}

.profile-menu-item.logout-item:hover {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: #ef4444;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    animation: slideUp 0.25s ease;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    scrollbar-width: thin;
    scrollbar-color: rgba(147, 112, 219, 0.5) rgba(255, 255, 255, 0.05);
}

/* Styled scrollbars for modal (WebKit browsers) */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

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

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(147, 112, 219, 0.5);
    border-radius: 10px;
    transition: background 0.15s;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(147, 112, 219, 0.7);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.15s ease;
}

.modal-close:hover {
    color: var(--error);
}

.modal-body {
    padding: 2rem;
}

.profile-stats-section h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.stats-grid-mini {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-card-mini {
    background: rgba(26, 26, 46, 0.7);
    border: 2px solid rgba(147, 112, 219, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.stat-card-mini:hover {
    border-color: rgba(147, 112, 219, 0.6);
    box-shadow: 0 6px 16px rgba(147, 112, 219, 0.3);
}

.stat-card-mini .stat-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
}

.stat-card-mini .stat-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-card-mini .stat-label {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.per-server-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.server-stat-card {
    background: rgba(26, 26, 46, 0.7);
    border: 2px solid rgba(147, 112, 219, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.server-stat-card:hover {
    border-color: rgba(147, 112, 219, 0.6);
    box-shadow: 0 6px 16px rgba(147, 112, 219, 0.3);
}

.server-stat-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.server-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.server-stat-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
}

.server-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.server-stat-item {
    text-align: center;
}

.server-stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--light-blue);
    margin-bottom: 0.25rem;
}

.server-stat-label {
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* Dashboard Container */
.dashboard-container {
    width: 100%;
    max-width: 100vw;
    margin-left: 0;
    margin-top: 60px;
    padding: 3rem;
    position: relative;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    flex: 1 0 auto;
    min-height: calc(100vh - 60px);
}

/* Adjust when sidebar is visible (after server selected) */
body.server-selected .dashboard-container {
    margin-left: 240px;
    width: calc(100vw - 240px);
    max-width: calc(100vw - 240px);
}

/* Adjust width when sidebar is collapsed */
.dashboard-container.collapsed {
    margin-left: 0;
    width: 100vw;
    max-width: 100vw;
}

/* ===== REDESIGNED SERVER SELECTION PAGE - CLEAN LAYOUT ===== */

.server-selection-redesigned {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding: 0;
    animation: fadeIn 0.5s ease-out;
    width: 100%;
}

/* Hero Section */
.server-hero-section {
    background: linear-gradient(135deg, rgba(22, 24, 38, 0.9) 0%, rgba(18, 20, 32, 0.85) 100%);
    border: 1px solid rgba(147, 112, 219, 0.25);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 20px 50px rgba(147, 112, 219, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2.5rem;
    animation: heroFloat 6s ease-in-out infinite, fadeIn 0.5s ease-out;
}

@keyframes heroFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.server-hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 206, 209, 0.08) 0%, transparent 70%);
    pointer-events: none;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.hero-left {
    flex: 1;
    position: relative;
    z-index: 1;
}

.server-hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.hero-username {
    background: linear-gradient(135deg, var(--primary) 0%, var(--light-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.server-hero-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.5;
}

.hero-stats-row {
    display: flex;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.hero-stat {
    background: rgba(12, 14, 22, 0.5);
    border: 1px solid rgba(147, 112, 219, 0.2);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-width: 90px;
}

.hero-stat:hover {
    border-color: rgba(147, 112, 219, 0.4);
    background: rgba(18, 20, 32, 0.6);
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--light-blue);
    margin-bottom: 0.3rem;
    animation: countUp 0.8s ease-out;
}

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

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

/* Quick Actions Section */
.quick-actions-section {
    animation: fadeIn 0.5s ease-out 0.1s backwards;
}

.action-card-large {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.15) 0%, rgba(0, 206, 209, 0.1) 100%);
    border: 1.5px solid rgba(147, 112, 219, 0.3);
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.action-card-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.action-card-large:hover::before {
    left: 100%;
}

.action-card-large:hover {
    border-color: rgba(147, 112, 219, 0.5);
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.22) 0%, rgba(0, 206, 209, 0.15) 100%);
    box-shadow: 0 16px 50px rgba(147, 112, 219, 0.2);
    transform: translateY(-4px);
}

.action-icon {
    font-size: 3.5rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.action-text {
    flex: 1;
    position: relative;
    z-index: 1;
}

.action-text h3 {
    margin: 0 0 0.4rem 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
}

.action-text p {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
}

.action-arrow {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.action-card-large:hover .action-arrow {
    color: white;
    transform: translateX(6px);
}

/* Servers Main Section */
.servers-main-section {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    animation: fadeIn 0.5s ease-out 0.2s backwards;
}

.servers-subsection {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.subsection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(147, 112, 219, 0.1);
}

.subsection-header > div {
    flex: 1;
}

.subsection-header > div p {
    text-align: right;
}

.subsection-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin: 0;
    line-height: 1.2;
    position: relative;
    display: inline-block;
    letter-spacing: -0.02em;
}

.subsection-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--light-blue));
    border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.servers-subsection:hover .subsection-header h2::after {
    width: 100%;
}

.subsection-header p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: 0.95rem;
}

.subsection-header > div {
    flex: 1;
}

.add-server-btn-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.4rem;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.3) 0%, rgba(0, 206, 209, 0.2) 100%);
    border: 1.5px solid rgba(147, 112, 219, 0.4);
    border-radius: 11px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.add-server-btn-header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.add-server-btn-header:hover {
    border-color: rgba(147, 112, 219, 0.6);
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.4) 0%, rgba(0, 206, 209, 0.3) 100%);
    box-shadow: 0 8px 24px rgba(147, 112, 219, 0.3),
                0 0 30px rgba(0, 206, 209, 0.2);
    transform: translateY(-2px);
}

.add-server-btn-header:hover::before {
    width: 300px;
    height: 300px;
}

/* Server Grid */
.server-grid-main {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    width: 100%;
    padding: 0.5rem;
}

.server-card-item {
    background: linear-gradient(135deg, rgba(22, 24, 38, 0.5) 0%, rgba(18, 20, 32, 0.6) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(147, 112, 219, 0.2);
    border-radius: 24px;
    padding: 2rem;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 15px 40px rgba(10, 12, 20, 0.5), 
                inset 0 1px 2px rgba(255, 255, 255, 0.08);
    animation: cardSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    isolation: isolate;
}

.server-card-item:nth-child(1) { animation-delay: 0s; }
.server-card-item:nth-child(2) { animation-delay: 0.08s; }
.server-card-item:nth-child(3) { animation-delay: 0.16s; }
.server-card-item:nth-child(4) { animation-delay: 0.24s; }
.server-card-item:nth-child(5) { animation-delay: 0.32s; }
.server-card-item:nth-child(6) { animation-delay: 0.4s; }
.server-card-item:nth-child(7) { animation-delay: 0.48s; }
.server-card-item:nth-child(8) { animation-delay: 0.56s; }
.server-card-item:nth-child(9) { animation-delay: 0.64s; }
.server-card-item:nth-child(10) { animation-delay: 0.72s; }

.server-card-item::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        transparent 30%,
        rgba(147, 112, 219, 1) 35%,
        rgba(0, 206, 209, 1) 50%,
        rgba(147, 112, 219, 1) 65%,
        transparent 70%,
        transparent 100%
    );
    background-size: 200% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.server-card-item::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: none;
    opacity: 0;
    transform: rotate(0deg);
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.server-card-item:hover {
    border-color: rgba(147, 112, 219, 0.3);
    box-shadow: 0 20px 60px rgba(147, 112, 219, 0.15),
                0 0 30px rgba(0, 206, 209, 0.08),
                inset 0 2px 3px rgba(255, 255, 255, 0.15);
}

.server-card-item:hover::before {
    animation: shineTravel 12s linear infinite;
    opacity: 1;
}

.server-card-item:hover::after {
    opacity: 0;
}
.server-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.server-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    border: 3px solid rgba(147, 112, 219, 0.3);
    flex-shrink: 0;
    object-fit: cover;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    position: relative;
}

.server-card-item:hover .server-card-icon {
    border-color: rgba(147, 112, 219, 0.8);
    box-shadow: 0 0 30px rgba(147, 112, 219, 0.7),
                0 0 60px rgba(0, 206, 209, 0.4),
                0 12px 24px rgba(0, 0, 0, 0.5);
    transform: scale(1.15) rotate(-5deg);
    filter: brightness(1.2);
}

.server-card-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.server-card-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: white;
    margin: 0;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    transition: all 0.4s ease;
    letter-spacing: -0.01em;
}

.server-card-item:hover .server-card-name {
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 0 25px rgba(147, 112, 219, 0.8),
                 0 0 40px rgba(0, 206, 209, 0.5);
    transform: translateX(3px);
}

.server-card-members {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
    margin: 0.4rem 0 0 0;
    transition: color 0.15s ease, text-shadow 0.15s ease;
    font-weight: 500;
}

.server-card-item:hover .server-card-members {
    color: rgba(0, 206, 209, 1);
    text-shadow: 0 0 8px rgba(0, 206, 209, 0.3);
}

.server-card-action {
    padding: 1rem 1.6rem;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.25), rgba(0, 206, 209, 0.15));
    border: 2px solid rgba(147, 112, 219, 0.35);
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    position: relative;
    z-index: 1;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.server-card-action::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.5), rgba(0, 206, 209, 0.4));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.server-card-action::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.server-card-item:hover .server-card-action {
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.6), rgba(0, 206, 209, 0.4));
    border-color: rgba(147, 112, 219, 0.8);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(147, 112, 219, 0.4),
                0 0 40px rgba(0, 206, 209, 0.3);
}

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

.server-card-action:active::after {
    width: 400px;
    height: 400px;
    transition: width 0s, height 0s;
}

.empty-state {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(18, 20, 32, 0.6) 0%, rgba(22, 24, 38, 0.7) 100%);
    border: 2px dashed rgba(147, 112, 219, 0.25);
    border-radius: 18px;
    padding: 3.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.empty-state::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(147, 112, 219, 0.08),
        transparent
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(200%);
    }
}

.empty-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
    display: inline-block;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.empty-state h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.5rem 0;
    position: relative;
    z-index: 1;
}

.empty-state p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

.empty-state-small {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
}

/* Info Cards Section */
.info-cards-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.8rem;
    margin-top: 1rem;
    animation: fadeIn 0.5s ease-out 0.3s backwards;
}

.info-card {
    background: linear-gradient(135deg, rgba(22, 24, 38, 0.85) 0%, rgba(18, 20, 32, 0.8) 100%);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    padding: 1.8rem;
    box-shadow: 0 8px 24px rgba(10, 12, 20, 0.25);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    animation: slideUpFade 0.5s ease-out backwards;
}

.info-card:nth-child(1) { animation-delay: 0.1s; }
.info-card:nth-child(2) { animation-delay: 0.2s; }
.info-card:nth-child(3) { animation-delay: 0.3s; }

.info-card:hover {
    border-color: rgba(147, 112, 219, 0.35);
    box-shadow: 0 16px 50px rgba(147, 112, 219, 0.2),
                0 0 30px rgba(0, 206, 209, 0.15);
}

.premium-card {
    position: relative;
    overflow: hidden;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(147, 112, 219, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.premium-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 215, 0, 0.08) 50%,
        transparent 100%
    );
    animation: shimmer 5s linear infinite;
}

.card-badge {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: rgba(147, 112, 219, 0.18);
    border: 1px solid rgba(147, 112, 219, 0.35);
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #a78bfa;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.info-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.7rem 0;
    position: relative;
    z-index: 1;
}

.info-card p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 1.2rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.features-list {
    list-style: none;
    margin: 1.2rem 0;
    padding: 0;
    position: relative;
    z-index: 1;
}

.features-list li {
    color: rgba(255, 255, 255, 0.75);
    padding: 0.4rem 0;
    font-size: 0.88rem;
}

.card-btn {
    width: 100%;
    padding: 0.8rem 1rem;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.3) 0%, rgba(0, 206, 209, 0.15) 100%);
    border: 1.5px solid rgba(147, 112, 219, 0.4);
    border-radius: 10px;
    color: white;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: block;
    text-align: center;
    text-decoration: none;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.card-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.5), rgba(0, 206, 209, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-btn:hover {
    border-color: rgba(147, 112, 219, 0.7);
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.4) 0%, rgba(0, 206, 209, 0.25) 100%);
    box-shadow: 0 8px 24px rgba(147, 112, 219, 0.35),
                0 0 30px rgba(0, 206, 209, 0.2);
}

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

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    position: relative;
    z-index: 1;
}

.about-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.8rem;
    background: rgba(12, 14, 22, 0.5);
    border-radius: 10px;
    text-align: center;
    transition: all 0.2s ease;
}

.about-item:hover {
    background: rgba(18, 20, 32, 0.6);
}

.about-emoji {
    font-size: 1.4rem;
}

.about-item span:last-child {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.resource-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 0;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.88rem;
    position: relative;
    z-index: 1;
}

.resource-link:hover {
    color: white;
    padding-left: 0.3rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .dashboard-container {
        margin-left: 0;
        padding: 2rem 1.5rem;
        width: 100%;
        max-width: 100vw;
    }
    
    .server-hero-section {
        flex-direction: column;
        padding: 2rem;
        text-align: center;
        gap: 2rem;
        border-radius: 20px;
    }
    
    .server-hero-title {
        font-size: 1.8rem;
    }
    
    .hero-stats-row {
        justify-content: center;
        width: 100%;
    }
    
    .action-card-large {
        flex-direction: column;
        text-align: center;
        padding: 1.75rem 1.5rem;
        gap: 1rem;
    }
    
    .action-text h3 {
        font-size: 1.1rem;
    }
    
    .action-text p {
        font-size: 0.85rem;
    }
    
    .subsection-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .add-server-btn-header {
        width: 100%;
        justify-content: center;
    }
    
    .server-grid-main {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1.5rem;
    }
    
    .server-card-item {
        padding: 1.5rem;
    }
    
    .info-cards-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.server-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 206, 209, 0.08) 0%, transparent 70%);
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
}

.server-hero-section::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(147, 112, 219, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.server-hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
}

.server-hero-text {
    max-width: 600px;
}

.server-hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: white;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero-username {
    background: linear-gradient(135deg, var(--primary) 0%, var(--light-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.server-hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    line-height: 1.6;
}

.server-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    min-width: 280px;
}

.hero-stat-card {
    background: rgba(12, 14, 22, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 14px;
    padding: 1.25rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.hero-stat-card:hover {
    border-color: rgba(147, 112, 219, 0.3);
    background: rgba(18, 20, 32, 0.8);
}

.hero-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.4rem;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Quick Actions */
.server-quick-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    animation: fadeIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
    opacity: 0;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(0, 206, 209, 0.1) 100%);
    border: 2px solid rgba(34, 197, 94, 0.3);
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

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

.action-card:hover::before {
    left: 100%;
}

.action-card:hover {
    border-color: rgba(34, 197, 94, 0.6);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.25) 0%, rgba(0, 206, 209, 0.15) 100%);
    box-shadow: 0 12px 40px rgba(34, 197, 94, 0.25);
    transform: translateY(-4px);
}

.action-card-primary {
    border-color: rgba(147, 112, 219, 0.3);
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.15) 0%, rgba(0, 206, 209, 0.1) 100%);
}

.action-card-primary:hover {
    border-color: rgba(147, 112, 219, 0.6);
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.25) 0%, rgba(0, 206, 209, 0.15) 100%);
    box-shadow: 0 12px 40px rgba(147, 112, 219, 0.2);
}

.action-card-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.action-card-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.action-card-content h3 {
    margin: 0 0 0.35rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.action-card-content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
}

.action-card-arrow {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.action-card:hover .action-card-arrow {
    color: white;
    transform: translateX(4px);
}

/* Content Grid with Sidebar */
.server-content-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
}

.server-section {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
}

.section-header p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: 0.95rem;
}

.add-server-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.5rem;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.3) 0%, rgba(0, 206, 209, 0.2) 100%);
    border: 1.5px solid rgba(147, 112, 219, 0.4);
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.add-server-btn:hover {
    border-color: rgba(147, 112, 219, 0.7);
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.4) 0%, rgba(0, 206, 209, 0.3) 100%);
    box-shadow: 0 8px 24px rgba(147, 112, 219, 0.2);
    transform: translateY(-2px);
}

/* Server Grid */
.server-grid-redesigned {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    animation: fadeIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards;
    opacity: 0;
}

.server-card-item {
    background: linear-gradient(135deg, rgba(22, 24, 38, 0.8) 0%, rgba(18, 20, 32, 0.75) 100%);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(10, 12, 20, 0.3);
    isolation: isolate;
}

.server-card-item::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        transparent 30%,
        rgba(229, 231, 235, 1) 35%,
        rgba(148, 163, 184, 1) 50%,
        rgba(229, 231, 235, 1) 65%,
        transparent 70%,
        transparent 100%
    );
    background-size: 200% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.server-card-item::after {
    content: '';
    position: absolute;
    top: 0;
    right: auto;
    bottom: auto;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    background: radial-gradient(circle at 68% 68%, rgba(229, 231, 235, 0.14) 0%, rgba(148, 163, 184, 0.1) 32%, rgba(15, 23, 42, 0) 72%);
    opacity: 0;
    transition: opacity 0.28s ease;
    pointer-events: none;
    z-index: 0;
}

.server-card-item:hover {
    border-color: rgba(226, 232, 240, 0.45);
    box-shadow: 0 16px 50px rgba(226, 232, 240, 0.18), 0 0 40px rgba(148, 163, 184, 0.16);
    transform: translateY(-6px);
}

.server-card-item:hover::before {
    animation: shineTravel 3.6s linear infinite;
    opacity: 1;
}

.server-card-item:hover::after {
    opacity: 1;
}

.server-card-item.server-card-owner:hover {
    border-color: rgba(251, 191, 36, 0.55);
    box-shadow: 0 16px 52px rgba(251, 191, 36, 0.22), 0 0 42px rgba(245, 158, 11, 0.22);
}

.server-card-item.server-card-owner:hover::before {
    background: linear-gradient(
        90deg,
        transparent 0%,
        transparent 30%,
        rgba(253, 224, 71, 1) 35%,
        rgba(251, 191, 36, 1) 50%,
        rgba(245, 158, 11, 1) 65%,
        transparent 70%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shineTravel 3.6s linear infinite;
    opacity: 1;
}

.server-card-item.server-card-owner:hover::after {
    background: radial-gradient(circle at 68% 68%, rgba(253, 224, 71, 0.18) 0%, rgba(251, 191, 36, 0.12) 32%, rgba(15, 23, 42, 0) 72%);
}

.server-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.server-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    border: 2px solid rgba(147, 112, 219, 0.2);
    flex-shrink: 0;
    object-fit: cover;
    transition: all 0.3s ease;
}

.server-card-item:hover .server-card-icon {
    border-color: rgba(147, 112, 219, 0.5);
    box-shadow: 0 0 20px rgba(147, 112, 219, 0.3);
    transform: scale(1.08);
}

.server-card-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.server-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: white;
    margin: 0;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.server-card-members {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0.25rem 0 0 0;
}

.server-card-action {
    padding: 0.75rem 1.25rem;
    background: rgba(147, 112, 219, 0.2);
    border: 1px solid rgba(147, 112, 219, 0.3);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
    z-index: 1;
}

.server-card-item:hover .server-card-action {
    background: rgba(147, 112, 219, 0.4);
    border-color: rgba(147, 112, 219, 0.6);
    color: white;
}

.no-servers-message {
    grid-column: 1 / -1;
    background: rgba(18, 20, 32, 0.8);
    border: 2px dashed rgba(147, 112, 219, 0.3);
    border-radius: 18px;
    padding: 4rem 2rem;
    text-align: center;
}

.no-servers-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.no-servers-message h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.5rem 0;
}

.no-servers-message p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 1.5rem 0;
    font-size: 1rem;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.5rem;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.3) 0%, rgba(0, 206, 209, 0.2) 100%);
    border: 1.5px solid rgba(147, 112, 219, 0.4);
    border-radius: 12px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-cta:hover {
    border-color: rgba(147, 112, 219, 0.7);
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.4) 0%, rgba(0, 206, 209, 0.3) 100%);
    box-shadow: 0 8px 24px rgba(147, 112, 219, 0.2);
    transform: translateY(-2px);
}

/* Sidebar */
.server-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: linear-gradient(135deg, rgba(22, 24, 38, 0.85) 0%, rgba(18, 20, 32, 0.8) 100%);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(10, 12, 20, 0.3);
    transition: all 0.3s ease;
    animation: fadeIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
    opacity: 0;
}

.sidebar-card:hover {
    border-color: rgba(147, 112, 219, 0.3);
    box-shadow: 0 16px 50px rgba(147, 112, 219, 0.15);
    transform: translateY(-4px);
}

/* Premium Promo Card */
.premium-promo-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(22, 24, 38, 0.85) 0%, rgba(18, 20, 32, 0.8) 100%);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(10, 12, 20, 0.3);
    transition: all 0.3s ease;
    animation: fadeIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
    opacity: 0;
}

.premium-promo-card:hover {
    border-color: rgba(147, 112, 219, 0.3);
    box-shadow: 0 16px 50px rgba(147, 112, 219, 0.15);
    transform: translateY(-4px);
}

.about-card:hover {
    border-color: rgba(147, 112, 219, 0.3);
    box-shadow: 0 16px 50px rgba(147, 112, 219, 0.15);
    transform: translateY(-4px);
}

.quick-links-card:hover {
    border-color: rgba(147, 112, 219, 0.3);
    box-shadow: 0 16px 50px rgba(147, 112, 219, 0.15);
    transform: translateY(-4px);
}

.premium-badge {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    background: rgba(147, 112, 219, 0.2);
    border: 1px solid rgba(147, 112, 219, 0.4);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #a78bfa;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.premium-promo-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.5rem 0;
    position: relative;
    z-index: 1;
}

.premium-promo-card > p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.premium-features {
    list-style: none;
    margin: 1.25rem 0;
    padding: 0;
    position: relative;
    z-index: 1;
}

.premium-features li {
    color: rgba(255, 255, 255, 0.75);
    padding: 0.4rem 0;
    font-size: 0.9rem;
}

.btn-premium {
    width: 100%;
    padding: 0.8rem 1rem;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.4) 0%, rgba(0, 206, 209, 0.2) 100%);
    border: 1.5px solid rgba(147, 112, 219, 0.5);
    border-radius: 10px;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    text-align: center;
    text-decoration: none;
    margin-top: 1rem;
    position: relative;
    z-index: 1;
}

.btn-premium:hover {
    border-color: rgba(147, 112, 219, 0.8);
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.5) 0%, rgba(0, 206, 209, 0.3) 100%);
    box-shadow: 0 8px 24px rgba(147, 112, 219, 0.3);
    transform: translateY(-2px);
}

/* About Card */
.about-card {
    display: flex !important;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(22, 24, 38, 0.85) 0%, rgba(18, 20, 32, 0.8) 100%);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(10, 12, 20, 0.3);
    transition: all 0.3s ease;
    animation: fadeIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
    opacity: 0;
}

.about-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.75rem 0;
}

.about-card p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.about-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem;
    background: rgba(12, 14, 22, 0.6);
    border-radius: 10px;
    text-align: center;
}

.feature-icon {
    font-size: 1.5rem;
}

.feature-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

/* Quick Links Card */
.quick-links-card {
    display: flex !important;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(22, 24, 38, 0.85) 0%, rgba(18, 20, 32, 0.8) 100%);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(10, 12, 20, 0.3);
    transition: all 0.3s ease;
    animation: fadeIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
    opacity: 0;
}

.quick-links-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0 0 1rem 0;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 0;
    padding-left: 0;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    position: relative;
}

.quick-link:hover {
    color: white;
    padding-left: 0.4rem;
}

.quick-link::before {
    content: '';
    position: absolute;
    left: -8px;
    width: 3px;
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.quick-link:hover::before {
    opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .server-content-grid {
        grid-template-columns: 1fr;
    }
    
    .server-sidebar {
        grid-template-columns: repeat(2, 1fr);
        display: grid;
    }
    
    .premium-promo-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .server-hero-section {
        padding: 2rem;
    }
    
    .server-hero-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .server-hero-title {
        font-size: 2rem;
    }
    
    .server-hero-subtitle {
        font-size: 1rem;
    }
    
    .server-hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        min-width: auto;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .add-server-btn {
        width: 100%;
        justify-content: center;
    }
    
    .server-grid-redesigned {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
    
    .server-sidebar {
        display: grid;
        grid-template-columns: 1fr;
    }
    
    .about-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

.dashboard-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--primary) 0%, var(--light-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.subtitle {
    color: var(--text-dim);
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 3rem;
    line-height: 1.6;
    letter-spacing: 0.3px;
}

/* Server Grid */
.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
    margin-top: 2.5rem;
    padding: 0 0.5rem;
}

.server-card {
    background: linear-gradient(135deg, rgba(32, 32, 52, 0.95) 0%, rgba(26, 26, 46, 0.9) 100%);
    border: 1.5px solid rgba(147, 112, 219, 0.25);
    border-radius: 20px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 30px rgba(147, 112, 219, 0.08);
    display: flex;
    flex-direction: column;
    min-height: 140px;
    justify-content: space-between;
}

.server-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.2) 0%, rgba(0, 206, 209, 0.12) 100%);
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: opacity;
    pointer-events: none;
}

.server-card:hover {
    border-color: rgba(147, 112, 219, 0.6);
    box-shadow: 0 16px 48px rgba(147, 112, 219, 0.35), 0 0 60px rgba(0, 206, 209, 0.15);
    transform: translateY(-6px) scale(1.02);
    background: linear-gradient(135deg, rgba(40, 40, 65, 0.98) 0%, rgba(32, 32, 52, 0.95) 100%);
}

.server-card:active {
    transform: translateY(-2px) scale(0.99);
}

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

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

.server-card-content {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

.server-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    border: 2px solid rgba(147, 112, 219, 0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: border-color, box-shadow, transform;
    flex-shrink: 0;
    object-fit: cover;
}

.server-card:hover .server-icon {
    border-color: rgba(147, 112, 219, 0.8);
    box-shadow: 0 0 24px rgba(147, 112, 219, 0.6), inset 0 0 12px rgba(147, 112, 219, 0.1);
    transform: scale(1.08);
}

.server-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: white;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.custom-bot-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #8ef5b6;
    background: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(34, 197, 94, 0.35);
    box-shadow: 0 3px 10px rgba(34, 197, 94, 0.18);
    white-space: nowrap;
}

.server-members {
    color: var(--text-dim);
    font-size: 0.875rem;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Configuration View */
.config-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
    margin-top: 0;
    animation: fadeIn 0.5s ease-out;
    justify-content: flex-start;
    padding: 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(26, 26, 46, 0.7);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
}

.back-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(147, 112, 219, 0.3);
}

.server-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-grow: 0;
    flex-shrink: 0;
}

.server-icon-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    box-shadow: 0 0 20px var(--glow);
}

.server-info h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.server-id {
    color: var(--text-dim);
}

/* Tabs - Sticky Navigation */
.tabs-wrapper {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
    padding-top: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Navigation wrapper with scroll buttons */
.tabs-navigation-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* View toggle button */
.tab-view-toggle {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: rgba(147, 112, 219, 0.1);
    border: 1px solid rgba(147, 112, 219, 0.3);
    border-radius: 10px;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease;
    backdrop-filter: blur(10px);
}

.tab-view-toggle:hover {
    background: rgba(147, 112, 219, 0.2);
    border-color: var(--primary);
}

.tab-view-toggle:active {
    opacity: 0.8;
}

/* Scroll buttons */
.tab-scroll-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: rgba(147, 112, 219, 0.1);
    border: 1px solid rgba(147, 112, 219, 0.3);
    border-radius: 10px;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(10px);
}

.tab-scroll-btn.visible {
    opacity: 1;
    pointer-events: all;
}

.tab-scroll-btn:hover {
    background: rgba(147, 112, 219, 0.2);
    border-color: var(--primary);
}

.tab-scroll-btn:active {
    opacity: 0.8;
}

/* Tabs container with gradient fades */
.config-tabs-container {
    position: relative;
    flex: 1;
    overflow: hidden;
}

.config-tabs-container::before,
.config-tabs-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.config-tabs-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg) 0%, transparent 100%);
}

.config-tabs-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg) 0%, transparent 100%);
}

.config-tabs-container.show-left-fade::before {
    opacity: 1;
}

.config-tabs-container.show-right-fade::after {
    opacity: 1;
}

.config-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    padding: 0.5rem 0;
}

/* Hide scrollbar on Chrome/Safari */
.config-tabs::-webkit-scrollbar {
    display: none;
}

/* Block/Grid view for tabs */
.config-tabs.block-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    overflow-x: visible;
    overflow-y: visible;
    border-bottom: none;
    padding: 1rem;
}

.config-tabs.block-view .tab-btn {
    padding: 1.5rem 1rem;
    border-radius: 12px;
    background: rgba(147, 112, 219, 0.05);
    border: 1px solid rgba(147, 112, 219, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    height: 100%;
    min-height: 80px;
}

.config-tabs.block-view .tab-btn::after {
    display: none;
}

.config-tabs.block-view .tab-btn::before {
    border-radius: 12px;
}

.config-tabs.block-view .tab-btn.active {
    background: rgba(147, 112, 219, 0.15);
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(147, 112, 219, 0.3);
}

.config-tabs.block-view .tab-btn:hover {
    border-color: var(--light-blue);
    box-shadow: 0 6px 20px rgba(0, 206, 209, 0.2);
}

.tab-btn {
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: color 0.15s ease;
    white-space: nowrap;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    flex-shrink: 0;
    flex-basis: auto;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--light-blue));
    transform: scaleX(0);
    transform-origin: center center;
    transition: transform 0.15s ease;
    z-index: 1;
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn.active {
    color: var(--primary);
    background: rgba(147, 112, 219, 0.1);
}

.tab-btn.active::after {
    transform: scaleX(1);
}


.config-content {
    width: 100%;
    max-width: 100%;
    overflow: visible;
    max-height: none;
    height: auto;
    flex: 1;
    min-height: 0;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeInUp 0.3s ease-out;
    overflow: visible; /* Prevent double scrollbars in tabs */
    max-height: none; /* Remove height constraints */
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Smooth scrolling optimization */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    filter: contrast(1.08) saturate(1.08) brightness(1.015);
}

/* Config Cards with Premium Animations */
.config-card {
    background: rgba(18, 20, 32, 0.7);
    border: 1px solid rgba(147, 112, 219, 0.2);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 1px rgba(147, 112, 219, 0.05);
}

.config-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        transparent 30%,
        rgba(147, 112, 219, 1) 35%,
        rgba(0, 206, 209, 1) 50%,
        rgba(147, 112, 219, 1) 65%,
        transparent 70%,
        transparent 100%
    );
    background-size: 200% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.config-card:hover {
    border-color: rgba(147, 112, 219, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 1px rgba(147, 112, 219, 0.08);
}

.config-card:hover::before {
    opacity: 0;
}

@keyframes slidingBorder {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 0%;
    }
}

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

.config-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, rgba(147, 112, 219, 1) 0%, rgba(0, 206, 209, 1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem 1.125rem;
    background: rgba(26, 26, 46, 0.7);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    box-sizing: border-box;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%239370DB' d='M10 13L5 8h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    background-size: 20px;
    padding-right: 3.5rem;
    font-weight: 500;
    position: relative;
}

.form-group select:hover {
    border-color: var(--primary);
    background: rgba(26, 26, 46, 0.8);
}

.form-group select option {
    background: #1a1a2e;
    color: var(--text);
    padding: 1rem;
    font-weight: 500;
    border-radius: 8px;
}

.form-group select option:hover {
    background: rgba(147, 112, 219, 0.2);
}

.form-group select option:checked {
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.3), rgba(0, 206, 209, 0.3));
    color: white;
    font-weight: 600;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(26, 26, 46, 0.9);
    box-shadow: 0 0 0 3px rgba(147, 112, 219, 0.2);
}

.form-group input:hover,
.form-group textarea:hover {
    border-color: rgba(147, 112, 219, 0.5);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 1rem;
    align-items: end;
}

/* XP Multiplier */
.xp-multiplier-container {
    text-align: center;
    padding: 2rem;
}

.multiplier-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.multiplier-value {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary) 0%, var(--light-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.multiplier-label {
    font-size: 2rem;
    color: var(--text-dim);
}

.multiplier-slider {
    width: 100%;
    max-width: 600px;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border-radius: 10px;
    outline: none;
    margin: 2rem auto;
    display: block;
    padding: 0 12px; /* Add padding for thumb clearance */
    box-sizing: border-box;
}

.multiplier-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--primary), var(--light-blue));
    border-radius: 10px;
}

.multiplier-slider::-moz-range-track {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--primary), var(--light-blue));
    border-radius: 10px;
}

.multiplier-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 12px var(--glow);
    cursor: pointer;
    transition: box-shadow 0.15s ease;
    margin-top: -8px;
}

.multiplier-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 12px var(--glow);
    cursor: pointer;
    transition: box-shadow 0.15s ease;
    border: none;
}

.multiplier-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 0 16px var(--glow);
}

.multiplier-slider::-moz-range-thumb:hover {
    box-shadow: 0 0 16px var(--glow);
}

.multiplier-labels {
    display: flex;
    justify-content: space-between;
    color: var(--text-dim);
    font-size: 0.9rem;
    max-width: 600px;
    margin: 0 auto;
}

.multiplier-info {
    margin-top: 2rem;
    color: var(--text-dim);
}

/* Rewards List */
.rewards-list {
    margin-top: 2rem;
}

.reward-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(26, 26, 46, 0.7);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    animation: fadeIn 0.25s ease-out;
}

.reward-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
}

.reward-info {
    display: flex;
    gap: 2rem;
}

.reward-level {
    font-weight: 600;
    color: var(--primary);
}

.delete-btn {
    padding: 0.5rem 1rem;
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid rgba(239, 68, 68, 0.4);
    border-radius: 10px;
    color: var(--error);
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s linear, border-color 0.15s linear, color 0.15s linear;
    position: relative;
    overflow: hidden;
}

.delete-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.6);
    color: white;
}

.edit-btn {
    padding: 0.5rem 1rem;
    background: rgba(0, 206, 209, 0.15);
    border: 2px solid rgba(0, 206, 209, 0.4);
    border-radius: 10px;
    color: var(--light-blue);
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s linear, border-color 0.15s linear, color 0.15s linear;
    position: relative;
    overflow: hidden;
    margin-right: 0.5rem;
}

.edit-btn:hover {
    background: rgba(0, 206, 209, 0.3);
    border-color: rgba(0, 206, 209, 0.6);
    color: white;
}

/* Buttons */
.save-btn,
.add-btn {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--light-blue));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s linear, box-shadow 0.15s linear;
    position: relative;
    overflow: hidden;
}

.save-btn:hover,
.add-btn:hover {
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.save-btn:active,
.add-btn:active {
    opacity: 0.8;
}

/* Discord Emoji Button */
.discord-emoji-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(79, 84, 92, 0.3);
    border: none;
    border-radius: 8px;
    color: #b9bbbe;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

.discord-emoji-btn:hover {
    background: rgba(79, 84, 92, 0.5);
    color: #dcddde;
}

.discord-emoji-btn:active {
    background: rgba(79, 84, 92, 0.6);
}

.discord-emoji-btn svg {
    flex-shrink: 0;
}

/* Notifications */
.notification {
    position: fixed;
    top: 100px;
    right: 2rem;
    padding: 1.25rem 2.5rem;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(139, 92, 246, 0.4);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
    transform: translateX(400px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1000;
    font-weight: 500;
    color: white;
    opacity: 0;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 15px 50px rgba(16, 185, 129, 0.4),
                0 5px 20px rgba(0, 0, 0, 0.3);
}

.notification.error {
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 15px 50px rgba(239, 68, 68, 0.4),
                0 5px 20px rgba(0, 0, 0, 0.3);
}

.notification.info {
    border-color: rgba(147, 112, 219, 0.6);
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.2), rgba(26, 26, 46, 0.95));
    box-shadow: 0 15px 50px rgba(147, 112, 219, 0.5),
                0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Info Box */
.info-box {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.info-box ul {
    list-style: none;
    padding-left: 0;
}

.info-box li {
    padding: 0.5rem 0;
    color: var(--text-dim);
}

.info-box.premium-info {
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.15) 0%, rgba(0, 206, 209, 0.1) 100%);
    border: 2px solid rgba(147, 112, 219, 0.4);
}

/* Premium Feature Cards */
.premium-feature {
    position: relative;
    border: 2px solid rgba(147, 112, 219, 0.4) !important;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.7) 0%, rgba(26, 26, 46, 0.5) 100%) !important;
}

.premium-feature::before {
    background: radial-gradient(circle, rgba(147, 112, 219, 0.2) 0%, transparent 70%) !important;
}

.premium-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--light-blue));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(147, 112, 219, 0.3);
    z-index: 10;
}


.coming-soon {
    text-align: center;
    font-size: 1.5rem;
    color: var(--text-dim);
    padding: 2rem;
}

/* Custom Command */
.subtitle-text {
    color: var(--text-dim);
    margin-bottom: 2rem;
}

/* ===== UNIFIED TOGGLE SWITCHES ===== */
/* All toggles now use the same size for consistency: 52px × 26px */

.toggle-label,
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 26px;
    flex-shrink: 0;
    transform: translateZ(0);
    will-change: transform;
}

.toggle-label input[type="checkbox"],
.toggle-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label .toggle-slider,
.toggle-switch .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.15s ease, border-color 0.15s ease;
    border-radius: 26px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-label .toggle-slider::before,
.toggle-switch .toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 2px;
    background: rgba(255, 255, 255, 0.9);
    transition: transform 0.15s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider,
.toggle-switch input[type="checkbox"]:checked + .toggle-slider {
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.25), rgba(0, 206, 209, 0.15));
    border-color: rgba(147, 112, 219, 0.6);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2), 0 0 8px rgba(147, 112, 219, 0.1);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider::before,
.toggle-switch input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(26px);
    background: rgba(255, 255, 255, 0.95);
}

.toggle-label .toggle-slider:hover,
.toggle-switch .toggle-slider:hover {
    border-color: rgba(147, 112, 219, 0.5);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider:hover,
.toggle-switch input[type="checkbox"]:checked + .toggle-slider:hover {
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.35), rgba(0, 206, 209, 0.25));
}

.toggle-label input[type="checkbox"]:focus + .toggle-slider,
.toggle-switch input[type="checkbox"]:focus + .toggle-slider {
    outline: 2px solid rgba(147, 112, 219, 0.5);
    outline-offset: 2px;
}


/* ===== MODERN RADIO BUTTON GROUPS ===== */
.radio-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.radio-option {
    position: relative;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-option label {
    display: block;
    padding: 0.5rem 1rem;
    border: 2px solid rgba(147, 112, 219, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.15s ease;
}

.radio-option input[type="radio"]:checked + label {
    background: rgba(147, 112, 219, 0.2);
    border-color: #9370DB;
    color: #9370DB;
}

.radio-option label:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(147, 112, 219, 0.5);
}

/* Mobile toggle improvements */
@media (max-width: 768px) {
    .toggle-label {
        margin-bottom: 1rem;
    }
    
    /* Make config cards more mobile-friendly */
    .config-card {
        padding: 1.25rem !important;
        margin-bottom: 1.25rem !important;
    }
    
    .config-card h3 {
        font-size: 1.3rem !important;
    }
    
    .subtitle-text {
        font-size: 0.9rem !important;
    }
    
    /* Mobile-friendly select dropdowns - especially for logging tab */
    .form-group select,
    #logChannel {
        min-height: 48px !important; /* Larger touch target */
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 1rem 3.5rem 1rem 1.25rem !important;
        background-size: 24px !important; /* Larger arrow icon for mobile */
        background-position: right 1rem center !important;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        touch-action: manipulation; /* Improve touch responsiveness */
    }
    
    /* Ensure select options are readable on mobile */
    .form-group select option,
    #logChannel option {
        padding: 0.75rem;
        font-size: 16px;
        background: #1a1a2e;
        color: var(--text);
    }
    
    /* Make sure save bar respects show class on mobile */
    #unifiedSaveBar .save-btn-unified {
        width: 100% !important;
        min-height: 48px !important; /* Larger touch target */
        font-size: 1.1rem !important;
        padding: 0.875rem 1.5rem !important;
    }
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.button-group .delete-btn {
    flex: 1;
}

.button-group .save-btn {
    flex: 2;
}

/* Analytics */
.analytics-hero {
    display: grid;
    grid-template-columns: minmax(280px, 1.2fr) minmax(280px, 1fr);
    gap: 1.75rem;
    padding: 2rem;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(15, 23, 42, 0.92));
    border: 1px solid rgba(94, 234, 212, 0.2);
    box-shadow: 0 18px 40px rgba(10, 12, 20, 0.45);
    margin-bottom: 2rem;
}

.analytics-hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.72rem;
    color: rgba(94, 234, 212, 0.8);
    margin-bottom: 0.6rem;
}

.analytics-hero-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.analytics-hero-subtitle {
    color: var(--text-dim);
    margin: 0;
    max-width: 34rem;
}

.analytics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.analytics-kpi {
    background: rgba(15, 23, 42, 0.7);
    border-radius: 16px;
    border: 1px solid rgba(94, 234, 212, 0.18);
    padding: 1rem 1.1rem;
}

.analytics-kpi-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
}

.analytics-kpi-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

.analytics-grid--two {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.analytics-panel {
    background: rgba(18, 20, 32, 0.75);
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    padding: 1.5rem;
    box-shadow: 0 12px 28px rgba(8, 10, 16, 0.35);
}

.analytics-panel--primary {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(15, 23, 42, 0.85);
}

.analytics-panel--wide {
    grid-column: span 2;
}

@media (max-width: 900px) {
    .analytics-hero {
        grid-template-columns: 1fr;
    }

    .analytics-panel--wide {
        grid-column: span 1;
    }
}

.analytics-panel-header h3 {
    margin: 0 0 0.35rem 0;
    font-size: 1.1rem;
    color: var(--text);
}

.analytics-panel-header p {
    margin: 0;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.analytics-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.85rem;
    margin-top: 1.2rem;
}

.analytics-metric {
    background: rgba(10, 12, 20, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(94, 234, 212, 0.12);
    padding: 0.85rem 1rem;
}

.analytics-metric-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    margin-bottom: 0.35rem;
}

.analytics-metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.analytics-bar-group {
    margin-top: 1.2rem;
    display: grid;
    gap: 1rem;
}

.analytics-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
}

.analytics-bar-track {
    height: 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.15);
    overflow: hidden;
}

.analytics-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.9), rgba(56, 189, 248, 0.95));
    transition: width 0.4s ease;
}

.analytics-table-wrapper {
    margin-top: 1rem;
    overflow-x: auto;
}

.analytics-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

.analytics-table th,
.analytics-table td {
    padding: 0.75rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 0.9rem;
}

.analytics-table th {
    color: var(--text-dim);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
}

.analytics-table tbody tr:hover {
    background: rgba(15, 23, 42, 0.6);
}

.analytics-member-name {
    font-weight: 600;
    color: var(--text);
}

.analytics-member-tag {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.analytics-table-empty {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-dim);
}

.analytics-spotlight {
    margin-top: 1rem;
    padding: 1.2rem;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.analytics-spotlight-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}

.analytics-spotlight-subtitle {
    color: var(--text-dim);
    margin: 0.35rem 0 0.8rem;
    font-size: 0.9rem;
}

.analytics-spotlight-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

.analytics-spotlight-stat {
    background: rgba(10, 12, 20, 0.7);
    border-radius: 12px;
    padding: 0.6rem 0.75rem;
    border: 1px solid rgba(56, 189, 248, 0.12);
}

.analytics-spotlight-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    margin-bottom: 0.25rem;
}

.analytics-spotlight-value {
    font-weight: 700;
    color: var(--text);
}

.analytics-momentum {
    margin-top: 1rem;
    display: grid;
    gap: 0.8rem;
}

.analytics-momentum-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    background: rgba(10, 12, 20, 0.7);
    border: 1px solid rgba(94, 234, 212, 0.12);
}

.analytics-momentum-label {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.analytics-momentum-value {
    font-weight: 700;
    color: var(--text);
}

/* ===== General Tab Styles ===== */
.general-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem 2.5rem;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(15, 23, 42, 0.92));
    border: 1px solid rgba(129, 140, 248, 0.2);
    box-shadow: 0 18px 40px rgba(10, 12, 20, 0.45);
    margin-bottom: 2rem;
}

.general-hero-left {
    flex: 1;
}

.general-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.4rem;
}

.general-subtitle {
    color: var(--text-dim);
    margin: 0;
    font-size: 0.95rem;
}

.general-hero-right {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
}

.general-quick-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(15, 23, 42, 0.6);
    padding: 0.75rem 1.25rem;
    border-radius: 14px;
    border: 1px solid rgba(129, 140, 248, 0.2);
    flex: 1;
    min-width: 0;
}

.general-quick-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.general-quick-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.general-quick-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
}

.general-quick-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.general-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 1.5rem;
    align-items: start;
}

.general-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.general-section {
    background: rgba(18, 20, 32, 0.75);
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    padding: 0;
    box-shadow: 0 12px 28px rgba(8, 10, 16, 0.35);
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.general-section:hover {
    border-color: rgba(129, 140, 248, 0.3);
}

.general-section-compact {
    /* Compact variant for sidebar */
}

.general-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(15, 23, 42, 0.4));
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.general-section-icon {
    font-size: 2rem;
    line-height: 1;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(129, 140, 248, 0.15));
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.3);
}

.general-section-icon-red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(248, 113, 113, 0.15));
    border-color: rgba(239, 68, 68, 0.3);
}

.general-section-icon-pink {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(244, 114, 182, 0.15));
    border-color: rgba(236, 72, 153, 0.3);
}

.general-section-icon-gold {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(252, 211, 77, 0.15));
    border-color: rgba(251, 191, 36, 0.3);
}

.general-section-info {
    flex: 1;
}

.general-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.2rem;
}

.general-section-desc {
    color: var(--text-dim);
    margin: 0;
    font-size: 0.85rem;
}

.general-section-body {
    padding: 2rem;
}

.general-field {
    margin-bottom: 1.25rem;
}

.general-field:last-child {
    margin-bottom: 0;
}

.general-field-half {
    flex: 1;
}

.general-field-row {
    display: flex;
    gap: 1rem;
}

.general-label {
    display: block;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.general-field-hint {
    display: block;
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-top: 0.4rem;
    line-height: 1.4;
}

.general-field-hint code {
    background: rgba(129, 140, 248, 0.12);
    color: rgba(129, 140, 248, 0.95);
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    margin: 0 0.1rem;
}

.general-select,
.general-input,
.general-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.7);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.general-select:focus,
.general-input:focus,
.general-textarea:focus {
    outline: none;
    border-color: rgba(129, 140, 248, 0.5);
    background: rgba(15, 23, 42, 0.85);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1);
}

.general-textarea {
    resize: vertical;
    min-height: 60px;
    line-height: 1.5;
}

.general-color-compact {
    width: 100%;
    height: 42px;
    padding: 0.3rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.7);
    cursor: pointer;
    transition: border-color 0.2s;
}

.general-color-compact:focus,
.general-color-compact:hover {
    border-color: rgba(129, 140, 248, 0.5);
}

.general-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.general-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    transition: background 0.2s, border-color 0.2s;
}

.general-option:hover {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(148, 163, 184, 0.2);
}

.general-option-primary {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(129, 140, 248, 0.2);
}

.general-option-primary:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(129, 140, 248, 0.3);
}

.general-option-info {
    flex: 1;
}

.general-option-label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.general-option-desc {
    color: var(--text-dim);
    font-size: 0.78rem;
}

.general-embed-config {
    margin-top: 1rem;
    padding: 1.5rem;
    background: rgba(99, 102, 241, 0.06);
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.15);
}

.general-embed-config-title {
    font-weight: 700;
    color: var(--text);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    color: rgba(129, 140, 248, 0.9);
}

.general-embed-fields {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.general-embed-fields:last-child {
    margin-bottom: 0;
}

.general-preview {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.general-preview-label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    display: block;
}

.general-preview-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 10px;
    min-height: 80px;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

/* Responsive adjustments */
@media (max-width: 1100px) {
    .general-layout {
        grid-template-columns: 1fr;
    }

    .general-column-sidebar {
        grid-row: 1;
    }

    .general-column-main {
        grid-row: 2;
    }
}

@media (max-width: 768px) {
    .general-hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
    }

    .general-hero-right {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .general-quick-stat {
        width: 100%;
    }

    .general-title {
        font-size: 1.6rem;
    }

    .general-section-header {
        padding: 1.25rem 1.5rem;
    }

    .general-section-body {
        padding: 1.5rem;
    }

    .general-embed-fields {
        flex-direction: column;
    }

    .general-field-row {
        flex-direction: column;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: rgba(26, 26, 46, 0.7);
    border: 2px solid rgba(147, 112, 219, 0.2);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.stat-card:hover {
    border-color: rgba(147, 112, 219, 0.6);
    box-shadow: 0 6px 16px rgba(147, 112, 219, 0.3);
}

.stat-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary) 0%, var(--light-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.top-members-list {
    margin: 1.5rem 0 3rem;
}

.top-member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.top-member-item:hover {
    border-color: var(--primary);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.3);
}

.member-rank {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    min-width: 3rem;
}

.member-info {
    flex: 1;
    margin-left: 1rem;
}

.member-name-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.member-display-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.member-username-toggle {
    cursor: pointer;
    font-size: 0.7rem;
    color: var(--primary);
    transition: transform 0.15s ease;
    user-select: none;
}

.member-username-toggle:hover {
    color: var(--light-blue);
}

.member-details-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--text-dim);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.member-details-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.member-details-dropdown > div {
    padding: 0.25rem 0;
}

.member-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-dim);
    flex-wrap: wrap;
}

.level-distribution {
    margin-top: 1.5rem;
}

.distribution-bar {
    margin-bottom: 1.5rem;
}

.distribution-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.distribution-range {
    font-weight: 600;
}

.distribution-count {
    color: var(--text-dim);
}

.bar-container {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 8px;
    height: 30px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--light-blue));
    border-radius: 8px;
    transition: width 1s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.75rem;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Footer Styles */
.site-footer {
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
    margin-top: auto;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.15s ease;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-copyright {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .config-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }
    
    .server-grid {
        grid-template-columns: 1fr;
        padding: 0 0.75rem;
        gap: 1.25rem;
    }
    
    .dashboard-title {
        font-size: 2.2rem;
        margin-bottom: 0.5rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Center pricing cards on mobile */
    .pricing-plans {
        padding: 0 1rem;
        justify-content: center;
    }
    
    /* Center all form elements */
    .config-section {
        padding: 1.5rem 1rem;
    }
    
    /* Ensure buttons are centered and full width on mobile */
    .save-btn,
    .btn-primary {
        width: 100%;
        max-width: 100%;
        justify-content: center;
    }
    
    
    /* Mobile scroll indicators */
    .tabs-wrapper::before,
    .tabs-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 2px;
        width: 40px;
        pointer-events: none;
        z-index: 2;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .tabs-wrapper::before {
        left: 0;
        background: linear-gradient(90deg, var(--darker-bg) 0%, transparent 100%);
    }
    
    .tabs-wrapper::after {
        right: 0;
        background: linear-gradient(270deg, var(--darker-bg) 0%, transparent 100%);
    }
    
    .tabs-wrapper.show-left-shadow::before {
        opacity: 1;
    }
    
    .tabs-wrapper.show-right-shadow::after {
        opacity: 1;
    }
    
    /* Mobile scroll hint */
    .tabs-scroll-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.5rem;
        margin-bottom: 0.5rem;
        color: var(--text-dim);
        font-size: 0.85rem;
        text-align: center;
        animation: slideHintFade 2s ease-in-out infinite;
    }
    
    .tabs-scroll-hint svg {
        width: 16px;
        height: 16px;
        animation: slideHintArrows 2s ease-in-out infinite;
    }
    
    @keyframes slideHintFade {
        0%, 100% { opacity: 0.5; }
        50% { opacity: 1; }
    }
    
    @keyframes slideHintArrows {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(4px); }
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Command Management Styles */
.command-category {
    margin-bottom: 2rem;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.category-icon {
    font-size: 1.5rem;
}

.category-info h4 {
    font-size: 1.2rem;
    color: var(--text);
    margin: 0 0 0.25rem 0;
}

.category-info p {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin: 0;
}

.command-list {
    display: grid;
    gap: 0.75rem;
}

.command-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.music-command-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(29, 185, 84, 0.3);
    border-radius: 8px;
    transition: all 0.15s ease;
}

.music-command-item:hover {
    border-color: rgba(29, 185, 84, 0.6);
    background: rgba(29, 185, 84, 0.05);
    box-shadow: 0 0 12px rgba(29, 185, 84, 0.1);
}

.music-command-item code {
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.music-command-item span {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.command-item:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
}

.command-info-wrapper {
    flex: 1;
}

.command-name {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.command-description {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.command-permissions {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: 4px;
    font-size: 0.8rem;
    color: #7289da;
    margin-top: 0.25rem;
}

.command-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(50, 50, 70, 0.8), rgba(30, 30, 50, 0.9));
    border: 2px solid rgba(200, 200, 200, 0.3);
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    border-radius: 30px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 2px;
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.command-toggle input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(155, 89, 182, 0.5), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.command-toggle input:checked + .toggle-slider:before {
    transform: translateX(30px);
    background: linear-gradient(135deg, #ffffff, #f0f0ff);
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.6);
}

.command-toggle input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.toggle-slider:hover {
    border-color: var(--primary);
}

.commands-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-dim);
}

.commands-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-dim);
}

/* ============================================
   ENHANCED MOBILE DASHBOARD STYLES
   ============================================ */

/* Tablet and medium mobile devices */
@media (max-width: 768px) {
    /* Top Navigation */
    .top-nav {
        padding: 0.75rem 1rem;
    }
    
    .current-server {
        font-size: 0.95rem;
    }
    
    .current-server-icon {
        width: 32px;
        height: 32px;
    }
    
    .user-menu {
        padding: 0.5rem;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
    }
    
    /* Server Selection */
    .server-select-container {
        padding: 2rem 1rem;
    }
    
    .server-select-title {
        font-size: 2rem;
    }
    
    .server-card {
        padding: 1rem;
    }
    
    .server-name {
        font-size: 1rem;
    }
    
    .server-icon {
        width: 50px;
        height: 50px;
    }
    
    /* Configuration Panel */
    .config-container {
        padding: 1rem;
    }
    
    .config-header h2 {
        font-size: 1.5rem;
    }
    
    .back-btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    /* Tabs */
    .config-tabs {
        gap: 0.5rem;
        padding: 0.5rem 0;
    }
    
    .tab-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        white-space: nowrap;
        min-width: auto;
    }
    
    /* Form Elements */
    .form-group label {
        font-size: 0.95rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.875rem 1rem;
        min-height: 48px;
    }
    
    .form-group textarea {
        min-height: 120px;
    }
    
    .slider-container {
        margin: 1.5rem 0;
    }
    
    .slider {
        height: 8px;
    }
    
    .slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }
    
    .slider::-moz-range-thumb {
        width: 24px;
        height: 24px;
    }
    
    /* Buttons */
    .btn-primary,
    .save-btn,
    .add-btn {
        min-height: 48px;
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }
    
    .delete-btn,
    .remove-btn {
        min-height: 40px;
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Rewards and Custom Commands */
    .reward-item,
    .custom-command-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .reward-info,
    .command-display-info {
        width: 100%;
    }
    
    /* Command Management */
    .command-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem 1rem;
    }
    
    .command-info-wrapper {
        width: 100%;
    }
    
    .command-toggle {
        align-self: flex-end;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .category-icon {
        font-size: 1.75rem;
    }
    
    /* Analytics */
    .analytics-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.25rem 1rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .leaderboard-item {
        padding: 1rem;
    }
    
    .member-rank {
        font-size: 1.25rem;
        min-width: 35px;
    }
    
    .member-avatar {
        width: 45px;
        height: 45px;
    }
    
    .member-info {
        flex: 1;
        min-width: 0;
    }
    
    .member-name {
        font-size: 1rem;
    }
    
    .member-stats {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .stat-badge {
        font-size: 0.8rem;
        padding: 0.25rem 0.625rem;
    }
    
    /* Notifications */
    .notification {
        max-width: calc(100vw - 2rem);
        margin: 1rem;
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    /* Modals */
    .profile-modal-content {
        width: 95%;
        max-width: none;
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .modal-header h3 {
        font-size: 1.5rem;
    }
    
    .close-modal-btn {
        width: 100%;
        margin-top: 1rem;
    }
}

/* Extra small devices (phones in portrait) */
@media (max-width: 480px) {
    .top-nav {
        padding: 0.625rem 0.75rem;
    }
    
    .current-server {
        font-size: 0.85rem;
    }
    
    .current-server-name {
        max-width: 120px;
    }
    
    /* Extra padding for small phones to prevent edge-to-edge */
    .dashboard-container,
    .config-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Center all content on very small screens */
    .server-select-section {
        padding: 1rem;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .server-select-title {
        font-size: 1.75rem;
    }
    
    .config-header h2 {
        font-size: 1.25rem;
    }
    
    .tab-btn {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .stat-card {
        padding: 1rem 0.875rem;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .leaderboard-item {
        padding: 0.875rem;
    }
    
    .member-avatar {
        width: 40px;
        height: 40px;
    }
    
    .member-name {
        font-size: 0.95rem;
    }
    
    .notification {
        font-size: 0.9rem;
    }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .server-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Touch-specific improvements */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .server-card:hover,
    .tab-btn:hover,
    .command-item:hover {
        transform: none;
    }
    
    /* Add active states for touch feedback */
    .server-card:active {
        transform: scale(0.98);
    }
    
    .tab-btn:active {
        background: rgba(155, 89, 182, 0.3);
    }
    
    .btn-primary:active,
    .save-btn:active {
        transform: translateY(1px);
    }
    
    /* Larger touch targets */
    .toggle-slider {
        min-width: 60px;
        min-height: 30px;
    }
    
    button,
    .btn,
    a.btn {
        min-height: 44px;
    }
}

/* Mobile-specific accessibility */
@media (max-width: 768px) {
    /* Ensure readable font sizes on mobile */
    * {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    /* Better touch scrolling */
    .config-tabs,
    .server-grid,
    .analytics-grid {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Prevent accidental zoom on inputs */
    input[type="text"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Giveaway Cards */
.giveaways-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.giveaway-card {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.giveaway-card:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3);
}

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

.giveaway-prize {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
}

.giveaway-status {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.giveaway-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.giveaway-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.giveaway-actions button {
    flex: 1;
    min-width: 80px;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary), var(--light-blue));
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.15s ease, opacity 0.15s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.giveaway-actions button:hover {
    opacity: 0.9;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.5);
}

.giveaway-actions button.danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--error);
}

.giveaway-actions button.danger:hover {
    background: var(--error);
    color: white;
}

.giveaway-actions a {
    flex: 1;
    min-width: 80px;
    padding: 0.5rem 1rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
    text-align: center;
    transition: all 0.15s ease;
}

.giveaway-actions a:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* Tickets List */
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ticket-item {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.ticket-item:hover {
    border-color: var(--primary);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.3);
}

/* Panels List */
.panels-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.panel-item {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.panel-item:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.panel-info {
    flex: 1;
}

.panel-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.panel-details {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.panel-actions {
    display: flex;
    gap: 0.5rem;
}

/* Button Groups */
.button-group .save-btn {
    flex: 1;
    min-width: 150px;
}

/* Embed Builder Styles */
.embed-builder-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

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

.embed-preview-section {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.embed-preview-section h5 {
    color: var(--text);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.discord-embed {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
}

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

/* Pricing Section */
.pricing-section {
    width: 100%;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.plan-card {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.plan-card:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3);
}

.plan-card.free {
    border-color: var(--text-dim);
}

.plan-card.premium {
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.2);
}

.plan-card.ultimate {
    border-color: var(--light-blue);
}

.popular-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary), var(--light-blue));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.plan-card h4 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.price {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.price span {
    font-size: 1rem;
    color: var(--text-dim);
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.plan-features li {
    padding: 0.75rem 0;
    color: var(--text);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border);
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.plan-btn.current {
    background: rgba(139, 92, 246, 0.2);
    color: var(--text-dim);
    cursor: not-allowed;
}

.plan-btn.upgrade {
    background: linear-gradient(135deg, var(--primary), var(--light-blue));
    color: white;
}

.plan-btn.upgrade:hover {
    opacity: 0.9;
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.5);
}

/* Channel Rules */
.subtitle-text {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

.plan-info {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.plan-info a {
    color: var(--primary);
    text-decoration: none;
}

.plan-info a:hover {
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .embed-builder-container {
        grid-template-columns: 1fr;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
    }
}

/* Enhanced Profile Modal */
.profile-modal-large {
    max-width: 1000px;
}

.profile-header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.profile-modal-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    box-shadow: 0 0 20px var(--glow);
}

.profile-plan-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--light-blue) 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.profile-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.profile-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.profile-action-btn:hover {
    background: linear-gradient(135deg, var(--primary), var(--light-blue));
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.5);
}

.profile-action-btn span {
    font-size: 1.5rem;
}

/* Enhanced Pricing Section */
.pricing-header {
    text-align: center;
    margin-bottom: 3rem;
}

.pricing-title {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary) 0%, var(--light-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.pricing-subtitle {
    font-size: 1.2rem;
    color: var(--text-dim);
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.plan-card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
    display: flex;
    flex-direction: column;
}

.plan-card:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3);
}

.plan-card.featured {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

.plan-card.featured:hover {
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.5);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--light-blue));
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.plan-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.plan-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
}

.plan-price {
    margin-bottom: 0.5rem;
}

.price-amount {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--light-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-period {
    font-size: 1rem;
    color: var(--text-dim);
    font-weight: 500;
}

.plan-description {
    color: var(--text-dim);
    font-size: 0.95rem;
}

.plan-features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    flex-grow: 1;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: var(--text);
}

.feature-item.included {
    opacity: 1;
}

.feature-item.excluded {
    opacity: 0.4;
}

.feature-icon {
    flex-shrink: 0;
    font-size: 1.2rem;
}

.plan-button {
    width: 100%;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: box-shadow 0.15s ease, opacity 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.plan-button.current-plan {
    background: rgba(139, 92, 246, 0.2);
    color: var(--text-dim);
    cursor: not-allowed;
}

.plan-button.upgrade-button {
    background: linear-gradient(135deg, var(--primary), var(--light-blue));
    color: white;
}

.plan-button.upgrade-button:hover {
    opacity: 0.9;
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.5);
}

.plan-button.upgrade-button.ultimate {
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #d946ef);
}

/* Pricing FAQ */
.pricing-faq {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 3rem;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.pricing-faq h3 {
    text-align: center;
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 2rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.faq-item {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.faq-item:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.faq-item h4 {
    color: var(--light-blue);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.faq-item p {
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0;
}

/* Plan-specific colors */
.free-plan .plan-name {
    color: #10b981;
}

.premium-plan .plan-name {
    background: linear-gradient(135deg, var(--primary), var(--light-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ultimate-plan .plan-name {
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #d946ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 968px) {
    .plans-grid {
        grid-template-columns: 1fr;
    }
    
    .plan-card.featured {
        transform: scale(1);
    }
    
    .plan-card.featured:hover {
        box-shadow: 0 20px 40px rgba(139, 92, 246, 0.5);
    }
}

/* Ticket Panel Preview */
.ticket-panel-preview,
#selfrolePanelPreview {
    background: #2b2d31;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ticket-panel-preview .embed,
.embed-preview {
    background: #1e1f22;
    border-left: 4px solid;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.embed-preview .embed-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.embed-preview .embed-title-block {
    flex: 1;
}

.embed-preview .embed-thumbnail {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.ticket-panel-preview .embed-title,
.embed-preview .embed-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.ticket-panel-preview .embed-description,
.embed-preview .embed-description {
    font-size: 0.9rem;
    color: #b5bac1;
    line-height: 1.4;
    white-space: pre-wrap;
}

.embed-preview .embed-helper {
    margin-top: 0.6rem;
    font-size: 0.9rem;
    color: #cfd4db;
}

.embed-preview .embed-image {
    margin-top: 0.75rem;
    border-radius: 4px;
    overflow: hidden;
    background: #0f1012;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.embed-preview .embed-image img {
    display: block;
    width: 100%;
    height: auto;
}

.ticket-panel-preview .embed-footer,
.embed-preview .embed-footer {
    font-size: 0.75rem;
    color: #949ba4;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.discord-select-card {
    background: #2b2d31;
    border: 1px solid #202225;
    border-radius: 6px;
    padding: 0.75rem;
    color: #e3e5e8;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.discord-select-label {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.discord-option {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: #1e1f22;
    border: 1px solid #111214;
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.35rem;
}

.discord-option:last-child {
    margin-bottom: 0;
}

.discord-option-emoji {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.discord-option-emoji img.custom-emoji {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.discord-option-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.discord-option-title {
    font-weight: 700;
    color: #f2f3f5;
    font-size: 0.95rem;
}

.discord-option-description {
    font-size: 0.85rem;
    color: #b5bac1;
}

.discord-option-caret {
    color: #949ba4;
    font-size: 0.9rem;
}

.ticket-panel-preview .button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #5865f2;
    color: white;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: not-allowed;
}

/* Emoji Picker Modal */
.emoji-picker-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease;
}

.emoji-picker-modal.active {
    display: flex;
}

.emoji-picker-content {
    background: var(--bg-card);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s ease;
}

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

.emoji-picker-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.emoji-picker-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.emoji-picker-close {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.emoji-picker-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.emoji-picker-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    padding: 0 1.25rem;
}

.emoji-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}

.emoji-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.emoji-tab:hover:not(.active) {
    color: var(--text);
}

.emoji-picker-search {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.emoji-picker-search input {
    width: 100%;
    padding: 0.65rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
}

.emoji-picker-body {
    padding: 1.25rem;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 350px;
    scrollbar-width: thin;
    scrollbar-color: rgba(147, 112, 219, 0.5) rgba(255, 255, 255, 0.05);
}

/* Styled scrollbars for emoji picker (WebKit browsers) */
.emoji-picker-body::-webkit-scrollbar {
    width: 8px;
}

.emoji-picker-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.emoji-picker-body::-webkit-scrollbar-thumb {
    background: rgba(147, 112, 219, 0.5);
    border-radius: 10px;
    transition: background 0.15s;
}

.emoji-picker-body::-webkit-scrollbar-thumb:hover {
    background: rgba(147, 112, 219, 0.7);
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 0.5rem;
}

.emoji-item {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s ease, opacity 0.15s ease;
    background: var(--bg-secondary);
}

.emoji-item:hover {
    background: var(--bg-hover);
    opacity: 0.85;
}

.emoji-item.custom-emoji {
    overflow: hidden;
}

.emoji-item.custom-emoji img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.emoji-category {
    margin-bottom: 1.5rem;
}

.emoji-category-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Unified Save Bar - Floating, Sleek Design */
.unified-save-bar {
    position: fixed;
    bottom: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 3rem);
    max-width: 650px;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.2), rgba(0, 206, 209, 0.1));
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 2px solid rgba(147, 112, 219, 0.4);
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(147, 112, 219, 0.25), 0 0 20px rgba(0, 206, 209, 0.1);
    z-index: 9999;
    transition: bottom 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    padding: 1rem 1.75rem;
    opacity: 0;
}

.unified-save-bar.show {
    bottom: 2rem;
    transform: translateX(-50%);
    opacity: 1;
}

.save-bar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.save-bar-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    flex: 1;
}

.save-bar-message svg {
    flex-shrink: 0;
    opacity: 0.9;
}

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

.discard-btn {
    padding: 0.65rem 1.8rem;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.discard-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.discard-btn:active {
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
}

.save-btn-unified {
    padding: 0.7rem 2.2rem;
    background: linear-gradient(135deg, var(--primary), var(--light-blue));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 6px 20px rgba(147, 112, 219, 0.4);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.save-btn-unified:hover {
    box-shadow: 0 0 28px rgba(147, 112, 219, 0.6), 0 0 45px rgba(0, 206, 209, 0.4);
}

.save-btn-unified:active {
    box-shadow: 0 0 18px rgba(147, 112, 219, 0.5);
}

@media (max-width: 768px) {
    .unified-save-bar {
        bottom: -200px;
        width: calc(100% - 2rem);
        padding: 0.75rem 1rem;
        border-radius: 40px;
    }
    
    .unified-save-bar.show {
        bottom: 1rem;
    }
    
    .save-bar-content {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .save-bar-actions {
        width: 100%;
    }
    
    .save-bar-actions button {
        flex: 1;
    }
}

/* User Settings Section */
.user-settings-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(147, 112, 219, 0.05);
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    overflow: hidden;
}

.setting-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--light-blue));
    opacity: 0;
    transition: opacity 0.15s ease;
}

.setting-item:hover {
    background: rgba(147, 112, 219, 0.08);
    border-color: rgba(147, 112, 219, 0.5);
    box-shadow: 0 2px 8px rgba(147, 112, 219, 0.2);
}

.setting-item:hover::before {
    opacity: 1;
}

.setting-info {
    flex: 1;
    padding-right: 1.5rem;
}

.setting-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting-title img {
    flex-shrink: 0;
}

.setting-description {
    font-size: 0.95rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* Duplicate toggle-switch styles removed - now using unified toggle styles above */

/* Performance Optimizations for Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .server-card,
    .config-card,
    .command-category,
    .stat-card {
        animation: none !important;
    }
    
    .toggle-slider:before {
        transition: transform 0.1s ease !important;
    }
    
    .navbar {
        animation: none !important;
    }
}

/* Reduce heavy blur effects on lower-end devices */
@media (max-width: 1024px) {
    .navbar {
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
    
    .config-card,
    .server-card,
    .stat-card,
    .modal-content,
    .command-category {
        backdrop-filter: blur(10px) saturate(150%);
        -webkit-backdrop-filter: blur(10px) saturate(150%);
    }
}

/* Command Sub-Tabs (MEE6 Style) */
.command-subtabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.command-subtabs::-webkit-scrollbar {
    display: none;
}

.command-subtab {
    padding: 0.6rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.command-subtab:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--primary);
    color: var(--text);
}

.command-subtab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Command Cards Grid (MEE6 Style) */
.command-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.command-card {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    padding: 1.75rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.command-card:hover {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
}

.command-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.command-card-icon {
    font-size: 2rem;
    line-height: 1;
}

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

.command-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.command-card-description {
    font-size: 0.875rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.command-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
}

.command-card-status {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    transition: opacity 0.15s ease;
    white-space: nowrap;
    overflow: visible;
    min-width: fit-content;
    display: inline-flex;
    align-items: center;
}

.command-card-status.active {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.command-card-status.inactive {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

.command-card-status.pending {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    animation: pulse-pending 2s ease-in-out infinite;
}

@keyframes pulse-pending {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Command Card Toggle Switch - Unified Glassmorphism Style */
.command-toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 26px;
}

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

.command-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.15s ease, border-color 0.15s ease;
    border-radius: 26px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.command-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 2px;
    background: rgba(255, 255, 255, 0.9);
    transition: transform 0.15s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.command-toggle input:checked + .command-toggle-slider {
    background: rgba(147, 112, 219, 0.3);
    border-color: rgba(147, 112, 219, 0.6);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.command-toggle input:checked + .command-toggle-slider:before {
    transform: translateX(26px);
    background: rgba(255, 255, 255, 0.95);
}

.command-toggle-slider:hover {
    border-color: rgba(147, 112, 219, 0.5);
}

.command-toggle input:checked + .command-toggle-slider:hover {
    background: rgba(147, 112, 219, 0.4);
}

/* Filter Hidden State */
.command-card.hidden {
    display: none;
}

/* ===== UNSAVED STATUS BADGES ===== */
/* Universal unsaved indicator for all toggles */
.unsaved-badge {
    display: inline-block;
    margin-left: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    min-width: fit-content;
    /* Glassmorphism badge */
    background: rgba(251, 191, 36, 0.15);
    border: 1.5px solid rgba(251, 191, 36, 0.4);
    color: #fbbf24;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 
        0 2px 8px rgba(251, 191, 36, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
    animation: pulse-badge 2s ease-in-out infinite;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

@keyframes pulse-badge {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

.unsaved-badge:hover {
    background: rgba(251, 191, 36, 0.25);
    border-color: rgba(251, 191, 36, 0.6);
    box-shadow: 
        0 4px 12px rgba(251, 191, 36, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

/* ===== OVERVIEW TAB STYLES ===== */
.overview-hero {
    display: grid;
    grid-template-columns: minmax(260px, 1.3fr) minmax(260px, 1fr);
    gap: 1.5rem;
    padding: 1.75rem;
    border-radius: 18px;
    background: rgba(18, 20, 32, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 18px 45px rgba(10, 12, 20, 0.4);
    margin-bottom: 1.75rem;
}

.overview-hero-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.overview-hero-subtitle {
    color: var(--text-dim);
    margin: 0;
}

.overview-hero-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 0.9rem;
}

.overview-kpi {
    background: rgba(12, 14, 22, 0.7);
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    padding: 0.9rem 1rem;
}

.overview-kpi-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}

.overview-kpi-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

.overview-grid--two {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.overview-panel {
    background: rgba(18, 20, 32, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 14px 30px rgba(10, 12, 20, 0.32);
}

.overview-panel--primary {
    background: rgba(22, 24, 38, 0.8);
    border-color: rgba(147, 112, 219, 0.35);
}

.overview-panel-header h3 {
    margin: 0 0 0.35rem 0;
    font-size: 1.1rem;
    color: var(--text);
}

.overview-panel-header p {
    margin: 0;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.overview-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.9rem;
    margin-top: 1.2rem;
}

.overview-metric {
    background: rgba(12, 14, 22, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    padding: 0.85rem 1rem;
}

.overview-metric-label {
    font-size: 0.78rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.35rem;
}

.overview-metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.overview-chart {
    height: 160px;
    margin-top: 1.1rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(147, 112, 219, 0.18), rgba(10, 12, 20, 0.4));
    border: 1px solid rgba(148, 163, 184, 0.16);
    position: relative;
    overflow: hidden;
}

.overview-chart::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.5;
}

.overview-chart::after {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: 22%;
    height: 2px;
    background: linear-gradient(90deg, rgba(0, 206, 209, 0.9), rgba(147, 112, 219, 0.95));
    box-shadow: 0 0 18px rgba(147, 112, 219, 0.6);
}

.overview-chart-caption {
    margin-top: 0.75rem;
    color: var(--text-dim);
    font-size: 0.85rem;
}

@media (max-width: 1000px) {
    .overview-hero {
        grid-template-columns: 1fr;
    }

    .overview-hero-kpis {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

/* ----- Overview: Staggered reveal (Neon / Startit style) ----- */
@keyframes overviewReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes overviewShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes overviewValueIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Initial state before reveal */
#overviewTab .overview-hero,
#overviewTab .overview-grid,
#analyticsTab .analytics-hero,
#analyticsTab .analytics-grid,
#generalTab .general-hero,
#generalTab .general-layout {
    opacity: 0;
    transform: translateY(20px);
}

#overviewTab.overview-animated .overview-hero,
#analyticsTab.analytics-animated .analytics-hero,
#generalTab.general-animated .general-hero {
    animation: overviewReveal 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0ms;
}

#overviewTab.overview-animated .overview-grid,
#analyticsTab.analytics-animated .analytics-grid,
#generalTab.general-animated .general-layout {
    animation: overviewReveal 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 80ms;
}

#overviewTab.overview-animated .overview-grid.overview-grid--two,
#analyticsTab.analytics-animated .analytics-grid.analytics-grid--two {
    animation: overviewReveal 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 160ms;
}

/* Panel stagger (children of second grid) */
#overviewTab.overview-animated .overview-grid--two .overview-panel:nth-child(1),
#analyticsTab.analytics-animated .analytics-grid--two .analytics-panel:nth-child(1) {
    animation: overviewReveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 240ms;
    opacity: 0;
    transform: translateY(16px);
}

#overviewTab.overview-animated .overview-grid--two .overview-panel:nth-child(2),
#analyticsTab.analytics-animated .analytics-grid--two .analytics-panel:nth-child(2) {
    animation: overviewReveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 320ms;
    opacity: 0;
    transform: translateY(16px);
}

/* Skeleton loading state */
#overviewTab.overview-loading .overview-kpi-value,
#overviewTab.overview-loading .overview-metric-value,
#overviewTab.overview-loading .overview-engagement-value,
#overviewTab.overview-loading .overview-activity-value,
#analyticsTab.analytics-loading .analytics-kpi-value,
#analyticsTab.analytics-loading .analytics-metric-value {
    position: relative;
    color: transparent !important;
}

#overviewTab.overview-loading .overview-kpi-value::after,
#overviewTab.overview-loading .overview-metric-value::after,
#overviewTab.overview-loading .overview-engagement-value::after,
#overviewTab.overview-loading .overview-activity-value::after,
#analyticsTab.analytics-loading .analytics-kpi-value::after,
#analyticsTab.analytics-loading .analytics-metric-value::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 60%;
    min-width: 48px;
    max-width: 80px;
    height: 0.85em;
    border-radius: 6px;
    background: linear-gradient(
        90deg,
        rgba(148, 163, 184, 0.12) 0%,
        rgba(148, 163, 184, 0.22) 50%,
        rgba(148, 163, 184, 0.12) 100%
    );
    background-size: 200% 100%;
    animation: overviewShimmer 1.5s ease-in-out infinite;
}

#overviewTab.overview-loading .overview-engagement-metric--simple .overview-engagement-value::after {
    width: 50%;
}

/* Hover: KPI cards (subtle lift + glow) */
.overview-kpi {
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.25s ease,
                border-color 0.2s ease;
}

.overview-kpi:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(10, 12, 20, 0.35);
    border-color: rgba(147, 112, 219, 0.25);
}

/* Hover: metric cells */
.overview-metric {
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.22s ease,
                border-color 0.2s ease;
}

.overview-metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(10, 12, 20, 0.3);
    border-color: rgba(148, 163, 184, 0.2);
}

/* Hover: panels (subtle border glow) */
.overview-panel {
    transition: box-shadow 0.3s ease,
                border-color 0.25s ease,
                transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.overview-panel:hover {
    box-shadow: 0 18px 40px rgba(10, 12, 20, 0.38);
    border-color: rgba(148, 163, 184, 0.2);
}

.overview-panel--primary:hover {
    border-color: rgba(147, 112, 219, 0.5);
    box-shadow: 0 18px 40px rgba(10, 12, 20, 0.4), 0 0 0 1px rgba(147, 112, 219, 0.15);
}

.overview-panel--engagement:hover,
.overview-panel--activity:hover {
    border-color: rgba(147, 112, 219, 0.5);
}

/* Hover: activity stat rows */
.overview-activity-stat {
    transition: transform 0.2s ease,
                background 0.2s ease,
                border-color 0.2s ease;
}

.overview-activity-stat:hover {
    transform: translateX(4px);
    background: rgba(12, 14, 22, 0.8);
    border-color: rgba(120, 120, 150, 0.35);
}

.overview-activity-icon {
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.overview-activity-stat:hover .overview-activity-icon {
    transform: scale(1.08);
}

/* Engagement metric hover */
.overview-engagement-metric {
    transition: transform 0.22s ease,
                border-color 0.2s ease,
                box-shadow 0.22s ease;
}

.overview-engagement-metric:hover {
    border-color: rgba(148, 163, 184, 0.3);
    box-shadow: 0 6px 16px rgba(10, 12, 20, 0.25);
}

/* Engagement bar: smoother fill + subtle glow */
.overview-engagement-bar-fill {
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.35);
}

/* Value pop-in when data loads (optional class from JS) */
.overview-value-pop .overview-kpi-value,
.overview-value-pop .overview-metric-value,
.overview-value-pop .overview-engagement-value,
.overview-value-pop .overview-activity-value {
    animation: overviewValueIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    #overviewTab .overview-hero,
    #overviewTab .overview-grid,
    #overviewTab .overview-grid--two .overview-panel {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .overview-kpi,
    .overview-metric,
    .overview-panel,
    .overview-activity-stat,
    .overview-engagement-metric {
        transition-duration: 0.01ms !important;
    }
    .overview-kpi:hover,
    .overview-metric:hover,
    .overview-activity-stat:hover {
        transform: none !important;
    }
    .overview-engagement-bar-fill {
        transition-duration: 0.2s;
    }
    #overviewTab.overview-loading .overview-kpi-value::after,
    #overviewTab.overview-loading .overview-metric-value::after,
    #overviewTab.overview-loading .overview-engagement-value::after,
    #overviewTab.overview-loading .overview-activity-value::after {
        animation: none;
    }
}

/* Member Activity Panel */
.overview-panel--activity {
    background: linear-gradient(135deg, rgba(18, 20, 32, 0.95), rgba(12, 14, 24, 0.95));
    border: 1px solid rgba(147, 112, 219, 0.35);
}

.overview-activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.9rem;
    margin-top: 1.2rem;
}

.overview-activity-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(8, 10, 16, 0.6);
    border: 1px solid rgba(120, 120, 150, 0.2);
    border-radius: 12px;
    padding: 1rem;
}

.overview-activity-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

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

.overview-activity-label {
    font-size: 0.75rem;
    color: rgba(200, 200, 220, 0.65);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.overview-activity-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
}

.feature-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    animation: fadeInUp 0.25s ease;
}

.feature-status-grid--compact {
    gap: 0.75rem;
}

.feature-status-grid--compact .feature-status-card {
    background: rgba(15, 17, 28, 0.68);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    padding: 0.85rem 0.9rem;
    box-shadow: 0 10px 22px rgba(10, 12, 20, 0.28);
}

.feature-status-grid--compact .feature-status-icon {
    font-size: 1.1rem;
}

.feature-status-grid--compact .feature-status-label {
    font-size: 0.82rem;
}

.feature-status-card {
    background: rgba(26, 26, 46, 0.7);
    border: 2px solid rgba(147, 112, 219, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.feature-status-card:hover {
    border-color: var(--light-blue);
    box-shadow: 0 4px 12px rgba(0, 206, 209, 0.25);
}

.feature-status-card.enabled {
    border-color: rgba(34, 197, 94, 0.4);
}

.feature-status-card.enabled:hover {
    border-color: rgba(34, 197, 94, 0.6);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

.feature-status-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.feature-status-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    position: relative;
    z-index: 1;
}

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

/* Mobile responsive */
@media (max-width: 768px) {
    .overview-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .feature-status-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 0.75rem;
    }
    
    .overview-stat-card {
        padding: 1rem;
    }
    
    .overview-stat-card .stat-icon {
        font-size: 2rem;
    }
    
    .overview-stat-card .stat-value {
        font-size: 1.5rem;
    }
}

/* Channel placeholder hint styles */
.channels-hint {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-left: 0.35rem;
    vertical-align: middle;
    cursor: help;
}
.dim {
    color: var(--text-dim);
}


/* ===== AUTOMATION BUILDER ===== */
.automations-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.automation-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.automation-option {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.automation-option:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(91, 159, 255, 0.15), rgba(147, 112, 219, 0.1));
    box-shadow: 0 0 20px rgba(91, 159, 255, 0.3), 0 0 35px rgba(147, 112, 219, 0.2);
}

.automation-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(91, 159, 255, 0.2);
}

.automation-option strong {
    font-size: 0.95rem;
    color: var(--text-primary);
}

#automationBuilderModal .modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

#automationBuilderModal .modal-body {
    padding: 1.5rem;
}

@media (max-width: 768px) {
    .automation-options-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .automation-option {
        padding: 1rem;
    }
    
    .automation-option span {
        font-size: 1.5rem;
    }
}

/* Visual Builder CTA Button */
.visual-builder-cta {
    display: inline-flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.25) 0%, rgba(0, 206, 209, 0.15) 100%);
    border-radius: 18px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid rgba(147, 112, 219, 0.4);
    max-width: 650px;
    box-shadow: 0 12px 40px rgba(147, 112, 219, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.visual-builder-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 206, 209, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.visual-builder-cta:hover {
    box-shadow: 0 20px 60px rgba(147, 112, 219, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 0 60px rgba(0, 206, 209, 0.2);
    border-color: rgba(147, 112, 219, 0.7);
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.35) 0%, rgba(0, 206, 209, 0.25) 100%);
    transform: translateY(-4px);
}

.visual-builder-cta:hover::before {
    opacity: 1;
}

.visual-builder-cta:active {
    transform: translateY(-1px);
}

.visual-builder-icon {
    font-size: 3.5rem;
    filter: drop-shadow(0 4px 8px rgba(147, 112, 219, 0.3));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

.visual-builder-cta:hover .visual-builder-icon {
    transform: scale(1.15) rotate(8deg);
}

.visual-builder-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    text-align: left;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}

.visual-builder-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: left;
    margin-top: 0.5rem;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.visual-builder-cta svg {
    color: white;
    opacity: 0.9;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

.visual-builder-cta:hover svg {
    opacity: 1;
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .visual-builder-cta {
        flex-direction: column;
        text-align: center;
        padding: 1.75rem 1.5rem;
        gap: 1.25rem;
    }
    
    .visual-builder-title,
    .visual-builder-desc {
        text-align: center;
    }
    
    .visual-builder-cta svg {
        display: none;
    }
}

/* ===== AI Assistant Tab ===== */
.ai-config-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    margin-top: 24px;
}

@media (max-width: 1200px) {
    .ai-config-container {
        grid-template-columns: 1fr;
    }
}

.ai-config-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ai-preview-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ===== XP & Leveling Tab ===== */
.xp-config-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
}

/* Master switch spans full width at top */
.xp-config-container .selfroles-master-switch {
    grid-column: 1 / -1;
}

@media (max-width: 1200px) {
    .xp-config-container {
        grid-template-columns: 1fr;
    }
}

.xp-config-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.xp-config-panel .config-card {
    background: rgba(18, 20, 32, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 14px 30px rgba(10, 12, 20, 0.32);
}

.xp-preview-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.xp-preview-panel .config-card {
    background: rgba(18, 20, 32, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 14px 30px rgba(10, 12, 20, 0.32);
}

.xp-status-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.xp-status-card .status-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 0;
}

.xp-status-card .status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.xp-status-card .status-row:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(147, 112, 219, 0.3);
    transform: translateX(4px);
}

.xp-status-card .status-label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    min-width: 120px;
}

.xp-status-card .status-value {
    font-weight: 700;
    color: var(--text);
    font-size: 16px;
    text-align: right;
}

/* Emoji rendering fix */
span.emoji {
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

/* XP Exclusion Sections */
.exclusion-section {
    margin-bottom: 0.5rem;
    padding: 14px;
    background: rgba(147, 112, 219, 0.05);
    border: 1px solid rgba(147, 112, 219, 0.15);
    border-radius: 12px;
    transition: all 0.25s ease;
}

.exclusion-section:hover {
    background: rgba(147, 112, 219, 0.08);
    border-color: rgba(147, 112, 219, 0.25);
}

.xp-config-panel .exclusion-section {
    background: rgba(18, 20, 32, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.xp-config-panel .exclusion-section:hover {
    background: rgba(18, 20, 32, 0.7);
    border-color: rgba(148, 163, 184, 0.25);
}

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

.exclusion-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

/* Compact Radio Groups */
.radio-group.inline {
    display: flex;
    gap: 8px;
}

.radio-group.compact .radio-option {
    padding: 6px 10px;
    margin: 0;
}

.radio-option.mini {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 6px;
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(147, 112, 219, 0.25);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.radio-option.mini::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(147, 112, 219, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.radio-option.mini:hover {
    background: rgba(26, 26, 46, 0.8);
    border-color: rgba(147, 112, 219, 0.4);
}

.radio-option.mini:hover::before {
    transform: translateX(100%);
}

.radio-option.mini:has(input:checked) {
    background: rgba(147, 112, 219, 0.25);
    border-color: rgba(147, 112, 219, 0.6);
    box-shadow: 0 0 12px rgba(147, 112, 219, 0.3);
}

.radio-option.mini input {
    display: none;
}

.radio-option.mini span {
    color: var(--text-dim);
    transition: color 0.2s ease;
}

.radio-option.mini:has(input:checked) span {
    color: var(--primary);
    font-weight: 600;
}

/* Compact XP Multiplier */
.xp-multiplier-container.compact {
    padding: 16px;
    background: rgba(26, 26, 46, 0.5);
    border-radius: 12px;
}

.xp-multiplier-container.compact .multiplier-labels {
    justify-content: space-between;
}

/* Exclusion Content Wrapper */
.exclusion-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Tags List Styling */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    min-height: 32px;
    padding: 8px;
    background: rgba(26, 26, 46, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(147, 112, 219, 0.1);
    color: var(--text-dim);
}

/* Exclusion dropdowns */
.role-select,
.channel-select {
    width: 100%;
    max-width: 100%;
    padding: 11px 14px 11px 12px;
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(147, 112, 219, 0.35);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239370db' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.role-select:hover,
.channel-select:hover {
    border-color: rgba(147, 112, 219, 0.5);
    background: rgba(26, 26, 46, 0.9);
}

.role-select:focus,
.channel-select:focus {
    border-color: rgba(147, 112, 219, 0.7);
    box-shadow: 0 0 0 3px rgba(147, 112, 219, 0.2);
    background: rgba(26, 26, 46, 0.95);
}

.role-select option,
.channel-select option {
    background: #1a1a2e;
    color: var(--text);
    padding: 8px;
}

.tags-list .tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(147, 112, 219, 0.15);
    border: 1px solid rgba(147, 112, 219, 0.3);
    border-radius: 16px;
    font-size: 12px;
    color: var(--text);
}

.tags-list .tag .remove-tag {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.tags-list .tag .remove-tag:hover {
    opacity: 1;
}

/* Personality Grid */
.personality-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

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

.personality-card {
    background: rgba(26, 26, 46, 0.7);
    border: 2px solid rgba(147, 112, 219, 0.3);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.personality-card:hover {
    border-color: #9370DB;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.18), rgba(0, 206, 209, 0.12));
    box-shadow: 0 0 20px rgba(147, 112, 219, 0.4), 0 0 35px rgba(0, 206, 209, 0.25);
}

.personality-card.selected {
    border-color: #9370DB;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.2), rgba(0, 206, 209, 0.1));
    box-shadow: 0 0 20px rgba(147, 112, 219, 0.4);
}

.personality-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.personality-name {
    font-weight: 600;
    margin-bottom: 4px;
    color: #fff;
    font-size: 14px;
}

.personality-description {
    font-size: 11px;
    color: #999;
    line-height: 1.4;
}

/* Custom Prompt Section */
.custom-prompt-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(147, 112, 219, 0.3);
}

.custom-prompt-section h4 {
    margin-bottom: 0.5rem;
}

.premium-badge {
    display: inline-block;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* AI Status Card */
.ai-status-card {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.9), rgba(26, 26, 46, 0.7));
}

/* AI Settings Card - Disabled State */
#ai-settings-card,
.ai-dependent-settings {
    transition: opacity 0.3s ease, filter 0.3s ease;
}

#ai-settings-card.disabled,
.ai-dependent-settings.disabled,
.selfroles-preview-section.disabled {
    opacity: 0.3 !important;
    pointer-events: none !important;
    filter: grayscale(1) brightness(0.6) !important;
    transition: all 0.3s ease !important;
}

.selfroles-preview-section.disabled.config-card,
.selfroles-preview-section.disabled.config-card:hover {
    opacity: 0.3 !important;
    pointer-events: none !important;
    filter: grayscale(1) brightness(0.6) !important;
    border-color: rgba(139, 92, 246, 0.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

.selfroles-preview-section.disabled.config-card::before {
    opacity: 0 !important;
}

#ai-settings-card.disabled .personality-card,
.ai-dependent-settings.disabled .personality-card,
.selfroles-preview-section.disabled {
    cursor: not-allowed;
}

#ai-settings-card.disabled .personality-card:hover,
.ai-dependent-settings.disabled .personality-card:hover {
    transform: none;
    border-color: rgba(147, 112, 219, 0.3);
    background: rgba(26, 26, 46, 0.7);
    box-shadow: none;
}

/* Self-Roles Preview Toggle Styles */
.expand-toggle {
    transition: transform 0.3s ease, color 0.3s ease;
}

.expand-toggle.expanded {
    transform: rotate(180deg);
    color: var(--primary);
}

#selfrolePrevewContainer {
    max-height: 400px;
    overflow-y: auto;
    transition: max-height 0.3s ease;
}

#selfrolePrevewContainer.expanded {
    max-height: 80vh;
    overflow-y: auto;
}

/* Self-Roles 1:1 Scale Preview */
#selfrolePanelPreview.scale-1-1 {
    transform: scale(1);
    transform-origin: top left;
}

#selfrolePanelPreview.scale-1-1 .embed-preview {
    max-width: 516px;
    font-size: 14px;
}

#selfrolePanelPreview.scale-1-1 .embed-title {
    font-size: 16px;
    font-weight: 600;
}

#selfrolePanelPreview.scale-1-1 .embed-description {
    font-size: 14px;
    line-height: 1.375;
}

#selfrolePanelPreview.scale-1-1 .embed-footer {
    font-size: 12px;
}

#selfrolePanelPreview.scale-1-1 .discord-select-card {
    max-width: 516px;
    font-size: 14px;
}

#selfrolePanelPreview.scale-1-1 .discord-option {
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}

#selfrolePanelPreview.scale-1-1 .discord-option-emoji {
    font-size: 22px;
    width: 22px;
    height: 22px;
    min-width: 22px;
    flex-shrink: 0;
}

#selfrolePanelPreview.scale-1-1 .discord-option-emoji img.custom-emoji {
    width: 22px !important;
    height: 22px !important;
}

#selfrolePanelPreview.scale-1-1 .discord-option-content {
    gap: 0.3rem;
}

#selfrolePanelPreview.scale-1-1 .discord-option-title {
    font-size: 16px;
    line-height: 1.2;
}

#selfrolePanelPreview.scale-1-1 .discord-option-description {
    font-size: 14px;
    line-height: 1.375;
    color: #949ba4;
}

.status-grid {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.status-label {
    font-size: 13px;
    color: #999;
}

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

.status-badge {
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.status-enabled {
    background: rgba(45, 122, 79, 0.8);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.5);
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.2);
}

.status-disabled {
    background: rgba(68, 68, 68, 0.5);
    color: #999;
    border: 1px solid #666;
}

/* Preview Chat */
.ai-preview-chat {
    background: rgba(10, 10, 10, 0.6);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    min-height: 200px;
    border: 1px solid rgba(147, 112, 219, 0.2);
}

.preview-message {
    margin-bottom: 16px;
}

.preview-message:last-child {
    margin-bottom: 0;
}

.message-author {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #9370DB;
}

.ai-message .message-author {
    color: #00CED1;
}

.message-content {
    background: rgba(26, 26, 46, 0.6);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #9370DB;
    transition: opacity 0.3s ease;
    color: var(--text);
    line-height: 1.5;
}

.ai-message .message-content {
    border-left-color: #00CED1;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.feature-list li {
    padding: 0.65rem 1rem;
    color: #c5c5d8;
    font-size: 0.95rem;
    line-height: 1.6;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-left: 2px solid transparent;
}

.feature-list li:hover {
    color: #e0e0ff;
    background: rgba(147, 112, 219, 0.08);
    border-left-color: var(--primary);
    transform: translateX(4px);
}

/* Example Commands */
.example-commands {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.example-commands code {
    background: rgba(147, 112, 219, 0.15);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 206, 209, 0.3);
    font-size: 0.85rem;
    color: var(--light-blue);
    font-family: 'Courier New', monospace;
    font-weight: 500;
    display: inline-block;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.example-commands code:hover {
    background: rgba(0, 206, 209, 0.25);
    border-color: var(--light-blue);
    box-shadow: 0 0 18px rgba(0, 206, 209, 0.4), 0 0 30px rgba(147, 112, 219, 0.2);
}

/* Custom Commands List */
.custom-commands-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.custom-command-card {
    background: rgba(26, 26, 46, 0.7);
    border: 2px solid rgba(147, 112, 219, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    animation: fadeIn 0.3s ease;
}

.custom-command-card:hover {
    border-color: rgba(147, 112, 219, 0.6);
    box-shadow: 0 0 20px rgba(147, 112, 219, 0.3), 0 0 35px rgba(0, 206, 209, 0.2);
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.1), rgba(0, 206, 209, 0.05));
}

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

.custom-command-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.custom-command-name code {
    background: rgba(147, 112, 219, 0.15);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.95rem;
    color: var(--light-blue);
}

.custom-command-actions {
    display: flex;
    gap: 0.5rem;
}

.custom-command-response {
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid rgba(147, 112, 219, 0.5);
    max-height: 120px;
    overflow-y: auto;
}

.custom-command-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.custom-command-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.enabled {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge.disabled {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.custom-commands-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-dim);
}

.custom-commands-empty h3 {
    color: var(--text);
    margin-bottom: 0.5rem;
}

.custom-commands-empty p {
    margin-bottom: 1.5rem;
}

/* ===== MEE6-style Collapsible Cards ===== */
.collapsible-card {
    overflow: hidden;
}

.collapsible-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0;
    margin: -1.5rem;
    padding: 1.5rem;
    transition: background 0.2s ease;
}

.collapsible-card .card-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.collapsible-card .card-header h3 {
    margin: 0;
}

.collapsible-card .collapse-icon {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    color: var(--text-dim);
}

.collapsible-card.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.collapsible-card .card-content {
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.collapsible-card.collapsed .card-content {
    display: none;
}

/* ===== Radio Group Styles (MEE6-style) ===== */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.radio-option:hover {
    background: rgba(147, 112, 219, 0.1);
}

.radio-option input[type="radio"] {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.radio-option input[type="radio"]:checked + .radio-label strong {
    color: var(--primary);
}

.radio-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.radio-label strong {
    color: var(--text);
    font-weight: 600;
}

.radio-label small {
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* ===== Variable Chips (MEE6-style) ===== */
.variable-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.variable-chip {
    background: rgba(147, 112, 219, 0.2);
    color: var(--light-blue);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: 'Fira Code', monospace;
    cursor: pointer;
    border: 1px solid rgba(147, 112, 219, 0.3);
    transition: all 0.2s ease;
}

.variable-chip:hover {
    background: rgba(147, 112, 219, 0.35);
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* ===== Tags List (for No-XP roles/channels) ===== */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 40px;
    margin-top: 0.75rem;
}

.tag-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(99, 102, 241, 0.2);
    color: var(--text);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    animation: tagSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tagSlideIn {
    from {
        opacity: 0;
        transform: translateX(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.tag-chip:hover {
    box-shadow: 0 0 15px rgba(147, 112, 219, 0.3), 0 0 25px rgba(0, 206, 209, 0.2);
    border-color: rgba(147, 112, 219, 0.5);
}

.tag-chip .tag-remove {
    cursor: pointer;
    color: var(--text-dim);
    font-size: 1rem;
    line-height: 1;
    transition: all 0.2s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

.tag-chip .tag-remove:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    transform: scale(1.1);
}

.tag-chip.role-tag {
    background: rgba(147, 112, 219, 0.2);
    border-color: rgba(147, 112, 219, 0.3);
}

.tag-chip.role-tag:hover {
    background: rgba(147, 112, 219, 0.3);
    border-color: rgba(147, 112, 219, 0.5);
}

.tag-chip.channel-tag {
    background: rgba(0, 206, 209, 0.2);
    border-color: rgba(0, 206, 209, 0.3);
}

.tag-chip.channel-tag:hover {
    background: rgba(0, 206, 209, 0.3);
    border-color: rgba(0, 206, 209, 0.5);
}

/* ===== Rank Card Preview ===== */
.rank-card-preview {
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.3), rgba(0, 206, 209, 0.2));
    border-radius: 12px;
    padding: 1rem;
    overflow: hidden;
}

.rank-card-sample {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    position: relative;
}

.rank-card-avatar {
    position: relative;
    flex-shrink: 0;
}

.rank-card-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid var(--primary);
}

.rank-card-avatar .online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: #22c55e;
    border-radius: 50%;
    border: 3px solid rgba(0, 0, 0, 0.5);
}

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

.rank-card-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
}

.rank-card-xp {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.rank-card-progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.rank-card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--light-blue));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.rank-card-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.rank-badge, .level-badge {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-weight: 600;
}

.rank-badge span, .level-badge span {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

/* ===== Rank Card Editor Modal ===== */
.rank-card-modal {
    max-width: 600px;
}

.rank-card-modal .modal-body {
    padding: 1.5rem;
}

.color-picker-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.color-swatch:hover, .color-swatch.active {
    transform: scale(1.1);
    border-color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.background-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.background-option {
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.background-option:hover, .background-option.active {
    border-color: var(--primary);
    transform: scale(1.02);
}

.background-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.background-option.empty {
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.opacity-slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.opacity-slider-container input[type="range"] {
    flex: 1;
}

.opacity-value {
    min-width: 40px;
    text-align: right;
    color: var(--text);
    font-weight: 600;
}

/* ==========================================
   MEE6-Style Plugins Page
   ========================================== */

/* Plugins Hero Banner */
.plugins-hero {
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.3), rgba(0, 206, 209, 0.2));
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border: 1px solid rgba(147, 112, 219, 0.3);
}

.plugins-hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, #9370DB);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plugins-hero p {
    color: var(--text-dim);
    font-size: 1.1rem;
}

/* Filter Chips */
.plugins-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.filter-chip {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Plugin Sections */
.plugins-section {
    margin-bottom: 2.5rem;
}

.plugins-section .section-title {
    font-size: 1.3rem;
    color: var(--text);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

/* Plugins Grid */
.plugins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* Plugin Card */
.plugin-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.plugin-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(147, 112, 219, 0.25), 0 0 35px rgba(0, 206, 209, 0.15);
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.1), rgba(0, 206, 209, 0.05));
}

.plugin-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.plugin-card h3 {
    font-size: 1rem;
    color: var(--text);
    margin: 0;
}

.plugin-card p {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin: 0;
    line-height: 1.4;
    flex-grow: 1;
}

/* Plugin Toggle Button */
.plugin-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: fit-content;
}

.plugin-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.plugin-toggle.active {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.5);
    color: #22c55e;
}

.plugin-toggle.active:hover {
    background: rgba(34, 197, 94, 0.25);
}

.plugin-toggle.premium-only {
    background: rgba(147, 112, 219, 0.15);
    border-color: rgba(147, 112, 219, 0.5);
    color: #9370DB;
}

.plugin-toggle.premium-only:hover {
    background: rgba(147, 112, 219, 0.25);
}

.toggle-icon {
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .plugins-grid {
        grid-template-columns: 1fr;
    }
    
    .plugins-filter {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }
    
    .filter-chip {
        white-space: nowrap;
    }
    
    .plugins-hero h1 {
        font-size: 1.5rem;
    }
}
/* ============= AUDIT LOGS & REPUTATION STYLES ============= */

/* Logging controls and compact layout */
/* ============= LOGGING CONFIGURATION SECTION ============= */

/* Logs Sub-Tab Navigation */
.logs-subtab-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    flex-wrap: wrap;
}

.logs-subtab-btn {
    padding: 0.65rem 1.2rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.logs-subtab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(147, 112, 219, 0.08);
}

.logs-subtab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Logs Sub-Tab Panels */
.logs-subtab-panel {
    display: none;
}

.logs-subtab-panel.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

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

/* Main logging controls wrapper */
.log-controls {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Info/Help box */
.log-info-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 1rem;
    line-height: 1.5;
    font-size: 0.9rem;
}

.log-info-box strong {
    color: rgb(147, 112, 219);
    display: block;
    margin-bottom: 0.5rem;
}

/* Search input section */
.log-search-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.log-search-input {
    width: 100%;
    max-width: 500px;
    padding: 0.7rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
}

.log-search-input::placeholder {
    color: var(--text-secondary);
}

.log-search-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 8px rgba(147, 112, 219, 0.2);
}

/* Quick action buttons */
.log-quick-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.log-quick-actions button {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.log-quick-actions button:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(147, 112, 219, 0.1);
}

/* Hint text */
.log-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
    line-height: 1.5;
}

/* Categories container */
.log-categories-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Category card (expandable section) */
.log-category-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--card-bg);
    transition: all 0.2s ease;
}

.log-category-card:hover {
    border-color: rgba(147, 112, 219, 0.5);
    box-shadow: 0 2px 8px rgba(147, 112, 219, 0.1);
}

/* Category header (clickable to expand/collapse) */
.log-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.95rem 1.2rem;
    background: linear-gradient(90deg, rgba(147, 112, 219, 0.06), rgba(147, 112, 219, 0.02));
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.log-category-header:hover {
    background: linear-gradient(90deg, rgba(147, 112, 219, 0.1), rgba(147, 112, 219, 0.05));
}

.log-category-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    flex: 1;
}

.log-category-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.log-category-count {
    font-size: 0.75rem;
    color: rgba(147, 112, 219, 0.8);
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(147, 112, 219, 0.15);
    border: 1px solid rgba(147, 112, 219, 0.25);
    font-weight: 600;
    flex-shrink: 0;
}

.log-collapse-btn {
    background: none;
    border: none;
    color: rgba(147, 112, 219, 0.7);
    cursor: pointer;
    padding: 0.4rem;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.log-collapse-btn:hover {
    color: var(--primary);
    transform: scale(1.15);
}

/* When collapsed, just show header */
.log-category-card.collapsed .log-collapse-btn {
    transform: rotate(-90deg);
}

.log-category-card.collapsed .log-collapse-btn:hover {
    transform: rotate(-90deg) scale(1.15);
}

/* Category body - grid layout for compact display */
.log-category-body {
    padding: 1.25rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.9rem;
}

.log-category-card.collapsed .log-category-body {
    display: none;
}

.log-category-card.empty-search {
    opacity: 0.5;
}

/* Individual event row (compact card style) */
.log-event-row {
    display: grid;
    grid-template-columns: 28px 1fr 36px;
    gap: 0.75rem;
    align-items: center;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.05), rgba(147, 112, 219, 0.02));
    transition: all 0.2s ease;
}

.log-event-row:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.12), rgba(147, 112, 219, 0.06));
    box-shadow: 0 2px 8px rgba(147, 112, 219, 0.15);
    transform: translateY(-1px);
}

/* Event toggle/status indicator */
.log-event-toggle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.log-event-toggle.enabled {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-color: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

.log-event-toggle.enabled::after {
    content: '✓';
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
}

.log-event-toggle.disabled {
    background: rgba(107, 114, 128, 0.1);
    border-color: #9ca3af;
}

/* Event name */
.log-event-name {
    font-weight: 500;
    color: var(--text);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Channel dropdown - always visible in card layout */
.log-channel-select {
    display: block;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    background: rgba(26, 30, 50, 0.8);
    border: 1px solid rgba(147, 112, 219, 0.35);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239370DB' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    min-height: 44px;
}

.log-channel-select:hover,
.log-channel-select:focus {
    border-color: rgba(147, 112, 219, 0.65);
    background: rgba(32, 36, 56, 0.9);
    box-shadow: 0 0 12px rgba(147, 112, 219, 0.25);
    outline: none;
}

.log-channel-select:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(20, 24, 40, 0.6);
    border-color: rgba(100, 100, 120, 0.2);
}

/* Color picker */
.log-color-picker {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 2px;
    flex-shrink: 0;
}

.log-color-picker:hover {
    border-color: var(--primary);
    transform: scale(1.12);
    box-shadow: 0 0 14px rgba(147, 112, 219, 0.4);
}

.log-color-picker:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Filter Container */
#auditActionFilter,
#auditUserFilter,
#auditTargetFilter,
#auditStartDate {
    background: var(--input-bg, #1a1a2e);
    border: 1px solid var(--border, #3a3a6a);
    color: var(--text, #ffffff);
    padding: 0.6rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

#auditActionFilter:hover,
#auditUserFilter:hover,
#auditTargetFilter:hover,
#auditStartDate:hover {
    border-color: var(--primary, #9370DB);
}

/* Button Styles for Audit */
.btn-secondary {
    transition: all 0.2s ease;
}

.btn-success {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid #22c55e;
}

.btn-success:hover {
    background: rgba(34, 197, 94, 0.3);
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.2);
}

/* Audit Log Table */
table {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

thead tr {
    background: var(--card-bg, #2a2a4a);
}

tbody tr:hover {
    background: rgba(147, 112, 219, 0.05);
}

/* Code blocks in tables */
code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

/* Pagination Controls */
#auditPrevBtn:disabled,
#auditNextBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Stats Cards */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(147, 112, 219, 0.1);
}

/* Leaderboard Table Specific */
tbody tr {
    transition: background 0.2s ease;
}

tbody tr:nth-child(even) {
    background: rgba(147, 112, 219, 0.02);
}

/* Medal Emojis */
[style*="medal"] {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Audit Logs Styling */
.audit-filter-section {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.audit-filter-section h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.audit-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.audit-actions-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.audit-actions-buttons button {
    flex: 1;
    min-width: 150px;
}

.audit-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.audit-stat-card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s ease;
}

.audit-stat-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(147, 112, 219, 0.2), 0 0 35px rgba(0, 206, 209, 0.15);
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.08), rgba(0, 206, 209, 0.05));
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.audit-table-container {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.audit-table thead {
    background: var(--card-bg);
    border-bottom: 2px solid var(--border);
}

.audit-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
}

.audit-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease;
}

.audit-table tbody tr:hover {
    background: var(--hover-bg);
}

.audit-table td {
    padding: 1rem;
}

.audit-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.audit-pagination button {
    min-width: 120px;
}

#auditPageInfo {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Server Logs Grid & Cards Styling */
.logs-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.log-event-card {
    background: linear-gradient(135deg, rgba(20, 24, 40, 0.65) 0%, rgba(25, 30, 55, 0.6) 60%),
                radial-gradient(1200px circle at 0% 0%, rgba(147, 112, 219, 0.15), transparent 40%);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(147, 112, 219, 0.35);
    border-radius: 22px;
    padding: 1.85rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Neon glow effect on hover */
.log-event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(147, 112, 219, 0.1) 0%, transparent 50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 20px;
}

.log-event-card:hover {
    border-color: rgba(147, 112, 219, 0.6);
    transform: translateY(-3px);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.35),
        0 0 24px rgba(147, 112, 219, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    background: linear-gradient(135deg, rgba(22, 26, 46, 0.75) 0%, rgba(28, 34, 62, 0.7) 60%);
}

.log-event-card:hover::before {
    opacity: 1;
}

.log-event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.log-event-card-disabled {
    opacity: 0.45;
    background: linear-gradient(135deg, rgba(40, 45, 70, 0.45) 0%, rgba(35, 40, 65, 0.4) 60%);
    border-color: rgba(120, 120, 140, 0.22);
}

.log-event-card-disabled:hover {
    border-color: rgba(100, 100, 120, 0.2);
    box-shadow: none;
    transform: none;
}

.log-event-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    z-index: 1;
}

/* Channel Control */
.log-channel-control {
    width: 100%;
    margin-bottom: 1.5rem;
}

.log-channel-control label {
    display: block;
    margin-bottom: 0.85rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.log-channel-select {
    width: 100%;
    padding: 0.85rem 2.5rem 0.85rem 1rem;
    background: rgba(24, 28, 48, 0.7);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(147, 112, 219, 0.35);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="%23a78bfa" d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px 18px;
    min-height: 2.25rem;
    box-sizing: border-box;
}

.log-channel-select:hover {
    border-color: rgba(147, 112, 219, 0.6);
    background: rgba(26, 32, 58, 0.75);
    box-shadow: 0 0 18px rgba(147, 112, 219, 0.18);
}

.log-channel-select:focus {
    outline: none;
    border-color: rgba(147, 112, 219, 0.8);
    box-shadow: 0 0 0 3px rgba(147, 112, 219, 0.22);
    background: rgba(28, 34, 62, 0.8);
}

/* Color Control */
.log-color-control {
    width: 100%;
}

.log-color-control label {
    display: block;
    margin-bottom: 0.85rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.3px;
    text-align: center;
}

.log-color-picker {
    width: 100%;
    height: 56px;
    border: 1px solid rgba(147, 112, 219, 0.35);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: none;
    padding: 0;
    box-sizing: border-box;
}

.log-color-picker:hover {
    box-shadow: 0 0 18px rgba(147, 112, 219, 0.28), inset 0 0 12px rgba(147, 112, 219, 0.08);
    border-color: rgba(147, 112, 219, 0.55);
}

.log-color-picker:focus {
    outline: none;
    box-shadow: 0 0 22px rgba(147, 112, 219, 0.36), inset 0 0 12px rgba(147, 112, 219, 0.12);
    border-color: rgba(147, 112, 219, 0.75);
}

/* Rounded color swatch for WebKit */
input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 16px;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 16px;
}

/* Firefox color input rounding */
input[type="color"]::-moz-focus-inner {
    border: 0;
    padding: 0;
}
input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 16px;
}

/* Responsive Tables */
@media (max-width: 1024px) {
    table {
        font-size: 0.85rem;
    }
    
    table th,
    table td {
        padding: 0.75rem !important;
    }
    
    .audit-filters-grid {
        grid-template-columns: 1fr;
    }
    
    .audit-actions-buttons {
        flex-direction: column;
    }
    
    .audit-actions-buttons button {
        width: 100%;
    }
    
    .logs-events-grid {
        grid-template-columns: 1fr;
    }
    
    .logs-header-section {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .logs-actions-group {
        width: 100%;
    }
    
    .logs-actions-group button {
        flex: 1;
    }
}
.reputation-tab-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.reputation-tab-btn {
    flex: 1;
    min-width: 140px;
    transition: all 0.3s ease;
}

.reputation-tab-btn.active {
    background: var(--primary) !important;
    color: white !important;
}

.reputation-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.reputation-stat-card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s ease;
}

.reputation-stat-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(147, 112, 219, 0.2), 0 0 35px rgba(0, 206, 209, 0.15);
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.08), rgba(0, 206, 209, 0.05));
}

.reputation-table-container {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
}

.reputation-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.reputation-table thead {
    background: var(--card-bg);
    border-bottom: 2px solid var(--border);
}

.reputation-table th {
    padding: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.reputation-table .rank-column {
    text-align: center;
    width: 60px;
}

.reputation-table .member-column {
    text-align: left;
}

.reputation-table .points-column {
    text-align: right;
    width: 120px;
}

.reputation-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease;
}

.reputation-table tbody tr:hover {
    background: var(--hover-bg);
}

.reputation-table td {
    padding: 1rem;
}

/* Responsive Tables */
@media (max-width: 1024px) {
    table {
        font-size: 0.85rem;
    }
    
    table th,
    table td {
        padding: 0.75rem !important;
    }
    
    .audit-filters-grid {
        grid-template-columns: 1fr;
    }
    
    .audit-actions-buttons {
        flex-direction: column;
    }
    
    .audit-actions-buttons button {
        width: 100%;
    }
}

@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    table tr {
        display: inline-block;
        border: 1px solid var(--border);
        border-radius: 4px;
        margin-bottom: 0.5rem;
        padding: 1rem;
    }
    
    table th {
        display: none;
    }
    
    table td {
        display: block;
        text-align: right;
        padding: 0.5rem 0 !important;
    }
    
    table td::before {
        content: attr(data-label);
        float: left;
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.7rem;
        color: var(--text-secondary);
    }
}

/* Music Status Card Styles */
.music-status-card .status-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 0;
}

.music-status-card .status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.music-status-card .status-row:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(147, 112, 219, 0.3);
    transform: translateX(4px);
}

.music-status-card .status-label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    min-width: 120px;
}

.music-status-card .status-value {
    font-weight: 700;
    color: var(--text);
    font-size: 16px;
    text-align: right;
}

/* Config Hint */
.config-hint {
    display: block;
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    line-height: 1.4;
    opacity: 0.8;
}

/* Music Tab Grid Responsive */
.music-tab-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 1200px) {
    .music-tab-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ==================== SCROLLBAR STYLING ==================== */
/* Hide scrollbars while maintaining scroll functionality */

::-webkit-scrollbar {
    display: none;
}

/* Firefox */
* {
    scrollbar-width: none;
}

/* IE and Edge */
html {
    -ms-overflow-style: none;
}

/* ==================== END SCROLLBAR STYLING ==================== */
/* Visual Builder Navigation Button */
.visual-builder-nav-btn:hover {
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.4) !important;
}

.visual-builder-nav-btn:active {
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.35) !important;
}

/* ===== Self-Roles Tab ===== */
.selfroles-config-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 18px;
}

@media (max-width: 1200px) {
    .selfroles-config-container {
        grid-template-columns: 1fr;
    }
}

/* Master Switch with Circulating Light Animation */
.selfroles-master-switch {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(15, 10, 30, 0.8), rgba(10, 5, 25, 0.8));
    border: 1px solid rgba(147, 112, 219, 0.15);
    border-radius: 12px;
    position: relative;
    transition: all 0.3s ease;
}

/* White light circulating border */
.selfroles-master-switch::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        transparent 30%,
        rgba(255, 255, 255, 0.9) 50%,
        transparent 70%,
        transparent 100%
    );
    background-size: 200% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.selfroles-master-switch:hover {
    border-color: rgba(147, 112, 219, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

.selfroles-master-switch:hover::before {
    animation: shineTravel 12s linear infinite;
    opacity: 1;
}

.master-switch-icon {
    font-size: 2rem;
    filter: drop-shadow(0 3px 8px rgba(147, 112, 219, 0.4));
    transition: all 0.3s ease;
}

.selfroles-master-switch:hover .master-switch-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 4px 12px rgba(147, 112, 219, 0.6));
}

.master-switch-content {
    flex: 1;
}

.master-switch-title {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(147, 112, 219, 1), rgba(0, 206, 209, 1));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.master-switch-title .unsaved-badge {
    -webkit-text-fill-color: #fbbf24 !important;
    background-clip: unset !important;
    -webkit-background-clip: unset !important;
    color: #fbbf24 !important;
    background: rgba(251, 191, 36, 0.15) !important;
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
}

.master-switch-description {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-weight: 500;
}

/* Premium Master Toggle Switch - Scaled 1.5x */
.master-toggle-switch {
    position: relative;
    display: inline-block;
    width: 78px;
    height: 39px;
    flex-shrink: 0;
    transform: translateZ(0);
    will-change: transform;
}

.master-toggle-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.master-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    border-radius: 39px;
    border: 2.25px solid rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 1.5px 4.5px rgba(0, 0, 0, 0.2);
}

.master-toggle-slider::before {
    position: absolute;
    content: "";
    height: 30px;
    width: 30px;
    left: 4.5px;
    bottom: 3px;
    background: rgba(255, 255, 255, 0.9);
    transition: transform 0.15s ease;
    border-radius: 50%;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.master-toggle-switch input[type="checkbox"]:checked + .master-toggle-slider {
    background: rgba(147, 112, 219, 0.15);
    border-color: rgba(147, 112, 219, 0.5);
    box-shadow: inset 0 1.5px 4.5px rgba(147, 112, 219, 0.1);
}

.master-toggle-switch input[type="checkbox"]:checked + .master-toggle-slider::before {
    transform: translateX(39px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3), 0 0 12px rgba(147, 112, 219, 0.2);
}

.master-toggle-slider:hover {
    border-color: rgba(147, 112, 219, 0.5);
    box-shadow: inset 0 1.5px 4.5px rgba(0, 0, 0, 0.2);
}

.master-toggle-switch input[type="checkbox"]:checked + .master-toggle-slider:hover {
    background: rgba(147, 112, 219, 0.2);
    box-shadow: inset 0 1.5px 4.5px rgba(147, 112, 219, 0.15);
}

.master-toggle-switch input[type="checkbox"]:focus + .master-toggle-slider {
    outline: 2px solid rgba(147, 112, 219, 0.5);
    outline-offset: 2px;
}

.selfroles-config-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.selfroles-config-panel .config-card {
    padding: 1.1rem;
    margin-bottom: 0;
    background: rgba(18, 20, 32, 0.7);
    border: 1px solid rgba(147, 112, 219, 0.2);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 1px rgba(147, 112, 219, 0.05);
    position: relative;
    transition: all 0.25s ease;
}

.selfroles-config-panel .config-card:hover {
    border-color: rgba(147, 112, 219, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 1px rgba(147, 112, 219, 0.08);
}

.selfroles-config-panel .config-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.selfroles-config-panel .config-card .premium-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.8), rgba(0, 206, 209, 0.8));
    border: 1px solid rgba(147, 112, 219, 0.6);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 2px 8px rgba(147, 112, 219, 0.3);
}

.selfroles-config-panel .form-group {
    margin-bottom: 0.85rem;
}

.selfroles-config-panel .form-group label {
    margin-bottom: 0.3rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}

.selfroles-config-panel .form-group small {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    color: var(--text-dim);
}

.selfroles-config-panel .form-group input[type="range"] {
    margin-top: 0.5rem;
    cursor: pointer;
}

/* Collapsible Buttons */
.collapsible-btn {
    width: 100%;
    padding: 0.7rem 0.85rem;
    background: rgba(147, 112, 219, 0.12);
    border: 1px solid rgba(147, 112, 219, 0.25);
    border-radius: 8px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    margin-bottom: 0.75rem;
    text-align: left;
}

.collapsible-btn:hover {
    background: rgba(147, 112, 219, 0.2);
    border-color: rgba(147, 112, 219, 0.4);
}

.collapsible-icon {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    transition: transform 0.2s ease;
    min-width: 16px;
}

.collapsible-btn[aria-expanded="true"] .collapsible-icon {
    transform: rotate(90deg);
}

.collapsible-content {
    padding: 0.75rem 1rem;
    background: rgba(147, 112, 219, 0.06);
    border: 1px solid rgba(147, 112, 219, 0.15);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    animation: slideDown 0.2s ease;
}

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

.collapsible-content .form-group:last-child {
    margin-bottom: 0;
}

.collapsible-content .form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.75rem;
    align-items: end;
}

.collapsible-content .form-row .form-group {
    margin-bottom: 0;
}

.selfroles-config-panel .role-multiselect {
    max-height: 150px;
    overflow-y: auto;
    resize: none;
}

/* Checkbox List for Roles */
.roles-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 10px;
    max-height: 240px;
    overflow-y: auto;
}

.role-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
    user-select: none;
}

.role-checkbox-item:hover {
    background: rgba(139, 92, 246, 0.15);
}

/* Custom Checkbox Styling */
.role-checkbox-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(139, 92, 246, 0.4);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
    position: relative;
}

.role-checkbox-item input[type="checkbox"]:hover {
    border-color: rgba(139, 92, 246, 0.7);
    background: rgba(139, 92, 246, 0.08);
}

.role-checkbox-item input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--primary), var(--light-blue));
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(147, 112, 219, 0.4);
}

.role-checkbox-item input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.role-checkbox-item label {
    flex: 1;
    margin: 0;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text);
    transition: color 0.15s ease;
}

.role-checkbox-item input[type="checkbox"]:checked + label {
    color: var(--primary);
    font-weight: 600;
}

/* Range Slider Styling */
.selfroles-config-panel input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(90deg, rgba(147, 112, 219, 0.3), rgba(0, 206, 209, 0.3));
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin-top: 0.75rem;
    cursor: pointer;
}

.selfroles-config-panel input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--light-blue));
    cursor: pointer;
    box-shadow: 0 0 12px rgba(147, 112, 219, 0.6), 0 2px 6px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
}

.selfroles-config-panel input[type="range"]::-webkit-slider-thumb:hover {
    box-shadow: 0 0 16px rgba(147, 112, 219, 0.8), 0 0 8px rgba(0, 206, 209, 0.6);
    transform: scale(1.1);
}

.selfroles-config-panel input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--light-blue));
    cursor: pointer;
    box-shadow: 0 0 12px rgba(147, 112, 219, 0.6), 0 2px 6px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
}

.selfroles-config-panel input[type="range"]::-moz-range-thumb:hover {
    box-shadow: 0 0 16px rgba(147, 112, 219, 0.8), 0 0 8px rgba(0, 206, 209, 0.6);
    transform: scale(1.1);
}

.selfroles-config-panel input[type="range"]::-moz-range-track {
    background: transparent;
    border: none;
}

.selfroles-config-panel input[type="range"]:focus {
    outline: none;
}

.selfroles-config-panel .save-btn {
    background: linear-gradient(135deg, var(--primary), var(--light-blue));
    border: none;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 700;
}

.selfroles-config-panel .save-btn:hover {
    box-shadow: 0 6px 20px rgba(147, 112, 219, 0.4);
}

.selfroles-preview-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 100px;
}

.selfroles-status-card .status-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 0;
}

.selfroles-status-card .status-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    gap: 2rem;
}

.selfroles-status-card .status-row:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(147, 112, 219, 0.3);
    transform: translateX(4px);
}

.selfroles-status-card .status-label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    min-width: 100px;
    flex-shrink: 0;
}

.selfroles-status-card .status-value {
    font-weight: 700;
    color: var(--text);
    font-size: 15px;
    text-align: right;
    flex-shrink: 0;
}

/* Panel Item Improvements */
.panel-item {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(0, 206, 209, 0.04));
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.panel-item:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(147, 112, 219, 0.5), 0 0 40px rgba(0, 206, 209, 0.3), inset 0 0 30px rgba(147, 112, 219, 0.1);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(0, 206, 209, 0.08));
}

.panel-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.panel-details {
    color: var(--text-dim);
    font-size: 0.85rem;
    line-height: 1.5;
}

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

.panel-action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.panel-action-btn.delete {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.panel-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.25);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.panel-action-btn.edit {
    background: rgba(147, 112, 219, 0.15);
    color: var(--primary);
}

.panel-action-btn.edit:hover {
    background: rgba(147, 112, 219, 0.25);
    box-shadow: 0 4px 12px rgba(147, 112, 219, 0.2);
}

/* Role ordering list */
.role-order-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 10px;
    min-height: 56px;
}

.role-order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.75rem;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 8px;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.role-order-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.role-order-item.drag-over {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.2);
    transform: scale(1.02);
}

.role-order-drag-handle {
    cursor: grab;
    color: var(--text-dim);
    font-size: 1.4rem;
    letter-spacing: -4px;
    flex-shrink: 0;
    user-select: none;
    transition: all 0.15s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.role-order-item:hover .role-order-drag-handle {
    cursor: grab;
    color: var(--text);
    background: rgba(139, 92, 246, 0.15);
}

.role-order-item:active .role-order-drag-handle,
.role-order-item.dragging .role-order-drag-handle {
    cursor: grabbing;
    background: rgba(139, 92, 246, 0.25);
}

.role-order-name {
    font-weight: 600;
    color: var(--text);
}

.role-order-controls {
    display: flex;
    gap: 0.35rem;
}

.role-order-preview {
    font-size: 0.85rem;
    color: var(--text-dim);
    flex: 1;
    text-align: center;
}

.order-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-btn:hover:not(:disabled) {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
}

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

.role-order-empty {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Role customization modal */
.role-customization-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.role-customization-content {
    background: var(--bg-secondary);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.role-customization-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
}

.role-customization-header h4 {
    margin: 0;
    font-size: 1.1rem;
}

.role-customization-close {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.role-customization-close:hover {
    background: rgba(139, 92, 246, 0.1);
}

.role-customization-body {
    padding: 1.5rem;
}

.role-customization-body .form-group {
    margin-bottom: 1rem;
}

.role-customization-preview {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
}

.role-customization-footer {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(139, 92, 246, 0.15);
}

.role-custom-save,
.role-custom-cancel {
    flex: 1;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.15s ease;
}

.role-custom-save {
    background: rgba(139, 92, 246, 0.3);
    color: var(--text);
    border: 1px solid rgba(139, 92, 246, 0.4);
}

.role-custom-save:hover {
    background: rgba(139, 92, 246, 0.4);
    border-color: rgba(139, 92, 246, 0.6);
}

.role-custom-cancel {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.role-custom-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

/* ===== MUSIC BETA WARNING STYLES ===== */
.music-beta-warning {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(251, 191, 36, 0.04));
    border: 1.5px solid rgba(251, 191, 36, 0.25);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.music-beta-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    line-height: 1;
}

.music-beta-warning::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #fbbf24, transparent);
}

.music-beta-warning:hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(251, 191, 36, 0.08));
    border-color: rgba(251, 191, 36, 0.35);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.15);
}

/* ============= CUSTOM BOT STYLING ============= */

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.custom-bot-hero {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(0, 206, 209, 0.1));
    border: 2px solid var(--primary);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.custom-bot-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.custom-bot-hero-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.custom-bot-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.5));
}

.custom-bot-hero h3 {
    margin: 0;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.custom-bot-hero p {
    margin: 0.5rem 0 0;
    color: var(--text-dim);
    font-size: 1.05rem;
}

.custom-bot-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
}

.custom-bot-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.custom-bot-feature:hover {
    background: rgba(139, 92, 246, 0.12);
    transform: translateX(5px);
}

.custom-bot-feature-icon {
    color: var(--success);
    font-weight: bold;
    font-size: 1.2rem;
}

.custom-bot-guide-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--light-blue));
    color: white;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    position: relative;
    z-index: 1;
}

.custom-bot-guide-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
    text-decoration: none;
}

.custom-bot-token-input-wrapper {
    position: relative;
}

.custom-bot-token-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 1.3rem;
    padding: 0.5rem;
    transition: all 0.2s ease;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-bot-token-toggle:hover {
    color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.custom-bot-token-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

.custom-bot-warning-card {
    margin-top: 1.5rem;
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
}

.custom-bot-warning-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.custom-bot-warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.custom-bot-warning-title {
    margin: 0 0 0.75rem;
    color: #eab308;
    font-weight: 600;
    font-size: 1.1rem;
}

.custom-bot-warning-card ul {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--text-dim);
}

.custom-bot-warning-card li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.custom-bot-button-group {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.custom-bot-test-btn {
    background: rgba(59, 130, 246, 0.15);
    border: 2px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.custom-bot-test-btn:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

@media (max-width: 768px) {
    .config-grid {
        grid-template-columns: 1fr;
    }
    
    .custom-bot-hero-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .custom-bot-features {
        grid-template-columns: 1fr;
    }
    
    .custom-bot-button-group {
        flex-direction: column;
    }
    
    .custom-bot-button-group button,
    .custom-bot-button-group .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Custom Bot Status Preview */
.custom-bot-preview {
    background: rgba(26, 26, 46, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.custom-bot-preview-title {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.custom-bot-preview-card {
    background: rgba(40, 40, 60, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.custom-bot-preview-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--light-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    position: relative;
}

.custom-bot-preview-avatar::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: #23a55a;
    border: 3px solid rgba(26, 26, 46, 0.9);
    border-radius: 50%;
}

.custom-bot-preview-info {
    flex: 1;
}

.custom-bot-preview-name {
    font-weight: 700;
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.custom-bot-preview-badge {
    background: #5865f2;
    color: white;
    font-size: 0.65rem;
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
}

.custom-bot-preview-status {
    font-size: 0.875rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.custom-bot-preview-status-icon {
    font-size: 0.75rem;
}

/* Modern Number Input Styles */
.modern-number-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.modern-number-input input[type="number"] {
    flex: 1;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.12), rgba(0, 206, 209, 0.08));
    border: 2px solid rgba(147, 112, 219, 0.3);
    border-radius: 12px;
    padding: 1rem 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(147, 112, 219, 0.15), inset 0 1px 3px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.modern-number-input input[type="number"]:hover {
    border-color: rgba(147, 112, 219, 0.6);
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.18), rgba(0, 206, 209, 0.12));
    box-shadow: 0 4px 12px rgba(147, 112, 219, 0.25), inset 0 1px 3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.modern-number-input input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.22), rgba(0, 206, 209, 0.15));
    box-shadow: 0 0 0 4px rgba(147, 112, 219, 0.2), 0 4px 16px rgba(147, 112, 219, 0.3);
    transform: translateY(-1px);
}

/* Hide default number input spinners */
.modern-number-input input[type="number"]::-webkit-inner-spin-button,
.modern-number-input input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.modern-number-input input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.modern-number-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.25), rgba(0, 206, 209, 0.15));
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(147, 112, 219, 0.2);
    position: relative;
    overflow: hidden;
}

.modern-number-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.modern-number-btn:hover::before {
    width: 100px;
    height: 100px;
}

.modern-number-btn:hover {
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.4), rgba(0, 206, 209, 0.3));
    box-shadow: 0 4px 12px rgba(147, 112, 219, 0.35);
    transform: translateY(-2px) scale(1.05);
}

.modern-number-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 6px rgba(147, 112, 219, 0.25);
}

.modern-number-btn svg {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.modern-number-btn.decrease {
    background: linear-gradient(135deg, rgba(219, 112, 147, 0.25), rgba(255, 99, 71, 0.15));
    color: #ff6b6b;
}

.modern-number-btn.decrease:hover {
    background: linear-gradient(135deg, rgba(219, 112, 147, 0.4), rgba(255, 99, 71, 0.3));
    box-shadow: 0 4px 12px rgba(219, 112, 147, 0.35);
}

.modern-number-btn.increase {
    background: linear-gradient(135deg, rgba(112, 219, 147, 0.25), rgba(71, 255, 99, 0.15));
    color: #6bff6b;
}

.modern-number-btn.increase:hover {
    background: linear-gradient(135deg, rgba(112, 219, 147, 0.4), rgba(71, 255, 99, 0.3));
    box-shadow: 0 4px 12px rgba(112, 219, 147, 0.35);
}

/* Ripple animation on click */
@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(4);
        opacity: 0;
    }
}

.modern-number-btn:active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: ripple 0.6s ease-out;
}
/* Force warning system to always be visible and interactive */
#moderationTab .selfroles-config-panel,
#moderationTab .selfroles-config-panel *,
#moderationTab .config-card,
#moderationTab .form-group,
#moderationTab input,
#moderationTab textarea,
#moderationTab button {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Engagement Metrics Panel */
.overview-panel--engagement {
    background: linear-gradient(135deg, rgba(18, 20, 32, 0.95), rgba(12, 14, 24, 0.95));
    border: 1px solid rgba(147, 112, 219, 0.35);
}

.overview-engagement-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    margin-top: 1.2rem;
}

.overview-engagement-metric {
    background: rgba(8, 10, 16, 0.6);
    border: 1px solid rgba(120, 120, 150, 0.2);
    border-radius: 12px;
    padding: 1.2rem;
}

.overview-engagement-metric--simple {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
}

.overview-engagement-label {
    font-size: 0.75rem;
    color: rgba(200, 200, 220, 0.65);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.overview-engagement-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.overview-engagement-metric--simple .overview-engagement-label {
    margin-bottom: 0.8rem;
}

.overview-engagement-metric--simple .overview-engagement-value {
    font-size: 2.2rem;
    margin-bottom: 0;
}

.overview-engagement-bar { width: 100%; height: 8px; background: rgba(60, 60, 80, 0.4); border-radius: 8px; overflow: hidden; position: relative; }

.overview-engagement-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #7C3AED, #06B6D4);
    border-radius: 8px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.4);
}

@media (max-width: 768px) {
    .overview-engagement-grid {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }
}

/* Two-column layout for economy Advanced Features and Donations */
.economy-feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 900px) {
    .economy-feature-row {
        grid-template-columns: 1fr;
    }
}



