* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a;
    min-height: 100vh;
    padding: 0;
    color: #e0e0e0;
    overflow-x: hidden;
}

/* Branding frame */
.branding-frame {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-bottom: 3px solid #4a9eff;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.branding-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.branding-logo img {
    height: 32px;
    width: auto;
    filter: drop-shadow(0 0 3px rgba(74, 158, 255, 0.3));
}

.branding-text {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.branding-tagline {
    color: #888;
    font-size: 12px;
    margin-left: 10px;
    font-weight: 300;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: #1e1e1e;
    min-height: calc(100vh - 60px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

header {
    background: #2d2d2d;
    color: #e0e0e0;
    padding: 15px 25px;
    border-bottom: 1px solid #3d3d3d;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header h1 {
    font-size: 20px;
    font-weight: 500;
    color: #4a9eff;
}

.connection-panel {
    padding: 30px;
    background: #1e1e1e;
    max-width: 600px;
    margin: 0 auto;
}

.connection-panel h2 {
    margin-bottom: 25px;
    color: #4a9eff;
    font-size: 18px;
    font-weight: 500;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 400;
    color: #b0b0b0;
    font-size: 13px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    background: #2d2d2d;
    border: 1px solid #3d3d3d;
    border-radius: 4px;
    font-size: 14px;
    color: #e0e0e0;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #4a9eff;
    background: #333;
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
}

.form-group input::placeholder {
    color: #666;
}

button {
    padding: 10px 20px;
    background: #4a9eff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
}

#connectBtn {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    font-size: 15px;
}

button:hover {
    background: #5aafff;
    box-shadow: 0 2px 8px rgba(74, 158, 255, 0.3);
}

button:active {
    background: #3a8eef;
    transform: translateY(1px);
}

button:disabled {
    background: #3d3d3d;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-disconnect {
    background: #d32f2f;
}

.btn-disconnect:hover {
    background: #e53935;
}

.btn-refresh {
    background: #2d7d32;
    margin-left: 10px;
}

.btn-refresh:hover {
    background: #388e3c;
}

.status-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    font-weight: 400;
    font-size: 13px;
}

.status-message.success {
    background: #1b5e20;
    color: #a5d6a7;
    border: 1px solid #2e7d32;
}

.status-message.error {
    background: #b71c1c;
    color: #ef9a9a;
    border: 1px solid #c62828;
}

.server-view {
    padding: 0;
    background: #1e1e1e;
}

.server-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 25px;
    background: #2d2d2d;
    border-bottom: 1px solid #3d3d3d;
}

.server-header h2 {
    color: #4a9eff;
    font-size: 18px;
    font-weight: 500;
}

.server-info {
    background: #252525;
    padding: 15px 25px;
    border-bottom: 1px solid #3d3d3d;
    font-size: 13px;
    color: #b0b0b0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.server-info-item {
    margin: 0;
}

.server-info-item strong {
    color: #4a9eff;
    margin-right: 8px;
}

.channels-container {
    background: #1e1e1e;
    padding: 15px 25px;
    min-height: calc(100vh - 400px);
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.channels-tree {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.channel {
    margin: 1px 0;
    padding: 2px 4px;
    border-radius: 2px;
    transition: background-color 0.15s;
}

.channel:hover {
    background-color: #2d2d2d;
}

.channel-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
}

.channel-icon {
    margin-right: 8px;
    font-size: 14px;
    width: 16px;
    text-align: center;
    color: #4a9eff;
}

.channel-name {
    font-weight: 400;
    color: #e0e0e0;
    flex: 1;
    font-size: 14px;
}

.channel-info {
    font-size: 11px;
    color: #888;
    margin-left: 10px;
    font-weight: 300;
}

.channel-clients {
    margin-left: 24px;
    margin-top: 4px;
    border-left: 2px solid #3d3d3d;
    padding-left: 12px;
    margin-bottom: 4px;
}

.client {
    padding: 5px 8px;
    margin: 2px 0;
    background: #252525;
    border-radius: 3px;
    display: flex;
    align-items: center;
    font-size: 13px;
    transition: background-color 0.15s;
}

.client:hover {
    background: #2d2d2d;
}

.client-icon {
    margin-right: 8px;
    font-size: 12px;
    width: 16px;
    text-align: center;
    color: #4a9eff;
}

.client-name {
    flex: 1;
    color: #e0e0e0;
    font-weight: 400;
}

.client-status {
    font-size: 10px;
    color: #888;
    margin-left: 10px;
    font-weight: 300;
}

.client.away {
    opacity: 0.6;
}

.client.away .client-name {
    font-style: italic;
}

.client.muted {
    opacity: 0.7;
}

.client.muted .client-name {
    color: #999;
}

.client.recording .client-icon {
    color: #f44336;
}

.client.commander .client-name::before {
    content: "👑 ";
    margin-right: 4px;
}

.empty-channel {
    margin-left: 24px;
    padding: 8px;
    color: #666;
    font-style: italic;
    font-size: 12px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #4a9eff;
}

.error {
    color: #f44336;
    padding: 15px;
    background: #2d1a1a;
    border-radius: 4px;
    border: 1px solid #4a1a1a;
}

/* Scrollbar styling - TeamSpeak style */
.channels-container::-webkit-scrollbar {
    width: 10px;
}

.channels-container::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-left: 1px solid #3d3d3d;
}

.channels-container::-webkit-scrollbar-thumb {
    background: #3d3d3d;
    border-radius: 5px;
}

.channels-container::-webkit-scrollbar-thumb:hover {
    background: #4d4d4d;
}

/* Server list styling */
#serverList > div {
    background: #252525 !important;
    border: 1px solid #3d3d3d !important;
}

#serverList > div > div {
    border-color: #3d3d3d !important;
    background: #252525 !important;
    color: #e0e0e0 !important;
}

#serverList > div > div:hover {
    border-color: #4a9eff !important;
    background: #2d2d2d !important;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .branding-frame {
        padding: 12px 20px;
        flex-direction: column;
        gap: 10px;
    }
    
    .server-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .server-info {
        grid-template-columns: 1fr;
    }
}
