:root {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #e5e7eb;
    background: #0f172a;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: #e5e7eb;
    background: #0f172a;
}

a {
    color: #93c5fd;
}

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    padding: 0 5%;
    background: #111827;
    border-bottom: 1px solid #263244;
}

.top nav {
    display: flex;
    gap: 16px;
}

.brand {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
}

main {
    max-width: 900px;
    margin: auto;
    padding: 18px 14px 110px;
}

.toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

input,
textarea,
select {
    width: 100%;
    padding: 11px;
    color: #fff;
    font: inherit;
    background: #111827;
    border: 1px solid #334155;
    border-radius: 10px;
}

button,
.button {
    display: inline-block;
    padding: 10px 14px;
    color: #fff;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    background: #2563eb;
    border: 0;
    border-radius: 10px;
}

.secondary {
    background: #334155;
}

.stream {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message,
.card {
    padding: 14px;
    background: #172033;
    border: 1px solid #263244;
    border-radius: 14px;
    box-shadow: 0 5px 20px #0002;
}

.message {
    position: relative;
}

.message p {
    overflow-wrap: anywhere;
}

.message small {
    color: #94a3b8;
}

.message .delete {
    float: right;
    padding: 2px 0;
    color: #fca5a5;
    background: transparent;
}

.preview {
    display: block;
    max-width: 100%;
    max-height: 360px;
    border-radius: 10px;
}

.message video {
    width: 100%;
    max-width: 650px;
}

.message audio {
    width: 100%;
}

.filename {
    color: #cbd5e1;
}

.composer {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    max-width: 900px;
    margin: auto;
    padding: 10px 14px;
    background: #111827;
    border-top: 1px solid #263244;
}

.composer textarea {
    resize: none;
}

.attach {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    font-size: 1.4rem;
    cursor: pointer;
}

.progress {
    grid-column: 1 / -1;
    color: #93c5fd;
}

.center {
    display: grid;
    place-items: center;
    padding: 20px;
}

.auth {
    width: min(420px, 100%);
}

label {
    display: block;
    margin: 12px 0;
    color: #cbd5e1;
}

label input,
label select {
    margin-top: 6px;
}

.error,
.notice {
    padding: 10px;
    margin: 10px 0;
    color: #fecaca;
    background: #7f1d1d;
    border-radius: 10px;
}

.notice {
    position: fixed;
    top: 70px;
    right: 15px;
    z-index: 5;
    color: #dcfce7;
    background: #166534;
}

.empty {
    padding: 50px;
    color: #94a3b8;
    text-align: center;
}

.file-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 8px;
    font-size: 2rem;
    background: #263244;
    border-radius: 12px;
}

@media (max-width: 520px) {
    .top {
        padding: 0 14px;
    }

    .top nav {
        gap: 8px;
        font-size: 0.9rem;
    }

    .toolbar {
        flex-wrap: wrap;
    }

    .toolbar input {
        flex: 1 1 100%;
    }

    .composer {
        grid-template-columns: 1fr auto;
    }

    .attach,
    .composer button {
        grid-row: 2;
    }
}
.settings-page {
    display: grid;
    gap: 16px;
    max-width: 700px;
    margin: auto;
}

.device-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #263244;
}

.device-row:last-child {
    border-bottom: 0;
}

.device-row small {
    display: block;
    margin-top: 4px;
    color: #94a3b8;
}