body {
    font-family:
        system-ui,
        -apple-system,
        sans-serif;
    background-color: #1e1e2e;
    color: #cdd6f4;
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Authentication Views */
#login {
    background: #313244;
    padding: 2rem;
    border-radius: 8px;
    width: 350px;
}
.auth-view {
    display: none;
    flex-direction: column;
    gap: 15px;
}
.auth-view.active {
    display: flex;
}
.version-tag {
    text-align: center;
    color: #585b70;
    font-size: 0.8rem;
    margin-top: 10px;
    font-weight: bold;
}

.user-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 5px;
}
.user-card {
    background: #45475a;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
    font-weight: bold;
}
.user-card:hover {
    background: #585b70;
    transform: translateY(-2px);
}
.user-card .avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #89b4fa;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #11111b;
    font-size: 1.2rem;
}

/* Base Inputs & Buttons */
input[type="text"],
input[type="password"] {
    padding: 10px;
    border-radius: 6px;
    border: none;
    background: #181825;
    color: #cdd6f4;
    outline: none;
    flex: 1;
}

button {
    background: #89b4fa;
    color: #11111b;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
button:hover {
    background: #b4befe;
}
.btn-secondary {
    background: #585b70;
    color: #cdd6f4;
}
.btn-secondary:hover {
    background: #45475a;
}
.btn-icon {
    background: transparent;
    font-size: 1.2rem;
    padding: 5px;
    color: #a6adc8;
}
.btn-icon:hover {
    background: #45475a;
    color: #f38ba8;
}

/* The Dashed Button Style */
.btn-dashed {
    background: transparent;
    border: 2px dashed #585b70;
    color: #a6adc8;
    padding: 12px;
}
.btn-dashed:hover {
    border-color: #89b4fa;
    color: #89b4fa;
    background: rgba(137, 180, 250, 0.1);
}
.btn-dashed-sm {
    background: transparent;
    border: 1px dashed #585b70;
    color: #a6adc8;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: auto;
}
.btn-dashed-sm:hover {
    border-color: #a6e3a1;
    color: #a6e3a1;
    background: rgba(166, 227, 161, 0.1);
}

.error-msg {
    color: #f38ba8;
    font-size: 0.9rem;
    margin: 0;
    text-align: center;
}

/* 3-Panel App Layout */
#app {
    width: 1000px;
    height: 650px;
    background: #313244;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    overflow: hidden;
}

/* Panel 1: Sidebar (Channels) */
.sidebar {
    width: 220px;
    background: #1e1e2e;
    display: flex;
    flex-direction: column;
}
.sidebar-header {
    padding: 15px;
    font-weight: bold;
    border-bottom: 1px solid #313244;
    display: flex;
    align-items: center;
}
#channelList {
    list-style: none;
    padding: 10px;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}
#channelList li {
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 6px;
    cursor: pointer;
    color: #a6adc8;
    transition: 0.1s;
}
#channelList li:hover {
    background: #313244;
    color: #cdd6f4;
}
#channelList li.active {
    background: #45475a;
    color: #cdd6f4;
    font-weight: bold;
}

.sidebar-footer {
    padding: 10px 15px;
    background: #181825;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

/* Panel 2: Chat */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #1e1e2e;
}
.chat-header {
    padding: 15px;
    font-weight: bold;
    border-bottom: 1px solid #1e1e2e;
    background: #313244;
}
#messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
#messages div {
    background: #45475a;
    padding: 8px 12px;
    border-radius: 6px;
    width: fit-content;
    max-width: 80%;
}
.input-area {
    padding: 1rem;
    background: #313244;
    display: flex;
    gap: 10px;
}

/* Panel 3: Voice */
.voice-container {
    width: 250px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    background: #181825;
}
.voice-container h3 {
    margin-top: 0;
}
button.active {
    background: #f38ba8;
} /* Disconnect Voice */

.voice-users {
    margin-top: 20px;
    background: #313244;
    padding: 10px 15px;
    border-radius: 6px;
    flex: 1;
}
.voice-users h4 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #a6adc8;
}
#voiceList {
    list-style: none;
    padding: 0;
    margin: 0;
}
#voiceList li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.95rem;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #585b70;
    transition:
        background 0.1s,
        box-shadow 0.1s;
}
.indicator.speaking {
    background: #a6e3a1;
    box-shadow: 0 0 8px #a6e3a1;
}

.ai-filter-box {
    margin-top: auto;
    background: #313244;
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
