/* ==========================================================================
   Zoom Canlı Ders Odası — TAM EKRAN bağımsız sayfa (layout'suz)
   Renkler yalnız buradaki :root token'larından gelir (CLAUDE.md kuralı).
   ========================================================================== */

:root {
    --zoom-room-bg: #0e1116;
    --zoom-room-surface: #171c23;
    --zoom-room-border: #262e39;
    --zoom-room-text: #eef2f7;
    --zoom-room-text-muted: #a9b7c7;
    --zoom-room-accent: #2563eb;
    --zoom-room-accent-strong: #1d4ed8;
    --zoom-room-focus: #93c5fd;
    --zoom-room-live: #22c55e;
    --zoom-room-danger: #dc2626;
    --zoom-room-danger-strong: #b91c1c;
    --zoom-room-error-text: #fca5a5;
    --zoom-room-badge-bg: rgba(59, 130, 246, 0.15);
    --zoom-room-live-bg: rgba(34, 197, 94, 0.15);
    --zoom-room-danger-bg: rgba(239, 68, 68, 0.15);
    --zoom-room-overlay: rgba(3, 7, 18, 0.78);
    --zoom-room-qr-bg: #ffffff;
}

/* ---------- sayfa iskeleti (layout yok, tam viewport) ---------- */

.zoom-room-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--zoom-room-bg);
    color: var(--zoom-room-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- üst bar ---------- */

.zoom-room-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 1.25rem;
    background: var(--zoom-room-surface);
    border-bottom: 1px solid var(--zoom-room-border);
    flex-wrap: wrap;
}

.zoom-room-heading {
    min-width: 0;
}

.zoom-room-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

.zoom-room-brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--zoom-room-accent);
}

.zoom-room-brand small {
    color: var(--zoom-room-text-muted);
    font-weight: 500;
}

.zoom-room-context {
    margin: 0.35rem 0 0 1.4rem;
    color: var(--zoom-room-text-muted);
    font-size: 0.86rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.zoom-room-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--zoom-room-accent);
    background: var(--zoom-room-badge-bg);
}

.zoom-room-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.zoom-room-badge--live { color: var(--zoom-room-live); background: var(--zoom-room-live-bg); }
.zoom-room-badge--live::before { animation: zoom-room-pulse 1.6s ease-in-out infinite; }
.zoom-room-badge--error { color: var(--zoom-room-danger); background: var(--zoom-room-danger-bg); }

@keyframes zoom-room-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* ---------- öğretmen katılımcı farkındalığı ---------- */

.zoom-participant-toast-region {
    position: fixed;
    z-index: 2147483000;
    pointer-events: none;
}

.zoom-room-live-toolbar {
    position: fixed;
    top: 0.9rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    max-width: calc(100vw - 2rem);
    pointer-events: none;
}

.zoom-room-live-toolbar > .zoom-btn {
    pointer-events: auto;
    box-shadow: 0 12px 30px var(--zoom-room-overlay);
}

.zoom-participant-hud {
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    max-width: calc(100vw - 2rem);
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--zoom-room-border);
    border-radius: 999px;
    background: var(--zoom-room-surface);
    color: var(--zoom-room-text);
    box-shadow: 0 12px 30px var(--zoom-room-overlay);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.zoom-participant-hud-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: var(--zoom-room-live);
}

.zoom-participant-toast-region {
    top: 4.6rem;
    right: 1rem;
    width: min(380px, calc(100vw - 2rem));
}

.zoom-participant-toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--zoom-room-border);
    border-radius: 14px;
    background: var(--zoom-room-surface);
    color: var(--zoom-room-text);
    box-shadow: 0 18px 45px var(--zoom-room-overlay);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(-0.5rem);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.zoom-participant-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.zoom-participant-toast-indicator {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--zoom-room-live);
    box-shadow: 0 0 0 5px var(--zoom-room-live-bg);
}

.zoom-participant-toast > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* ---------- butonlar (bootstrap'siz) ---------- */

.zoom-room-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.zoom-btn {
    appearance: none;
    border: none;
    border-radius: 10px;
    padding: 0.55rem 1.3rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--zoom-room-text);
    min-height: 44px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.05s ease;
}

.zoom-btn:active { transform: translateY(1px); }
.zoom-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.zoom-btn.is-disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.zoom-btn:focus-visible {
    outline: 3px solid var(--zoom-room-focus);
    outline-offset: 3px;
}

