/* Gorev listesi — statik arayuz (fontlar HTML’de yuklenir) */
:root {
    --bg0: #0a0e14;
    --bg1: #121a24;
    --card: #1a2433;
    --border: rgba(255, 255, 255, 0.08);
    --text: #e8eef6;
    --muted: #8b9cb8;
    --accent: #4d9fff;
    --accent-dim: #2a6cb5;
    --danger: #f07178;
    --ok: #7fd962;
    --shadow: rgba(0, 0, 0, 0.45);
    --radius: 14px;
    --font-sans: "DM Sans", system-ui, sans-serif;
    --font-display: "Fraunces", Georgia, serif;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body.page {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    color: var(--text);
    background:
        radial-gradient(ellipse 900px 500px at 15% -5%, #1e3a5f 0%, transparent 55%),
        radial-gradient(ellipse 700px 400px at 95% 10%, #2d1f3d 0%, transparent 50%),
        var(--bg0);
    line-height: 1.45;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.wrap {
    max-width: 56rem;
    margin: 0 auto;
    padding: 2rem 1.15rem 3rem;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem);
    gap: 1.1rem;
    align-items: start;
}

.layout-single {
    grid-template-columns: 1fr;
    max-width: min(100%, 36rem);
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 800px) {
    .layout:not(.layout-single) {
        grid-template-columns: 1fr;
    }

    .col-chat {
        order: -1;
    }
}

.skip-to {
    margin: 0.6rem 0 0;
    font-size: 0.85rem;
}

.skip-to a {
    color: var(--accent);
}

#rtc-ana,
#sohbet-bolum {
    scroll-margin-top: 0.85rem;
}

#ana-icerik:focus {
    outline: none;
}

.hero {
    margin-bottom: 1.25rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
    background: linear-gradient(120deg, var(--text) 0%, #a8c8ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero .tagline {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0;
}

.hero .tagline code {
    font-size: 0.82rem;
    background: var(--bg1);
    padding: 0.12rem 0.35rem;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.15rem 1.2rem;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px var(--shadow);
}

form.add {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

form.add input[type="text"] {
    flex: 1 1 140px;
    min-width: 0;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

form.add input[type="text"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(77, 159, 255, 0.2);
}

form.add input[type="text"]::placeholder {
    color: var(--muted);
}

.btn {
    padding: 0.6rem 1.1rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    font-size: 0.95rem;
    transition: transform 0.12s, filter 0.12s;
}

.btn:active {
    transform: scale(0.98);
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

a.btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.btn-primary {
    background: linear-gradient(165deg, var(--accent) 0%, var(--accent-dim) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(77, 159, 255, 0.35);
}

.btn-primary:hover {
    filter: brightness(1.06);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid rgba(240, 113, 120, 0.45);
    padding: 0.32rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.btn-danger:hover {
    background: rgba(240, 113, 120, 0.1);
}

.task-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.task-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    animation: enter 0.35s ease both;
}

.task-list li:last-child {
    border-bottom: none;
}

@keyframes enter {
    from {
        opacity: 0;
        transform: translateX(-6px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.task-list .task-text {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.task-list .task-num {
    color: var(--muted);
    font-weight: 600;
    margin-right: 0.35rem;
}

form.form-inline {
    margin: 0;
}

.empty-state {
    color: var(--muted);
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.badge {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ok);
    opacity: 0.85;
}

/* Canli sohbet */
.chat-card {
    display: flex;
    flex-direction: column;
    max-height: min(70vh, 520px);
    padding: 1rem 1.1rem 1.05rem;
}

.chat-head {
    flex-shrink: 0;
    margin-bottom: 0.65rem;
}

.chat-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    color: var(--text);
}

.chat-hint {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.35;
}

.sohbet-list {
    flex: 1 1 auto;
    min-height: 140px;
    overflow-y: auto;
    margin: 0 -0.15rem;
    padding: 0.35rem 0.25rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sohbet-msg {
    margin-bottom: 0.65rem;
    padding: 0.45rem 0.55rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: enter 0.25s ease both;
}

.sohbet-msg:last-child {
    margin-bottom: 0.15rem;
}

.sohbet-msg-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.65rem;
    margin-bottom: 0.2rem;
    font-size: 0.78rem;
}

.sohbet-msg-kim {
    font-weight: 700;
    color: var(--accent);
}

.sohbet-msg-zaman {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.sohbet-msg-metin {
    margin: 0;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.sohbet-list-empty {
    color: var(--muted);
    font-size: 0.88rem;
    padding: 0.75rem 0.5rem;
    text-align: center;
}

.sohbet-compose {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.sohbet-compose input[type="text"],
.sohbet-compose textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    resize: vertical;
    min-height: 2.5rem;
}

.sohbet-compose input[type="text"]:focus,
.sohbet-compose textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(77, 159, 255, 0.2);
}

.sohbet-compose .btn {
    align-self: flex-start;
}

/* Kamera (getUserMedia — yalnizca istemci) */
.camera-card {
    margin-top: 0;
    margin-bottom: 1.15rem;
    padding: 1rem 1.2rem 1.15rem;
}

.camera-head {
    margin-bottom: 0.75rem;
}

.camera-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    color: var(--text);
}

.camera-hint {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.4;
}

.camera-stage {
    position: relative;
    width: 100%;
    min-height: 200px;
    max-height: min(50vh, 420px);
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border);
}

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

.camera-status {
    min-height: 1.25rem;
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.camera-status.camera-status-err {
    color: var(--danger);
}

.camera-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    align-items: center;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: none;
}

.btn-ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    filter: none;
}

.btn-ghost:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.camera-thumb-wrap {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.camera-thumb-label {
    font-size: 0.75rem;
    color: var(--muted);
    margin: 0 0 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.camera-thumb {
    display: block;
    max-width: 100%;
    max-height: 200px;
    border-radius: 10px;
    border: 1px solid var(--border);
    object-fit: contain;
    background: rgba(0, 0, 0, 0.35);
}

a.btn[hidden] {
    display: none !important;
}

/* WebRTC rastgele goruntu */
.rtc-card {
    margin-bottom: 1.15rem;
    padding: 1rem 1.2rem 1.15rem;
}

.rtc-head {
    margin-bottom: 0.75rem;
}

.rtc-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    color: var(--text);
}

.rtc-hint {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.4;
}

.rtc-videos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

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

.rtc-vcell {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border);
    aspect-ratio: 4 / 3;
    min-height: 160px;
}

.rtc-video-placeholder {
    position: absolute;
    inset: 0;
    z-index: 2;
    margin: 0;
    padding: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.88rem;
    line-height: 1.35;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.55);
    pointer-events: none;
}

.rtc-video-placeholder[hidden] {
    display: none !important;
}

.rtc-video-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rtc-vlabel {
    position: absolute;
    top: 0.35rem;
    left: 0.45rem;
    z-index: 3;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 2px #000;
}

.rtc-video {
    display: block;
}

.rtc-status {
    min-height: 1.25rem;
    margin: 0.55rem 0 0;
    font-size: 0.88rem;
    color: var(--muted);
}

.rtc-status-err {
    color: var(--danger);
}

.rtc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    align-items: center;
}

/* Admin — canli izle (denetim) */
.adm-vid-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin: 0.65rem 0;
}

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

.adm-vid-grid > div {
    background: #111;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    position: relative;
}

span.adm-vid-lbl {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.25rem 0.45rem;
    background: rgba(0, 0, 0, 0.65);
}

.adm-remote-vid {
    display: block;
    width: 100%;
    height: calc(100% - 1.35rem);
    object-fit: cover;
    background: #000;
}

/* Karsi ses — ghost’tan daha belirgin (mobilde de gorulur) */
.btn-ses {
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(120, 170, 255, 0.12);
    color: var(--text);
    font-weight: 600;
}

.btn-ses:hover:not(:disabled) {
    background: rgba(120, 170, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-ses:disabled {
    opacity: 0.65;
}

/* --- Tam ekran açılış (HasTV tarzı ana sayfa) --- */
body.page.has-land {
    background: #0d0d0d;
}

body.page.has-land .land-shell,
body.page.has-land .land-shell * {
    font-family: "Roboto", var(--font-sans);
}

body.page.has-land .wrap {
    max-width: 56rem;
}

.land-shell {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
}

.land-nav {
    position: relative;
    z-index: 30;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.5rem;
    gap: 1rem;
    background: #141414;
    border-bottom: 1px solid #2a2a2a;
}

.land-logo {
    display: inline-flex;
    align-items: baseline;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.land-logo-has,
.land-logo-net {
    color: #fff;
}

.land-logo-tv {
    color: #e31c3d;
}

.land-nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: flex-end;
}

.land-nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.land-nav-links a:hover {
    color: #f3f3f3;
    text-decoration: underline;
}

.land-hero {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.25rem 1.25rem 4rem;
    text-align: center;
    min-height: 0;
}

.land-hero-bg {
    position: absolute;
    inset: 0;
    background-color: #1a1a1a;
    background-image: url("/static/land-hero-bg.png");
    background-size: cover;
    background-position: center;
    transform: scale(1.08);
    filter: blur(14px) brightness(0.55);
}

.land-hero-dim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.land-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 36rem;
}

.land-title {
    font-family: "Roboto", var(--font-sans);
    font-size: clamp(2rem, 6vw, 2.85rem);
    font-weight: 700;
    margin: 0 0 1rem;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
    letter-spacing: -0.03em;
}

.land-lead {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 0.85rem;
    line-height: 1.55;
}

.land-emoji {
    display: inline;
}

.land-sub {
    font-size: 0.94rem;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 1.5rem;
    line-height: 1.55;
}

.land-evet {
    color: #fff;
    font-weight: 700;
}

.land-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: #1d4ed8;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
    vertical-align: middle;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.35);
}

.land-pill:hover {
    background: #2563eb;
    color: #fff;
}

.land-pill-ico {
    font-size: 0.95rem;
    line-height: 1;
}

.land-gender-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.65rem;
}

.land-gender {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(30, 30, 30, 0.5);
    color: rgba(255, 255, 255, 0.88);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.land-gender:hover {
    border-color: rgba(255, 255, 255, 0.35);
}

.land-gender.is-selected {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.32);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.land-gender-svg {
    width: 2.35rem;
    height: auto;
    display: block;
}

.land-gender-unicode {
    font-size: 2rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.9);
}

.land-btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    max-width: 26rem;
    margin: 0 auto 1rem;
}

.land-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 0.75rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.72rem;
    text-decoration: none;
    letter-spacing: 0.06em;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s, border-color 0.15s;
}

