/* Custom HSL Color System */
:root {
    --bg-base: #06060c;
    --bg-card: rgba(18, 19, 36, 0.7);
    --bg-header: rgba(10, 11, 22, 0.85);
    --border-glow: rgba(130, 80, 255, 0.2);
    --border-accent: rgba(0, 221, 255, 0.15);
    
    --color-text-main: #f0f0f7;
    --color-text-sub: #a0a2c0;
    
    --color-primary: #00ddff;      /* Cyan */
    --color-secondary: #8a2be2;    /* Violet */
    --color-accent: #ff007f;       /* Deep Pink */
    --color-success: #00ffaa;      /* Mint Green */
    --color-danger: #ff3366;       /* Soft Red */
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-premium: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Reset & General Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-base);
    color: var(--color-text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Rich Vibrant Dynamic Background (Moving Blob Ambient Glow) */
.glass-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 10% 20%, rgba(138, 43, 226, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(0, 221, 255, 0.12) 0%, transparent 40%);
    pointer-events: none;
}

.glass-bg::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 0, 127, 0.05) 0%, transparent 50%);
    animation: rotateBg 40s linear infinite;
}

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

/* Header Design */
.app-header {
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    font-size: 2.25rem;
    filter: drop-shadow(0 0 10px rgba(0, 221, 255, 0.6));
    animation: pulseLogo 3s ease-in-out infinite;
}

@keyframes pulseLogo {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo-text h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text p {
    color: var(--color-text-sub);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* Status Indicators */
.status-panel {
    display: flex;
    gap: 1.5rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    font-weight: 500;
}

.status-lamp {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-danger);
    box-shadow: 0 0 10px var(--color-danger);
    transition: var(--transition-smooth);
}

.status-indicator.online .status-lamp {
    background-color: var(--color-success);
    box-shadow: 0 0 10px var(--color-success);
}

/* Dashboard Grid Layout */
.dashboard-grid {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

/* Card Design */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border-radius: 16px;
    border: 1px solid var(--border-glow);
    box-shadow: var(--shadow-premium);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.card:hover {
    border-color: rgba(0, 221, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 221, 255, 0.05);
}

.span-2 {
    grid-column: span 2;
}

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

.card-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
}

.card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-body.no-padding {
    padding: 0;
}

.subtitle {
    font-size: 0.85rem;
    color: var(--color-text-sub);
    margin-bottom: 1rem;
}

/* Active VC Badge */
.active-vc-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.4rem 0.8rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-sub);
    transition: var(--transition-smooth);
}

.active-vc-badge.active {
    background: rgba(0, 221, 255, 0.1);
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 0 10px rgba(0, 221, 255, 0.2);
}

/* Speakers Visualizer Grid */
.speaker-grid-container {
    flex: 1;
    margin-bottom: 1.5rem;
}

.speaker-visualizer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1.5rem;
    min-height: 120px;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.05);
    align-content: center;
}

.no-speakers {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--color-text-sub);
    font-size: 0.9rem;
    padding: 2rem;
}

/* Live Speaker Node */
.speaker-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.speaker-avatar-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1f213d, #0f101f);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    transition: var(--transition-smooth);
}

.speaker-node.speaking .speaker-avatar-wrapper {
    border-color: var(--color-primary);
    box-shadow: 0 0 20px rgba(0, 221, 255, 0.4);
    animation: borderPulse 1.5s infinite;
}

.speaker-node.speaking .speaker-avatar-wrapper::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    opacity: 0;
    animation: ripplePulse 1.5s cubic-bezier(0.25, 0, 0, 1) infinite;
}

@keyframes borderPulse {
    0%, 100% { border-color: var(--color-primary); }
    50% { border-color: var(--color-secondary); }
}

@keyframes ripplePulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.3); opacity: 0; }
}

.speaker-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-sub);
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--transition-smooth);
}

.speaker-node.speaking .speaker-name {
    color: var(--color-primary);
    text-shadow: 0 0 10px rgba(0, 221, 255, 0.2);
}