.zoom-btn--primary { background: var(--zoom-room-accent); }
.zoom-btn--primary:hover { background: var(--zoom-room-accent-strong); }
.zoom-btn--danger { background: var(--zoom-room-danger); }
.zoom-btn--danger:hover { background: var(--zoom-room-danger-strong); }
.zoom-btn--ghost {
    background: transparent;
    border: 1px solid var(--zoom-room-border);
    color: var(--zoom-room-text-muted);
}
.zoom-btn--ghost:hover { color: var(--zoom-room-text); border-color: var(--zoom-room-text-muted); }

/* ---------- sahne ---------- */

.zoom-room-stage-wrap {
    display: flex;
    flex: 1;
    min-width: 0;
    min-height: 0;
}

.zoom-room-stage {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.zoom-meeting-root {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
}

.zoom-meeting-root > div { max-width: 100%; }

/* ---------- bekleme durumu ---------- */

.zoom-room-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    text-align: center;
    padding: 2rem 1.25rem;
}

.zoom-room-placeholder-icon {
    width: 92px;
    height: 92px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--zoom-room-surface);
    border: 1px solid var(--zoom-room-border);
}

.zoom-room-placeholder-icon svg {
    width: 42px;
    height: 42px;
    fill: var(--zoom-room-accent);
}

.zoom-room-announcer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
}

.zoom-room-status {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 0;
    max-width: 560px;
    overflow-wrap: anywhere;
}

.zoom-room-status--error { color: var(--zoom-room-error-text); }

.zoom-room-hint {
    color: var(--zoom-room-text-muted);
    font-size: 0.92rem;
    margin: 0;
    max-width: 520px;
    overflow-wrap: anywhere;
}

.zoom-room-spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid var(--zoom-room-border);
    border-top-color: var(--zoom-room-accent);
    animation: zoom-room-spin 0.9s linear infinite;
}

@keyframes zoom-room-spin { to { transform: rotate(360deg); } }

/* canlıya geçince placeholder tamamen kalkar */
.zoom-room-stage.is-live .zoom-room-placeholder { display: none; }

/* ---------- sunum cihazı ---------- */

.zoom-presentation-dialog {
    width: min(92vw, 560px);
    max-height: 90vh;
    max-height: 90dvh;
    margin: auto;
    padding: 0;
    color: var(--zoom-room-text);
    background: var(--zoom-room-surface);
    border: 1px solid var(--zoom-room-border);
    border-radius: 20px;
    box-shadow: 0 24px 80px var(--zoom-room-overlay);
    overflow: auto;
}

.zoom-presentation-dialog::backdrop {
    background: var(--zoom-room-overlay);
}

.zoom-presentation-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 0;
}

.zoom-presentation-dialog-header h2 {
    margin: 0.2rem 0 0;
    font-size: 1.25rem;
    line-height: 1.35;
}