.land-btn-primary {
    background: #e31c3d;
    color: #fff;
    border: 1px solid #ff4d6a;
    box-shadow: 0 4px 18px rgba(227, 28, 61, 0.45);
}

.land-btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    color: #fff;
}

.land-btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid #e31c3d;
}

.land-btn-outline:hover {
    background: rgba(227, 28, 61, 0.12);
    color: #fff;
}

.land-hint {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

.land-toast {
    position: fixed;
    z-index: 100;
    right: 1rem;
    bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem 0.5rem 0.35rem;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.35);
    max-width: min(calc(100vw - 2rem), 16rem);
}

.land-toast.is-hidden {
    display: none;
}

.land-toast-x {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0.15rem 0.45rem;
    cursor: pointer;
    border-radius: 6px;
}

.land-toast-x:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.land-toast-badge {
    width: 1.65rem;
    height: 1.65rem;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

.land-toast-txt {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
}

@media (max-width: 520px) {
    .land-btn-grid {
        grid-template-columns: 1fr;
    }

    .land-nav-links {
        display: none;
    }

    .land-nav {
        justify-content: center;
    }

    .land-sub .land-pill {
        display: inline-flex;
        margin-top: 0.5rem;
        margin-left: 0;
    }
}

.land-footer {
    margin-top: 2.5rem;
    padding: 2rem 0 3rem;
    border-top: 1px solid var(--border);
}

.land-footer-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    font-size: 0.85rem;
    color: var(--muted);
}

.land-footer-grid h3 {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text);
}

.land-footer-grid p {
    margin: 0;
    line-height: 1.45;
}