/* Mic Controls */
.mic-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 1.25rem;
    border-radius: 12px;
}

.btn-mic {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    outline: none;
    background: linear-gradient(135deg, #18193a, #0d0e22);
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: var(--transition-smooth);
    user-select: none;
    position: relative;
}

.btn-mic:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.08);
}

.btn-mic .mic-text {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 2px;
    color: var(--color-text-sub);
}

.btn-mic.active {
    background: linear-gradient(135deg, var(--color-danger), var(--color-accent));
    border-color: var(--color-accent);
    box-shadow: 0 0 25px rgba(255, 51, 102, 0.5);
    animation: pulseRecording 1.5s ease-in-out infinite;
}

.btn-mic.active .mic-text {
    color: #fff;
}

@keyframes pulseRecording {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.mic-info {
    flex: 1;
}

.info-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 2px;
}

.info-desc {
    font-size: 0.8rem;
    color: var(--color-text-sub);
    line-height: 1.4;
}

/* Forms & UI Inputs */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-sub);
    margin-bottom: 0.5rem;
}

input, textarea, select {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--color-text-main);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-smooth);
}

input:focus, textarea:focus, select:focus {
    border-color: var(--color-primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 10px rgba(0, 221, 255, 0.1);
}

textarea {
    resize: none;
    height: 80px;
}

#sim-command {
    resize: vertical;
    min-height: 80px;
}


/* Row-alignment layout helper */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.form-row .form-group {
    margin-bottom: 0;
}

.hidden {
    display: none !important;
}

/* Buttons */
.btn {
    display: block;
    width: 100%;
    padding: 0.85rem 1.5rem;
    border-radius: 8px;
    border: none;
    outline: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 221, 255, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 221, 255, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(255, 51, 102, 0.15);
    color: var(--color-danger);
    border: 1px solid rgba(255, 51, 102, 0.3);
    margin-top: 0.75rem;
}

.btn-danger:hover {
    background: rgba(255, 51, 102, 0.3);
    border-color: var(--color-danger);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.25);
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--color-text-sub);
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
}

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

/* Logs Monitor Log viewport */
.log-viewport {
    height: 250px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    padding: 1.25rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    scroll-behavior: smooth;
}

.log-row {
    line-height: 1.5;
    word-break: break-all;
    border-left: 2px solid transparent;
    padding-left: 0.5rem;
}

.log-row.sys { color: var(--color-text-sub); border-color: rgba(255, 255, 255, 0.2); }
.log-row.trans { color: var(--color-success); border-color: var(--color-success); font-weight: 500; }
.log-row.brain { color: var(--color-primary); border-color: var(--color-primary); }
.log-row.gateway { color: var(--color-secondary); border-color: var(--color-secondary); }
.log-row.error { color: var(--color-danger); border-color: var(--color-danger); }

/* File Dropzone Uploader */
.dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--color-primary);
    background: rgba(0, 221, 255, 0.05);
}

.hidden-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.dropzone-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.dropzone-text p {
    font-size: 0.8rem;
    color: var(--color-text-sub);
}

.file-name-display {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary);
    word-break: break-all;
}

/* Footer Section */
.app-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.25);
    margin-top: 3rem;
}

.app-footer p {
    color: var(--color-text-sub);
    font-size: 0.8rem;
}

/* Responsive Scaling */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .span-2 {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        margin: 1rem auto;
    }
    .span-2 {
        grid-column: span 1;
    }
    .app-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
}

/* Discord-like History Feed Styles */
.discord-history-feed {
    background-color: #2b2d31; /* True Discord Chat BG */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    max-height: 280px;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: #1e1f22 #2b2d31;
}

.discord-history-feed::-webkit-scrollbar {
    width: 6px;
}
.discord-history-feed::-webkit-scrollbar-track {
    background: #2b2d31;
}
.discord-history-feed::-webkit-scrollbar-thumb {
    background: #1e1f22;
    border-radius: 4px;
}

