/* ==========================================================================
   Bulut Oyun Odası — LifeComp koleksiyonunun ortak kabuğu
   bbo.css'ten SONRA yüklenir; onun değişkenlerini ve sınıflarını kullanır.

   Elli oyun aynı iskelete oturur: giriş → brief → toplama → puanlama →
   açılış → kapanış. Oyunu ayıran şey renk (--lc-a / --lc-b) ve içeriktir.
   ========================================================================== */

:root {
    --lc-a: var(--brand);
    --lc-b: var(--brand-3);
}

/* --- Kabuk iskeleti ------------------------------------------------------ */

.lc {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 14px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    gap: 12px;
}

.lc-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line-soft);
}

.lc-badge {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border-radius: 13px;
    font-size: 21px;
    background: linear-gradient(140deg, var(--lc-a), var(--lc-b));
    box-shadow: 0 8px 20px -10px var(--lc-a);
}

.lc-titles {
    min-width: 0;
    flex: 1 1 auto;
}

.lc-titles b {
    display: block;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lc-titles span {
    display: block;
    font-size: 11.5px;
    color: var(--ink-dim);
}

.lc-code {
    flex: 0 0 auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 10px 5px 12px;
}

.lc-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lc-foot {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
}

/* --- Metin ---------------------------------------------------------------- */

.lc-eyebrow {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.lc-q {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.lc-sub {
    font-size: 13.5px;
    color: var(--ink-soft);
    line-height: 1.5;
}

.lc-hint {
    font-size: 12px;
    color: var(--ink-dim);
    line-height: 1.5;
}

.lc-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 14px;
}

.lc-panel.tint {
    border-color: color-mix(in srgb, var(--lc-a) 42%, transparent);
    background: color-mix(in srgb, var(--lc-a) 12%, transparent);
}

/* --- Girdi ---------------------------------------------------------------- */

.lc-field {
    width: 100%;
    font: inherit;
    font-size: 16px;
    color: var(--ink);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 12px 13px;
    resize: vertical;
}

.lc-field::placeholder {
    color: var(--ink-dim);
}

.lc-field:focus-visible {
    outline: 2px solid var(--lc-b);
    outline-offset: 1px;
}

textarea.lc-field {
    min-height: 96px;
    line-height: 1.5;
}

.lc-count {
    text-align: right;
    font-size: 11px;
    color: var(--ink-dim);
    font-variant-numeric: tabular-nums;
}

/* --- Seçenek yongaları ---------------------------------------------------- */

.lc-opts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lc-opts.col {
    flex-direction: column;
    flex-wrap: nowrap;
}

.lc-opt {
    font: inherit;
    font-size: 14.5px;
    font-weight: 650;
    color: var(--ink);
    text-align: left;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 46px;
}

.lc-opt .ico {
    font-size: 19px;
    line-height: 1;
    flex: 0 0 auto;
}

.lc-opt .sub {
    display: block;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--ink-dim);
    margin-top: 2px;
}

.lc-opt:active {
    transform: scale(0.98);
}

.lc-opt.on {
    border-color: var(--lc-b);
    background: color-mix(in srgb, var(--lc-a) 22%, transparent);
    color: #fff;
}

.lc-opt[disabled] {
    opacity: 0.45;
    cursor: default;
}

/* --- Skala ---------------------------------------------------------------- */

.lc-scale {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lc-scale .head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-size: 12.5px;
    color: var(--ink-soft);
}

.lc-scale .head b {
    font-size: 15px;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.lc-scale input[type='range'] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 30px;
    background: transparent;
    cursor: pointer;
}

.lc-scale input[type='range']::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--lc-a), var(--lc-b));
    opacity: 0.55;
}

.lc-scale input[type='range']::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--lc-a), var(--lc-b));
    opacity: 0.55;
}

.lc-scale input[type='range']::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    margin-top: -9px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--lc-b);
    box-shadow: 0 4px 12px -4px #000;
}

.lc-scale input[type='range']::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--lc-b);
}

.lc-scale .ends {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--ink-dim);
    gap: 10px;
}

.lc-scale .ends span {
    max-width: 46%;
}

.lc-scale .ends span:last-child {
    text-align: right;
}

/* --- Sıralama ------------------------------------------------------------- */