.zoom-presentation-eyebrow {
    margin: 0;
    color: var(--zoom-room-accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.zoom-dialog-close {
    appearance: none;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid var(--zoom-room-border);
    border-radius: 12px;
    color: var(--zoom-room-text-muted);
    background: transparent;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

.zoom-dialog-close:hover { color: var(--zoom-room-text); }
.zoom-dialog-close:focus-visible {
    outline: 3px solid var(--zoom-room-focus);
    outline-offset: 2px;
}

.zoom-presentation-dialog-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.25rem 1.35rem;
    text-align: center;
}

.zoom-presentation-qr-wrap {
    width: 238px;
    height: 238px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
    border-radius: 16px;
    background: var(--zoom-room-qr-bg);
}

.zoom-presentation-qr {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.zoom-presentation-dialog-status,
.zoom-presentation-expiry,
.zoom-presentation-dialog-note {
    margin: 0;
}

.zoom-presentation-dialog-status { font-weight: 700; }
.zoom-presentation-dialog-status--error { color: var(--zoom-room-error-text); }
.zoom-presentation-expiry,
.zoom-presentation-dialog-note {
    color: var(--zoom-room-text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.zoom-presentation-dialog-steps {
    width: 100%;
    margin: 0;
    padding: 0;
    list-style-position: inside;
    color: var(--zoom-room-text-muted);
    text-align: left;
    line-height: 1.65;
}

.zoom-presentation-dialog-steps strong { color: var(--zoom-room-text); }

.zoom-presentation-body {
    justify-content: center;
}

.zoom-presentation-page {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 1rem;
    box-sizing: border-box;
}

.zoom-presentation-card {
    width: min(100%, 480px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    box-sizing: border-box;
    text-align: center;
    background: var(--zoom-room-surface);
    border: 1px solid var(--zoom-room-border);
    border-radius: 24px;
}

.zoom-presentation-card h1 {
    margin: 0;
    font-size: clamp(1.6rem, 7vw, 2.15rem);
    line-height: 1.2;
}

.zoom-presentation-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: var(--zoom-room-badge-bg);
}

.zoom-presentation-icon svg {
    width: 38px;
    height: 38px;
    fill: var(--zoom-room-accent);
}

.zoom-presentation-status,
.zoom-presentation-note {
    margin: 0;
    color: var(--zoom-room-text-muted);
    line-height: 1.55;
}

.zoom-presentation-status--error { color: var(--zoom-room-error-text); }

.zoom-presentation-open,
.zoom-presentation-fallback {
    width: 100%;
}

.zoom-presentation-steps {
    width: 100%;
    margin: 0;
    padding-left: 1.4rem;
    color: var(--zoom-room-text-muted);
    text-align: left;
    line-height: 1.7;
}

.zoom-presentation-steps strong { color: var(--zoom-room-text); }
.zoom-presentation-note { font-size: 0.88rem; }

/* ---------- yardım paneli ---------- */

.zoom-help-btn {
    gap: 0.45rem;
    padding-inline: 0.9rem;
}

.zoom-help-btn-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: currentColor;
}

.zoom-help-dialog {
    width: min(92vw, 620px);
    max-height: 90vh;
    max-height: 90dvh;
    margin: auto;
    padding: 0;
    color: var(--zoom-room-text);
    background: var(--zoom-room-surface);
    border: 1px solid var(--zoom-room-border);
    border-radius: 20px;
    box-shadow: 0 24px 80px var(--zoom-room-overlay);
    overflow: auto;
}

.zoom-help-dialog::backdrop {
    background: var(--zoom-room-overlay);
}

.zoom-help-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 0;
}

.zoom-help-dialog-header h2 {
    margin: 0.2rem 0 0;
    font-size: 1.25rem;
    line-height: 1.35;
}

.zoom-help-eyebrow {
    margin: 0;
    color: var(--zoom-room-accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.zoom-help-dialog-content {
    padding: 1rem 1.25rem 1.35rem;
}

.zoom-help-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.zoom-help-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--zoom-room-border);
    border-radius: 14px;
}

.zoom-help-symptom {
    color: var(--zoom-room-text);
    font-size: 0.92rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.zoom-help-action {
    color: var(--zoom-room-text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.zoom-help-action b {
    color: var(--zoom-room-text);
}

/* ---------- yardımcılar ---------- */

.d-none { display: none !important; }

@media (max-width: 768px) {
    .zoom-room-topbar { padding: 0.6rem 0.9rem; }
    .zoom-room-brand small { display: none; }
}

@media (max-width: 480px) {
    .zoom-room-topbar {
        align-items: stretch;
        padding: 0.65rem 0.75rem;
    }

    .zoom-room-heading,
    .zoom-room-actions {
        width: 100%;
    }

    .zoom-room-context {
        margin-left: 1.4rem;
    }

    .zoom-room-live-toolbar {
        top: 0.5rem;
        max-width: calc(100vw - 1rem);
    }

    .zoom-participant-hud {
        max-width: calc(100vw - 1rem);
        font-size: 0.82rem;
    }

    .zoom-participant-toast-region {
        top: 4rem;
        right: 0.5rem;
        width: calc(100vw - 1rem);
    }

    .zoom-room-actions > .zoom-btn {
        flex: 1 1 0;
        padding-inline: 0.75rem;
    }

    .zoom-room-stage {
        padding: 0.4rem;
    }

    .zoom-room-placeholder {
        gap: 0.85rem;
        padding: 1.25rem 1rem;
    }

    .zoom-room-placeholder-icon {
        width: 70px;
        height: 70px;
        border-radius: 22px;
    }

    .zoom-room-placeholder-icon svg {
        width: 34px;
        height: 34px;
    }

    .zoom-presentation-dialog {
        width: calc(100vw - 1rem);
        border-radius: 16px;
    }

    .zoom-presentation-qr-wrap {
        width: 210px;
        height: 210px;
    }

    .zoom-presentation-card {
        padding: 1.5rem 1.1rem;
        border-radius: 20px;
    }

    .zoom-help-btn-label {
        display: none;
    }

    .zoom-room-actions > .zoom-help-btn {
        flex: 0 0 44px;
        padding-inline: 0;
    }

    .zoom-help-dialog {
        width: calc(100vw - 1rem);
        border-radius: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .zoom-room-badge--live::before,
    .zoom-room-spinner {
        animation: none;
    }

    .zoom-btn {
        transition: none;
    }

    .zoom-participant-toast {
        transition: none;
    }
}