.discord-msg {
    position: relative;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.discord-msg:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

/* Reply Action Button on Hover */
.discord-msg-reply-btn {
    position: absolute;
    right: 8px;
    top: 6px;
    background-color: #313338;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #dbdee1;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
}

.discord-msg:hover .discord-msg-reply-btn {
    opacity: 1;
    pointer-events: auto;
}

.discord-msg-reply-btn:hover {
    background-color: #5865f2; /* Discord Blurple */
    color: #ffffff;
    border-color: #5865f2;
}

/* Discord Reply Context Line */
.discord-msg-reply-ref {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    color: #b5bac1;
    margin-left: 12px;
    margin-bottom: 2px;
    position: relative;
}

.discord-msg-reply-ref::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    width: 6px;
    height: 8px;
    border-left: 2px solid #4e5058;
    border-top: 2px solid #4e5058;
    border-top-left-radius: 4px;
}

.discord-msg-reply-ref-author {
    font-weight: 600;
    color: #c9cdcf;
    margin-left: 2px;
    margin-right: 4px;
}

.discord-msg-reply-ref-content {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%;
    font-style: italic;
    opacity: 0.85;
}

/* Discord Message Main Layout */
.discord-msg-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.discord-msg-author {
    font-weight: 600;
    color: #f2f3f5;
    font-size: 0.9rem;
}

.discord-msg-time {
    font-size: 0.7rem;
    color: #949ba4;
}

.discord-msg-content {
    font-size: 0.85rem;
    color: #dbdee1;
    word-break: break-word;
    line-height: 1.4;
}

