* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #1e1f22;
    color: #dbdee1;
    height: 100vh;
    display: flex;
}
.servers-bar {
    width: 72px;
    background: #1e1f22;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    gap: 8px;
}
.server-icon {
    width: 48px;
    height: 48px;
    background: #2b2d31;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
}
.server-icon.active { border-radius: 16px; background: #5865f2; }
.separator {
    width: 32px;
    height: 2px;
    background: #2b2d31;
    margin: 8px 0;
}
.sidebar {
    width: 240px;
    background: #2b2d31;
    display: flex;
    flex-direction: column;
}
.server-name {
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #1e1f22;
    display: flex;
    justify-content: space-between;
}
.create-btn {
    background: #248046;
    border: none;
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
}
.channels {
    flex: 1;
    padding: 8px;
    overflow-y: auto;
}
.category {
    font-size: 12px;
    color: #949ba4;
    text-transform: uppercase;
    margin: 16px 0 4px 8px;
}
.channel {
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    margin: 1px 0;
}
.channel:hover { background: #35373c; }
.channel.active { background: #35373c; color: white; }
.delete-channel {
    opacity: 0;
    background: none;
    border: none;
    color: #949ba4;
    cursor: pointer;
    font-size: 14px;
}
.channel:hover .delete-channel { opacity: 1; }
.delete-channel:hover { color: #ed4245; }
.voice-members {
    padding-left: 24px;
    font-size: 12px;
    color: #949ba4;
    margin-bottom: 8px;
}
.voice-member { padding: 3px 8px; }
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #313338;
}
.chat-header {
    padding: 12px 16px;
    border-bottom: 1px solid #1e1f22;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.current-channel { font-size: 16px; font-weight: 600; }
.invite-btn {
    background: #248046;
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
}
.messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}
.message-avatar {
    width: 40px;
    height: 40px;
    background: #5865f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.message-author { font-weight: 600; font-size: 14px; }
.message-time { font-size: 10px; color: #949ba4; margin-left: 8px; }
.message-text { font-size: 14px; margin-top: 4px; }
.chat-input {
    padding: 16px;
    border-top: 1px solid #1e1f22;
    display: flex;
    gap: 8px;
}
.chat-input input {
    flex: 1;
    background: #1e1f22;
    border: none;
    border-radius: 8px;
    padding: 12px;
    color: white;
}
.chat-input button {
    background: #5865f2;
    border: none;
    color: white;
    padding: 0 16px;
    border-radius: 8px;
    cursor: pointer;
}
.members-panel {
    width: 280px;
    background: #2b2d31;
    display: flex;
    flex-direction: column;
}
.members-header {
    padding: 24px 16px 8px;
    font-size: 12px;
    color: #949ba4;
}
.members-list {
    flex: 1;
    padding: 0 8px;
    overflow-y: auto;
}
.member {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    border-radius: 8px;
    margin-bottom: 4px;
    cursor: pointer;
}
.member:hover { background: #35373c; }
.member-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}
.member-avatar {
    width: 32px;
    height: 32px;
    background: #1e1f22;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: #23a55a;
    border-radius: 50%;
    border: 2px solid #2b2d31;
}
.offline { background: #80848e; }
.member-name {
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}
.speaking-indicator {
    width: 10px;
    height: 10px;
    background: #23a55a;
    border-radius: 50%;
    display: inline-block;
}
.speaking-indicator.active {
    background: #f0b232;
    box-shadow: 0 0 8px #f0b232;
}
.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}
.volume-control input {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    background: #4a4a5a;
    border-radius: 2px;
}
.volume-control input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #5865f2;
    border-radius: 50%;
    cursor: pointer;
}
.volume-value { font-size: 11px; color: #949ba4; width: 35px; }
.watch-btn {
    background: #5865f2;
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
}
.watch-btn:hover { background: #4752c4; }
.user-panel {
    background: #1e1f22;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #2b2d31;
    gap: 8px;
}
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.user-avatar {
    width: 32px;
    height: 32px;
    background: #5865f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}
.user-text {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}
.user-name {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-id {
    font-size: 9px;
    color: #949ba4;
}
.voice-controls {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.voice-btn {
    background: #2b2d31;
    border: none;
    color: white;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.1s;
}
.voice-btn:hover { background: #35373c; }
.voice-btn.active { background: #da373c; }
.user-panel-second {
    background: #1e1f22;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid #3a3a4a;
    gap: 8px;
}
.voice-controls-second {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.ptt-active { background: #248046; }
.screen-active { background: #5865f2; }
.screen-view-container {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 320px;
    background: #1e1f22;
    border-radius: 12px;
    overflow: hidden;
    z-index: 500;
    border: 1px solid #3a3a4a;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.screen-view-header {
    padding: 8px 12px;
    background: #2b2d31;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.screen-view-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
}
.screen-view-close:hover { color: #ed4245; }
.screen-view-video {
    width: 100%;
    background: #000;
}
.screen-view-video video {
    width: 100%;
    height: auto;
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.modal-content {
    background: #2b2d31;
    border-radius: 12px;
    padding: 24px;
    width: 400px;
    text-align: center;
}
.modal-content input:focus, .modal-content select:focus {
    outline: none;
    border: 1px solid #5865f2;
}
.modal-btn {
    background: #5865f2;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    margin-top: 8px;
    transition: 0.2s;
}
.modal-btn:hover {
    opacity: 0.9;
}
.modal-btn.close { background: #da373c; }
.invite-link {
    background: #1e1f22;
    padding: 12px;
    border-radius: 8px;
    margin: 16px 0;
    word-break: break-all;
}
.settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 3000;
}
.settings-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 500px;
    background: #2b2d31;
    border-radius: 12px;
    display: flex;
    overflow: hidden;
}
.settings-sidebar {
    width: 200px;
    background: #1e1f22;
    padding: 16px;
}
.settings-sidebar-item {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 4px;
}
.settings-sidebar-item:hover { background: #35373c; }
.settings-sidebar-item.active { background: #35373c; }
.settings-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}
.settings-group {
    margin-bottom: 20px;
}
.settings-group label {
    display: block;
    margin-bottom: 8px;
    color: #949ba4;
    font-size: 12px;
}
.settings-group input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: #4a4a5a;
    border-radius: 3px;
}
.keybind-input {
    background: #1e1f22;
    border: 1px solid #3a3a4a;
    border-radius: 8px;
    padding: 10px;
    color: white;
    text-align: center;
    cursor: pointer;
}
.close-settings {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #248046;
    padding: 10px 16px;
    border-radius: 8px;
    animation: fadeOut 3s forwards;
    z-index: 4000;
}
@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}