:root {
    --bg-main: #0f111a;
    --bg-card: rgba(25, 28, 41, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --accent: #6366f1;
    
    --cat-disconnect: #ef4444;
    --cat-auth: #f59e0b;
    --cat-reg: #10b981;
    --cat-call: #3b82f6;
    --cat-stats: #8b5cf6;
    --cat-other: #64748b;
    --cat-invite: #db2777;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(239, 68, 68, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
}

.app-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

h1 span {
    color: var(--accent);
    font-weight: 300;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.inactive {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-badge.active .pulse {
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulse-green 2s infinite;
}

.status-badge.inactive .pulse {
    background: #f59e0b;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.header-right {
    display: flex;
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.filter-group label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

input, select {
    background: rgba(15, 17, 26, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

input:focus, select:focus {
    border-color: var(--accent);
}

.table-container {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: rgba(0,0,0,0.2);
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.9rem;
    vertical-align: top;
}

tr:hover td {
    background: rgba(255,255,255,0.02);
}

.cat-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cat-Disconnect { background: rgba(239, 68, 68, 0.15); color: var(--cat-disconnect); border: 1px solid rgba(239, 68, 68, 0.2); }
.cat-Auth { background: rgba(245, 158, 11, 0.15); color: var(--cat-auth); border: 1px solid rgba(245, 158, 11, 0.2); }
.cat-Registration { background: rgba(16, 185, 129, 0.15); color: var(--cat-reg); border: 1px solid rgba(16, 185, 129, 0.2); }
.cat-Call { background: rgba(59, 130, 246, 0.15); color: var(--cat-call); border: 1px solid rgba(59, 130, 246, 0.2); }
.cat-Stats { background: rgba(139, 92, 246, 0.15); color: var(--cat-stats); border: 1px solid rgba(139, 92, 246, 0.2); }
.cat-Other { background: rgba(100, 116, 139, 0.15); color: var(--cat-other); border: 1px solid rgba(100, 116, 139, 0.2); }
.cat-Invite { background: rgba(219, 39, 119, 0.15); color: var(--cat-invite); border: 1px solid rgba(219, 39, 119, 0.2); }
.cat-Ports { background: rgba(6, 182, 212, 0.15); color: #06b6d4; border: 1px solid rgba(6, 182, 212, 0.2); }

.context-box {
    font-family: 'Consolas', monospace;
    background: rgba(0,0,0,0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #38bdf8;
    word-break: break-all;
}

.msg-box {
    color: #e2e8f0;
    line-height: 1.5;
}

.action-btn {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    margin-left: 1rem;
}
.action-btn:hover {
    background: rgba(239, 68, 68, 0.25);
}
.action-btn.start {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}
.action-btn.start:hover {
    background: rgba(16, 185, 129, 0.25);
}
.action-btn.force-start {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border-color: rgba(99, 102, 241, 0.3);
    margin-left: 0.5rem;
}
.action-btn.force-start:hover {
    background: rgba(99, 102, 241, 0.25);
}