/* Attachment Styles */
.discord-msg-attachments {
    margin-top: 0.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.discord-msg-attachment-item {
    background-color: #2b2d31;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    color: #00ddff;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.discord-msg-attachment-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    text-decoration: underline;
}

.discord-msg-attachment-preview {
    max-width: 150px;
    max-height: 100px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Reply Banner at the bottom of panel */
.reply-banner {
    background: #1e1f22;
    border-left: 3px solid #5865f2;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.reply-banner-text {
    font-size: 0.8rem;
    color: #dbdee1;
}

.btn-cancel-reply {
    background: transparent;
    border: none;
    color: #949ba4;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s ease;
}

.btn-cancel-reply:hover {
    color: #ff3366;
}

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

.discord-history-placeholder {
    color: #949ba4;
    font-size: 0.85rem;
    text-align: center;
    padding: 1.5rem;
    font-style: italic;
}

/* Premium Draggable & Resizable Cards Dashboard Additions */

/* 1. Reset Layout Button */
.btn-reset-layout {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--color-text-sub);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-reset-layout:hover {
    background: rgba(0, 221, 255, 0.1);
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 0 10px rgba(0, 221, 255, 0.2);
    transform: translateY(-1px);
}

/* 2. Drag & Drop Grab Styles */
.card-header {
    cursor: grab;
    user-select: none;
}

.card-header:active {
    cursor: grabbing;
}

.card-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header h2::before {
    content: '⋮⋮';
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.95rem;
    font-weight: normal;
    margin-right: 4px;
    transition: var(--transition-smooth);
}

.card:hover .card-header h2::before {
    color: var(--color-primary);
    text-shadow: 0 0 8px var(--color-primary);
}

/* 3. Dragging / Reordering State */
.card.dragging {
    opacity: 0.35;
    border: 1px dashed var(--color-primary);
    box-shadow: 0 0 25px rgba(0, 221, 255, 0.2);
    transform: scale(0.97);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.card.drag-over {
    border-color: var(--color-secondary);
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.25);
    transform: translateY(-4px);
}

/* 4. Grid Spanning Helpers */
.span-1 { grid-column: span 1 !important; }
.span-2 { grid-column: span 2 !important; }
.span-3 { grid-column: span 3 !important; }

/* 5. 8-Way Card Resize Handles */
.card {
    position: relative;
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.card-resizer {
    position: absolute;
    z-index: 10;
    user-select: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Sides */
.card-resizer.n {
    top: -4px;
    left: 8px;
    right: 8px;
    height: 8px;
    cursor: ns-resize;
}
.card-resizer.s {
    bottom: -4px;
    left: 8px;
    right: 8px;
    height: 8px;
    cursor: ns-resize;
}
.card-resizer.e {
    right: -4px;
    top: 8px;
    bottom: 8px;
    width: 8px;
    cursor: ew-resize;
}
.card-resizer.w {
    left: -4px;
    top: 8px;
    bottom: 8px;
    width: 8px;
    cursor: ew-resize;
}

/* Corners */
.card-resizer.ne {
    top: -6px;
    right: -6px;
    width: 14px;
    height: 14px;
    cursor: nesw-resize;
}
.card-resizer.se {
    bottom: -6px;
    right: -6px;
    width: 14px;
    height: 14px;
    cursor: nwse-resize;
}
.card-resizer.sw {
    bottom: -6px;
    left: -6px;
    width: 14px;
    height: 14px;
    cursor: nesw-resize;
}
.card-resizer.nw {
    top: -6px;
    left: -6px;
    width: 14px;
    height: 14px;
    cursor: nwse-resize;
}

/* Hover highlights for active corners/sides */
.card-resizer:hover {
    background-color: rgba(0, 221, 255, 0.25);
    box-shadow: 0 0 6px rgba(0, 221, 255, 0.4);
}

/* Corner visual handles (subtle modern circles) */
.card-resizer.ne::after,
.card-resizer.se::after,
.card-resizer.sw::after,
.card-resizer.nw::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-primary);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.card:hover .card-resizer.ne::after,
.card:hover .card-resizer.se::after,
.card:hover .card-resizer.sw::after,
.card:hover .card-resizer.nw::after {
    opacity: 0.4;
}

.card-resizer:hover::after {
    opacity: 1 !important;
    transform: scale(1.25);
}

/* Specific stretches to support resizable panels */
#logs-card {
    height: 350px;
}

#logs-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#logs-card .log-viewport {
    flex: 1;
    height: 100%;
    min-height: 180px;
}

/* Discord Voice Channel Tree Style */
.discord-channel-list {
    background-color: rgba(10, 11, 22, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    max-height: 350px;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: #1e1f22 rgba(0,0,0,0.1);
}

.discord-channel-list::-webkit-scrollbar {
    width: 6px;
}
.discord-channel-list::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
.discord-channel-list::-webkit-scrollbar-thumb {
    background: #1e1f22;
    border-radius: 4px;
}

.discord-guild-header {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0;
    color: var(--color-text-sub);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
    user-select: none;
}

.discord-guild-arrow {
    font-size: 0.6rem;
    opacity: 0.8;
}

.discord-guild-channels {
    display: flex;
    flex-direction: column;
    margin-left: 0.25rem;
}

.discord-vc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
    color: var(--color-text-sub);
    margin-bottom: 2px;
    border-left: 3px solid transparent;
}

.discord-vc-item:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--color-text-main);
}

.discord-vc-item.selected {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-left-color: var(--color-primary);
    padding-left: 0.6rem;
}

.discord-vc-item.active {
    background-color: rgba(0, 221, 255, 0.1);
    color: var(--color-primary);
    font-weight: 600;
    border-left-color: var(--color-primary);
}

.discord-vc-item.active::after {
    content: 'Bot Connected';
    font-size: 0.65rem;
    background: rgba(0, 221, 255, 0.2);
    color: var(--color-primary);
    padding: 2px 8px;
    border-radius: 100px;
    font-weight: 600;
    animation: pulseActive 2s infinite;
}

@keyframes pulseActive {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; box-shadow: 0 0 8px rgba(0, 221, 255, 0.3); }
}

.discord-vc-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.discord-vc-icon {
    font-size: 1rem;
    opacity: 0.75;
}

.discord-vc-name {
    font-size: 0.85rem;
}

.discord-vc-members {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-left: 1.75rem;
    margin-top: 0.2rem;
    margin-bottom: 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    padding-left: 0.5rem;
}

