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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
}

/* Top Nav */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

.nav-brand {
    font-weight: 700;
    font-size: 1rem;
    color: #3b82f6;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #94a3b8;
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.logout-link {
    color: #94a3b8;
    text-decoration: none;
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: background 0.2s;
}

.logout-link:hover {
    background: #334155;
    color: #e2e8f0;
}

/* Google Sign-In Button */
.google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: white;
    color: #1f2937;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    width: 100%;
}

.google-btn:hover {
    background: #f1f5f9;
}

/* Login Error */
.login-error {
    background: #991b1b;
    color: #fecaca;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Landing Page */
.landing {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.card {
    background: #1e293b;
    border-radius: 1rem;
    padding: 3rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.card h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: #f1f5f9;
}

.card p {
    color: #94a3b8;
    margin-bottom: 2rem;
}

.card form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

label {
    text-align: left;
    font-size: 0.875rem;
    color: #94a3b8;
}

select, input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 1rem;
    outline: none;
}

select:focus, input[type="text"]:focus {
    border-color: #3b82f6;
}

select:disabled {
    opacity: 0.5;
}

button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.card button {
    background: #3b82f6;
    color: white;
}

.card button:hover {
    background: #2563eb;
}

/* Room Page */
.room-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem;
}

.room-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.room-header h1 {
    font-size: 1.25rem;
}

.room-id {
    color: #3b82f6;
    font-family: monospace;
}

.status {
    padding: 0.375rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    background: #991b1b;
    color: #fecaca;
}

.status.connected {
    background: #166534;
    color: #bbf7d0;
}

.controls {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.language-select {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.language-select select {
    width: 200px;
}

.buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-connect {
    background: #16a34a;
    color: white;
}

.btn-connect:hover {
    background: #15803d;
}

.btn-disconnect {
    background: #dc2626;
    color: white;
}

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

button.muted {
    background: #d97706;
    color: white;
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.share-link {
    margin-bottom: 1.5rem;
}

.share-link label {
    display: block;
    margin-bottom: 0.375rem;
}

.share-link input {
    cursor: pointer;
}

.transcripts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.transcript-panel {
    background: #1e293b;
    border-radius: 0.75rem;
    padding: 1rem;
    min-height: 200px;
}

.transcript-panel h3 {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #334155;
    padding-bottom: 0.5rem;
}

.transcript-content {
    font-size: 0.9375rem;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
}

.transcript-content p {
    margin-bottom: 0.5rem;
}

.transcript-content .live-text {
    color: #60a5fa;
    font-style: italic;
    opacity: 0.8;
}

.peer-status {
    text-align: center;
    padding: 0.75rem;
    background: #1e293b;
    border-radius: 0.5rem;
    color: #fbbf24;
    font-weight: 600;
}

@media (max-width: 640px) {
    .transcripts {
        grid-template-columns: 1fr;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .language-select select {
        width: 100%;
    }

    .buttons {
        justify-content: center;
    }
}