.lc-rank {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.lc-rank li {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 9px 10px;
    font-size: 14px;
}

.lc-rank .n {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    background: linear-gradient(140deg, var(--lc-a), var(--lc-b));
    color: #fff;
}

.lc-rank .txt {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.35;
}

.lc-rank .mv {
    display: flex;
    gap: 4px;
    flex: 0 0 auto;
}

.lc-rank .mv button {
    font: inherit;
    font-size: 15px;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--ink-soft);
    background: var(--surface-2);
    border: 1px solid var(--line);
    cursor: pointer;
}

.lc-rank .mv button:disabled {
    opacity: 0.3;
}

/* --- Kart yığını (dağıtılan kartlar) -------------------------------------- */

.lc-cards {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.lc-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 13px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lc-card.done {
    border-color: color-mix(in srgb, var(--ok) 45%, transparent);
}

.lc-card .txt {
    font-size: 15px;
    line-height: 1.45;
}

.lc-card .tag {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

/* --- Sonuç görselleri ----------------------------------------------------- */

.lc-bars {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.lc-bars .row {
    display: flex;
    flex-direction: column;
    /* bbo.css'teki genel `.row` kuralı align-items: center basıyor; sütun
       yönünde bu, kendi genişliği olmayan .track'i sıfıra çökertip grafiği
       tamamen görünmez yapıyordu. */
    align-items: stretch;
    gap: 4px;
}

.lc-bars .lbl {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
}

.lc-bars .lbl b {
    font-variant-numeric: tabular-nums;
    color: var(--ink-soft);
    font-weight: 700;
    flex: 0 0 auto;
}

.lc-bars .track {
    height: 9px;
    border-radius: 999px;
    background: var(--surface-2);
    overflow: hidden;
}

.lc-bars .fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--lc-a), var(--lc-b));
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.lc-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: baseline;
}

.lc-cloud span {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 11px;
    line-height: 1.25;
}

.lc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lc-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 11px 12px;
    font-size: 14px;
    line-height: 1.45;
}

.lc-item .meta {
    display: block;
    margin-top: 3px;
    font-size: 11.5px;
    color: var(--ink-dim);
}

/* --- Düğmeler ------------------------------------------------------------- */

.lc-go {
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: var(--r-md);
    cursor: pointer;
    background: linear-gradient(135deg, var(--lc-a), var(--lc-b));
    box-shadow: 0 14px 28px -14px var(--lc-a);
    transition: transform 0.1s, opacity 0.15s;
}

.lc-go:active {
    transform: scale(0.985);
}

.lc-go[disabled] {
    opacity: 0.45;
    cursor: default;
    box-shadow: none;
}

/* Pas düğmesi gönder düğmesiyle AYNI görsel ağırlıkta olmalı (master prompt
   3.2): pas geçmek istisna değil, normal seçenek. O yüzden ikincil değil
   eşdeğer bir yüzey; yalnız rengi nötr. */
.lc-pass {
    font: inherit;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ink-soft);
    width: 100%;
    min-height: 46px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    cursor: pointer;
}

.lc-pass.on {
    border-color: color-mix(in srgb, var(--warn) 55%, transparent);
    background: color-mix(in srgb, var(--warn) 14%, transparent);
    color: var(--warn);
}

.lc-mini {
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
}

/* --- Durum ekranları ------------------------------------------------------ */

.lc-mid {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    padding: 26px 4px;
}

.lc-mid .big {
    font-size: 52px;
    line-height: 1;
}

.lc-pulse {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--ink-dim);
}

.lc-pulse i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ok);
    animation: lcPulse 1.8s ease-in-out infinite;
}

@keyframes lcPulse {
    0%, 100% { opacity: 0.35; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
    .lc-pulse i { animation: none; }
    .lc-bars .fill { transition: none; }
}

.lc-err {
    font-size: 13px;
    font-weight: 650;
    color: var(--bad);
    background: color-mix(in srgb, var(--bad) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent);
    border-radius: var(--r-sm);
    padding: 10px 12px;
}

.lc-ok {
    font-size: 13px;
    font-weight: 650;
    color: var(--ok);
}

/* --- Giriş ekranı --------------------------------------------------------- */

.lc-join {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 20px 2px;
}

.lc-join .hero {
    font-size: 60px;
    line-height: 1;
}

#lcCode {
    width: 100%;
    max-width: 260px;
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 0.34em;
    text-indent: 0.34em;
    padding: 15px 10px;
    color: var(--ink);
    background: var(--surface-2);
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
}