.discord-vc-member {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    animation: fadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.discord-vc-member-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1f213d, #0f101f);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--color-primary);
    user-select: none;
}

.discord-vc-member-name {
    font-size: 0.8rem;
    color: var(--color-text-sub);
    font-weight: 500;
}

.discord-vc-placeholder {
    color: var(--color-text-sub);
    font-size: 0.85rem;
    text-align: center;
    padding: 1.5rem;
    font-style: italic;
}

.channel-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

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

/* Services Status Card Premium Glassmorphic Styles */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.service-item {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: var(--transition-smooth);
}

.service-item:hover {
    border-color: rgba(0, 221, 255, 0.2);
    background: rgba(0, 0, 0, 0.35);
}

.service-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-name {
    font-weight: 700;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    color: var(--color-text-main);
}

.service-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--color-danger);
    box-shadow: 0 0 10px var(--color-danger);
    transition: var(--transition-smooth);
}

.service-indicator.online {
    background-color: var(--color-success);
    box-shadow: 0 0 10px var(--color-success);
}

.service-details {
    font-size: 0.85rem;
    color: var(--color-text-sub);
    line-height: 1.5;
}

.service-details strong {
    color: var(--color-text-main);
}

.service-code-block {
    background-color: #1e1f22 !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    color: #dbdee1;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Custom Range Sliders */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    padding: 0;
    margin: 0;
}

input[type="range"]:focus {
    outline: none;
}

/* Track styling */
input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    border: none;
    transition: var(--transition-smooth);
}

input[type="range"]::-webkit-slider-thumb {
    height: 14px;
    width: 14px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -4px; /* centers the thumb on track */
    box-shadow: 0 0 8px rgba(0, 221, 255, 0.5);
    transition: var(--transition-smooth);
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #fff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
    transform: scale(1.15);
}

/* Firefox styling */
input[type="range"]::-moz-range-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    border: none;
}

input[type="range"]::-moz-range-thumb {
    height: 14px;
    width: 14px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 8px rgba(0, 221, 255, 0.5);
}

/* Global Bot Volume Header Bar */
.global-bot-volume-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.4rem 1.25rem;
    border-radius: 100px;
    min-width: 250px;
    margin: 0 1.5rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
}

.global-bot-volume-container:hover {
    border-color: rgba(0, 221, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.global-bot-volume-container label {
    margin-bottom: 0;
    white-space: nowrap;
    font-weight: 700;
    color: var(--color-text-sub);
    font-size: 0.8rem;
}

.global-bot-volume-container input[type="range"] {
    flex: 1;
    cursor: pointer;
}

.global-vol-icon {
    font-size: 1rem;
    cursor: pointer;
    user-select: none;
    transition: var(--transition-smooth);
}

.global-vol-icon:hover {
    transform: scale(1.15);
}

#global-bot-volume-val {
    font-variant-numeric: tabular-nums;
    display: inline-block;
    min-width: 32px;
    text-align: right;
    color: var(--color-primary);
}

/* Speaker Individual Volumes in grid */
.speaker-volume-container {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    padding: 0 0.25rem;
    margin-top: 0.25rem;
}

.speaker-volume-slider {
    flex: 1;
    cursor: pointer;
}

/* Scale down for user card size */
.speaker-volume-container input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
}
.speaker-volume-container input[type="range"]::-webkit-slider-thumb {
    height: 10px;
    width: 10px;
    margin-top: -3px;
}
.speaker-volume-container input[type="range"]::-moz-range-track {
    height: 4px;
}
.speaker-volume-container input[type="range"]::-moz-range-thumb {
    height: 10px;
    width: 10px;
}

.vol-icon {
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition-smooth);
    user-select: none;
}

.vol-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.vol-value {
    font-size: 0.7rem;
    color: var(--color-text-sub);
    min-width: 28px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Responsive adjustment for global header slider */
@media (max-width: 768px) {
    .global-bot-volume-container {
        margin: 0.5rem 0;
        width: 100%;
        max-width: 320px;
    }
}


