
:root {
    --background: #101321;
    --surface: #191e30;
    --surface-light: #242b40;
    --primary: #6c63ff;
    --secondary: #00d4ff;
    --text: #ffffff;
    --muted: #9ca3b8;
    --danger: #ef4444;
    --border: #30374d;
}

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

body {
    background: var(--background);
    color: var(--text);
    font-family: Arial, sans-serif;
    min-height: 100vh;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 5%;
    border-bottom: 1px solid var(--border);
}

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

.brand-icon {
    background: var(--primary);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 22px;
    font-weight: bold;
}

.brand h1 {
    font-size: 19px;
}

.brand small {
    color: var(--muted);
    font-size: 12px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 13px;
}

#statusDot {
    width: 9px;
    height: 9px;
    background: #64748b;
    border-radius: 50%;
}

#statusDot.connected {
    background: #22c55e;
}

#statusDot.connecting {
    background: #eab308;
}

.container {
    width: min(1100px, 92%);
    margin: 35px auto;
}

.meeting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.meeting-header h2 {
    font-size: 25px;
    margin-bottom: 7px;
}

.meeting-header p {
    color: var(--muted);
    font-size: 14px;
}

.privacy-label {
    color: #4ade80;
    font-size: 12px;
    background: #153329;
    padding: 9px 13px;
    border-radius: 20px;
}

.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.video-card {
    position: relative;
    background: #080b14;
    border: 1px solid var(--border);
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    background: #111827;
    color: var(--muted);
    font-size: 13px;
}

.video-placeholder.hidden {
    display: none;
}

.avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--primary);
    display: grid;
    place-items: center;
    font-size: 25px;
    color: white;
}

.video-label {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.65);
    padding: 7px 12px;
    border-radius: 7px;
    font-size: 12px;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 25px 0 35px;
}

.control-btn {
    background: var(--surface-light);
    border: 1px solid var(--border);
    color: white;
    border-radius: 12px;
    width: 85px;
    height: 72px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.control-btn span {
    font-size: 21px;
}

.control-btn small {
    font-size: 11px;
}

.control-btn:hover {
    background: #343c55;
}

.control-btn.disabled {
    background: #54252b;
    border-color: #8b343c;
}

.end-btn {
    background: var(--danger);
    border-color: var(--danger);
}

.end-btn:hover {
    background: #dc2626;
}

.connection-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 25px;
    border-radius: 15px;
}

.connection-panel h3 {
    margin-bottom: 18px;
}

.connection-actions,
.signal-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

button {
    font-family: inherit;
    font-size: 13px;
}

.primary-btn,
.secondary-btn {
    padding: 12px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.primary-btn {
    background: var(--primary);
    color: white;
}

.primary-btn:hover {
    background: #5951e8;
}

.secondary-btn {
    background: var(--surface-light);
    border: 1px solid var(--border);
    color: white;
}

.secondary-btn:hover {
    background: #343c55;
}

.signal-box {
    margin-top: 25px;
}

.signal-box label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--muted);
}

.signal-box textarea {
    width: 100%;
    height: 125px;
    resize: vertical;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #0d1120;
    color: white;
    font-family: monospace;
    font-size: 12px;
    margin-bottom: 12px;
}

.signal-box textarea:focus {
    outline: 1px solid var(--primary);
}

.instructions {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.instructions h4 {
    margin-bottom: 12px;
}

.instructions ol {
    padding-left: 20px;
    color: var(--muted);
    font-size: 13px;
    line-height: 2;
}

footer {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    padding: 25px;
}

@media (max-width: 700px) {

    .topbar {
        padding: 15px 4%;
    }

    .container {
        margin: 25px auto;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .video-card {
        aspect-ratio: 16 / 10;
    }

    .meeting-header {
        align-items: flex-start;
        gap: 10px;
    }

    .meeting-header h2 {
        font-size: 21px;
    }

    .controls {
        gap: 8px;
        flex-wrap: wrap;
    }

    .control-btn {
        width: 75px;
        height: 67px;
    }

    .connection-panel {
        padding: 17px;
    }

    .connection-actions button {
        flex: 1;
    }
}

