:root {
    --bg-dark: #0f111a;
    --bg-card: #1a1c2c;
    --primary: #5865f2;
    --primary-hover: #4752c4;
    --text-main: #ffffff;
    --text-muted: #b9bbbe;
    --border: #2d2f44;
    --green: #23a559;
    --red: #f23f42;
    --red-hover: #da373c;
    --yellow: #faa61a;
    --modal-bg: rgba(0, 0, 0, 0.85);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navbar */
.navbar {
    background-color: var(--bg-card);
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 800; text-decoration: none; color: white; }
.nav-links { list-style: none; display: flex; gap: 32px; align-items: center; margin: 0; padding: 0; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 1rem; font-weight: 600; transition: 0.2s; }
.nav-links a:hover { color: white; }
.user-info { display: flex; align-items: center; gap: 12px; border-left: 1px solid var(--border); padding-left: 24px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; }

/* Buttons */
.btn-primary { 
    background: var(--primary); 
    color: white; 
    padding: 16px 36px; 
    border-radius: 12px; 
    text-decoration: none; 
    font-weight: 800; 
    font-size: 1.1rem; 
    border: none; 
    cursor: pointer; 
    display: inline-block; 
    transition: all 0.2s ease;
    text-align: center;
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(88, 101, 242, 0.4); }

.btn-secondary {
    background: var(--border);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: 0.2s;
}
.btn-secondary:hover { background: #3f4252; border-color: var(--text-muted); }

.btn-manage {
    display: block;
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 14px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 20px;
    transition: 0.2s;
}
.btn-manage:hover { background: var(--primary-hover); transform: scale(1.02); }

.btn-edit {
    background: var(--border);
    color: white;
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: 0.2s;
}
.btn-edit:hover { background: #404455; border-color: var(--primary); }

.btn-danger {
    background: rgba(242, 63, 66, 0.1);
    color: var(--red);
    border: 1px solid var(--red);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: 0.2s;
}
.btn-danger:hover {
    background: var(--red);
    color: white;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.2s;
    margin-bottom: 10px;
}
.btn-back:hover { background: var(--border); color: white; border-color: var(--text-muted); transform: translateX(-4px); }

/* Notifications (Toasts) */
.toast-container { position: fixed; bottom: 30px; right: 30px; z-index: 3000; display: flex; flex-direction: column; gap: 15px; }
.toast { background: var(--bg-card); color: white; padding: 16px 32px; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,0.5); transform: translateX(120%); transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); font-weight: 600; border-left: 6px solid var(--primary); }
.toast.visible { transform: translateX(0); }
.toast-success { border-left-color: var(--green); }
.toast-error { border-left-color: var(--red); }

/* Hero */
.hero { padding: 120px 0 60px 0; text-align: center; }
.hero h1 { font-size: 4.5rem; font-weight: 900; margin-bottom: 24px; line-height: 1; letter-spacing: -2px; }
.hero h1 span { color: var(--primary); }
.hero p { color: var(--text-muted); font-size: 1.5rem; max-width: 750px; margin: 0 auto 48px; }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(2, 220px); justify-content: center; gap: 24px; margin-bottom: 48px; }
.stat-card { background: var(--bg-card); padding: 32px 24px; border-radius: 20px; border: 1px solid var(--border); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.stat-card h3 { font-size: 2.8rem; margin: 0; color: var(--primary); font-weight: 900; }
.stat-card p { margin: 8px 0 0 0; font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; letter-spacing: 1.5px; }

/* Features Grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 80px 0; }
.feature { background: var(--bg-card); padding: 48px 32px; border-radius: 24px; border: 1px solid var(--border); transition: 0.3s; }
.feature:hover { border-color: var(--primary); transform: translateY(-10px); box-shadow: 0 15px 40px rgba(0,0,0,0.4); }
.feature h3 { font-size: 1.8rem; margin: 0 0 16px 0; color: white; }
.feature p { color: var(--text-muted); font-size: 1.15rem; margin: 0; }

/* Dashboard Cards */
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 32px; padding: 60px 0; }
.server-card { background: var(--bg-card); padding: 40px; border-radius: 24px; text-align: center; border: 1px solid var(--border); transition: 0.3s; }
.server-card:hover { border-color: var(--primary); transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.server-icon img { width: 96px; height: 96px; border-radius: 50%; margin-bottom: 24px; box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.icon-placeholder { width: 96px; height: 96px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; margin: 0 auto 24px; font-weight: bold; }

/* Server View */
.server-view { padding: 60px 0; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 24px; padding: 40px; margin-bottom: 40px; }
.card h2 { font-size: 2rem; margin-top: 0; margin-bottom: 8px; }
.subtitle { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 32px; }
#visualizer-container { width: 100%; height: 550px; background: #0b0d14; border-radius: 20px; overflow: hidden; border: 1px solid var(--border); margin-top: 20px; }

/* Stats Table */
.table-wrapper { overflow-x: auto; width: 100%; margin-top: 32px; }
table { width: 100%; border-collapse: collapse; min-width: 800px; }
th { text-align: left; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 2px; padding: 20px; border-bottom: 3px solid var(--border); }
td { padding: 28px 20px; border-bottom: 1px solid var(--border); }
.channel-name { font-weight: 800; font-size: 1.3rem; display: block; margin-bottom: 4px; }
.meta { display: flex; gap: 12px; }
.badge-lang { background: rgba(88, 101, 242, 0.15); color: var(--primary); padding: 5px 14px; border-radius: 8px; font-weight: 800; border: 1px solid var(--primary); font-size: 0.8rem; }
.badge-nsfw { background: rgba(242, 63, 66, 0.15); color: var(--red); padding: 5px 14px; border-radius: 8px; font-weight: 800; border: 1px solid var(--red); font-size: 0.8rem; }
.stats-cell { display: flex; gap: 40px; }
.stat-mini { font-size: 1.1rem; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.stat-mini span { font-weight: 600; color: var(--text-muted); font-size: 0.9rem; }

/* Modal */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--modal-bg); display: none; align-items: center; justify-content: center; z-index: 2000; backdrop-filter: blur(12px); }
.modal.active { display: flex; }
.modal-content { width: 100%; max-width: 500px; padding: 48px; position: relative; border: 1px solid var(--border); }
.form-group { margin-bottom: 24px; }
.form-group label { display: block; margin-bottom: 12px; color: var(--text-muted); font-size: 1rem; font-weight: 600; }
.form-input { width: 100%; background: var(--bg-dark); border: 2px solid var(--border); color: white; padding: 16px; border-radius: 12px; font-size: 1.1rem; transition: 0.2s; }
.form-input:focus { border-color: var(--primary); outline: none; }
.modal-actions { display: flex; justify-content: flex-end; gap: 16px; margin-top: 40px; }

/* Responsive */
.mobile-menu-toggle { display: none; cursor: pointer; font-size: 2rem; color: white; }
@media (max-width: 1100px) {
    .features { grid-template-columns: 1fr; }
    .hero h1 { font-size: 3.5rem; }
}
@media (max-width: 768px) {
    .mobile-menu-toggle { display: block; }
    .nav-links { 
        display: none; 
        flex-direction: column; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background: var(--bg-card); 
        padding: 40px 20px; 
        border-bottom: 1px solid var(--border);
        box-shadow: 0 15px 30px rgba(0,0,0,0.4);
    }
    .nav-links.active { display: flex; }
    .hero h1 { font-size: 2.8rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .user-info { border-left: none; border-top: 1px solid var(--border); padding-top: 24px; margin-top: 10px; width: 100%; justify-content: center; }
}
