body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #121212;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.card {
    background-color: #1e1e1e;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

h1 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 24px;
    color: #ff5722;
}

p {
    color: #aaaaaa;
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.4;
}

button {
    width: 100%;
    padding: 15px;
    background: #ff5722;
    border: none;
    color: white;
    font-weight: bold;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

button:hover {
    background: #f4511e;
}

button:active {
    transform: scale(0.98);
}

button:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
}

#muteBtn {
    background: #0277bd;
    color: white;
}

#muteBtn:hover {
    background: #01579b;
}

#muteBtn.btn-muted {
    background: #ff5722;
}

#muteBtn.btn-muted:hover {
    background: #ff5722;
}

#connectBtn.btn-disconnect {
    background: #c62828;
}

#connectBtn.btn-disconnect:hover {
    background: #b71c1c;
}

.status {
    margin-top: 20px;
    font-weight: 500;
    font-size: 14px;
}

.connected {
    color: #4caf50;
}

.disconnected {
    color: #f44336;
}

.connecting {
    color: #ffeb3b;
}

.version {
    margin-top: 25px;
    font-size: 12px;
    color: #555555;
}

.qr-container {
    margin-top: 40px;
    text-align: center;
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 200px;
}

.qr-code {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    display: block;
    margin: 0 auto 10px auto;
}

.qr-text {
    font-size: 11px;
    color: #888;
    margin-bottom: 0;
}

/* --- Debug UI --- */
button.copy-logs-btn {
    width: auto;
    margin-top: 40px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #444;
    color: #888;
    font-weight: normal;
    border-radius: 20px;
    font-size: 13px;
    box-shadow: none;
}

button.copy-logs-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border-color: #888;
}

button.copy-logs-btn:active {
    transform: scale(0.95);
}

/* Sync Graph Panel Variables */
:root {
    --ss-cream: #fcf2e8;
    --ss-coral: #ff5722;
    --ss-coral-soft: #eda297;
    --ss-warn: #e0a04a;
    --t-base: 0.2s;
    --ease-out: ease-out;
    --sp-3: 12px;
    --sp-4: 16px;
    --r-md: 8px;
}

.demo-card__sync {
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--r-md);
    padding: var(--sp-4);
    margin-top: var(--sp-4);
    margin-bottom: var(--sp-4);
    transition: opacity var(--t-base) var(--ease-out), max-height var(--t-base) var(--ease-out);
}

.demo-card__sync[aria-hidden="true"] {
    display: none;
}

.demo-card__sync-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--sp-3);
}

.demo-card__sync-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--ss-cream);
    opacity: 0.7;
}

.demo-card__sync-readout {
    font-family: monospace;
    font-size: 14px;
    color: var(--ss-coral-soft);
    font-weight: 500;
}

.demo-card__sync-readout.sync-good {
    color: #B6E3CB;
}

.demo-card__sync-readout.sync-warn {
    color: var(--ss-warn);
}

.demo-card__sync-readout.sync-bad {
    color: var(--ss-coral-soft);
}

.demo-card__sync-readout.sync-idle {
    color: var(--ss-cream);
    opacity: 0.5;
}

.demo-card__sync-graph-shell {
    height: 140px;
    width: 100%;
    position: relative;
    background:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 100% 35px, 12px 100%;
    border-radius: 8px;
    overflow: hidden;
    transition: background var(--t-base) var(--ease-out);
}

.demo-card__sync-graph-shell.sync-good {
    box-shadow: inset 0 0 0 1px rgba(91, 159, 126, 0.25);
}

.demo-card__sync-graph-shell.sync-warn {
    box-shadow: inset 0 0 0 1px rgba(224, 160, 74, 0.25);
}

.demo-card__sync-graph-shell.sync-bad {
    box-shadow: inset 0 0 0 1px rgba(230, 103, 86, 0.30);
}

.demo-card__sync-graph {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}