/* ============================================
   BİNA YIKMA & GÖREVLER SİSTEMİ
   ============================================ */

/* --- Yıkım İpucu (Satılmış Hücrelerde) --- */

.cm-demolish-hint {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: rgba(255, 107, 138, 0.75);
    margin-top: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cm-cell-sold:hover .cm-demolish-hint {
    opacity: 1;
}

/* --- Görevler Paneli --- */

.cm-missions-inner {
    width: 340px;
    max-height: 88%;
    gap: 8px;
}

.cm-missions-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: 100%;
}

/* --- Görev ekranı: anlık hedef + haritada öne çıkan arsalar --- */

.cm-mission-focus {
    padding: 10px 11px;
    border-radius: 12px;
    border: 1px solid rgba(243, 181, 58, 0.32);
    background:
        radial-gradient(130% 100% at 0% 0%, rgba(243, 181, 58, 0.12) 0%, transparent 68%),
        rgba(255, 255, 255, 0.025);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.cm-mf-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cm-mf-kicker {
    font-size: 7.5px;
    font-weight: 900;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: #f3b53a;
}

.cm-mf-live {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid rgba(84, 217, 201, 0.28);
    background: rgba(84, 217, 201, 0.08);
    font-size: 7px;
    font-weight: 900;
    letter-spacing: 1px;
    color: #7bf0e1;
}

.cm-mf-live::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #54d9c9;
    box-shadow: 0 0 6px rgba(84, 217, 201, 0.9);
    animation: cmMfLive 1.4s ease-in-out infinite;
}

@keyframes cmMfLive {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.75); }
}

.cm-mf-text {
    margin: 7px 0 0;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--cm-text);
}

.cm-mf-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 9px;
}

.cm-mf-chip {
    padding: 3px 7px;
    border-radius: 999px;
    border: 1px solid rgba(243, 181, 58, 0.24);
    background: rgba(243, 181, 58, 0.1);
    font-size: 7px;
    font-weight: 900;
    letter-spacing: 0.9px;
    color: #ffd97a;
}

.cm-mf-go {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    border: 1px solid rgba(243, 181, 58, 0.4);
    background: linear-gradient(180deg, rgba(243, 181, 58, 0.22), rgba(243, 181, 58, 0.1));
    font-family: inherit;
    font-size: 8.5px;
    font-weight: 900;
    letter-spacing: 0.4px;
    color: #ffe3a3;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

.cm-mf-go svg {
    width: 13px;
    height: 13px;
}

.cm-mf-go:hover {
    background: linear-gradient(180deg, rgba(243, 181, 58, 0.32), rgba(243, 181, 58, 0.16));
    border-color: rgba(243, 181, 58, 0.65);
}

.cm-mf-go:active { transform: scale(0.97); }

.cm-mission-spots {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 8px 9px 9px;
    border-radius: 12px;
    border: 1px solid var(--cm-line);
    background: rgba(255, 255, 255, 0.02);
}

.cm-mf-count {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(84, 217, 201, 0.12);
    border: 1px solid rgba(84, 217, 201, 0.24);
    font-size: 8px;
    font-weight: 900;
    color: #7bf0e1;
}

.cm-ms-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cm-mission-spot {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 8px;
    border-radius: 9px;
    border: 1px solid rgba(84, 217, 201, 0.16);
    background: rgba(84, 217, 201, 0.05);
    font-family: inherit;
    text-align: left;
    color: inherit;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.16s ease, border-color 0.16s ease;
}

.cm-mission-spot:hover {
    border-color: rgba(84, 217, 201, 0.4);
    background: rgba(84, 217, 201, 0.1);
}

.cm-ms-ico {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    border-radius: 8px;
    background: rgba(84, 217, 201, 0.12);
    border: 1px solid rgba(84, 217, 201, 0.2);
    font-size: 12px;
}

.cm-ms-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cm-ms-body b {
    font-size: 9.5px;
    font-weight: 900;
    color: #eaf3ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cm-ms-body i {
    font-style: normal;
    font-size: 8px;
    font-weight: 700;
    color: #92a5c0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cm-ms-go {
    flex: 0 0 auto;
    font-size: 7.5px;
    font-weight: 900;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #54d9c9;
}

@media (pointer: coarse) {
    .cm-mf-go { height: 38px; min-width: 128px; justify-content: center; font-size: 9px; }
    .cm-mission-spot { min-height: 44px; }
    .cm-mission-spot:active { background: rgba(84, 217, 201, 0.14); }
}

/* --- Görevler / Mektuplar sekmeleri --- */
.cm-missions-tabs {
    display: flex;
    gap: 6px;
    width: 100%;
    padding: 3px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--cm-line);
    box-sizing: border-box;
}

.cm-missions-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 30px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    font-family: inherit;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #8492ad;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.cm-missions-tab:hover { color: #cfdaea; background: rgba(255, 255, 255, 0.04); }

.cm-missions-tab.active {
    background: linear-gradient(180deg, rgba(243, 181, 58, 0.18), rgba(243, 181, 58, 0.08));
    color: #ffd97a;
    box-shadow: inset 0 0 0 1px rgba(243, 181, 58, 0.28);
}

.cm-missions-tab-count {
    display: inline-grid;
    place-items: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: rgba(84, 217, 201, 0.14);
    color: #54d9c9;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0;
}

/* --- Mektup arşivi --- */
.cm-letter-archive-empty {
    padding: 18px 14px;
    border-radius: 11px;
    border: 1px dashed var(--cm-line);
    background: rgba(255, 255, 255, 0.02);
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
    color: #8492ad;
}

.cm-letter-archive-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 9px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--cm-line);
    transition: border-color 0.18s ease, background 0.18s ease;
}

.cm-letter-archive-row:hover {
    border-color: rgba(243, 181, 58, 0.32);
    background: rgba(243, 181, 58, 0.04);
}

.cm-letter-archive-seal {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #7b3f2a, #4a2114 70%);
    border: 1.5px solid rgba(70, 52, 30, 0.5);
    color: #f3e7cf;
    font-size: 6px;
    font-weight: 900;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.1;
    transform: rotate(-5deg);
}

.cm-letter-archive-seal.is-andirin {
    background: radial-gradient(circle at 35% 30%, #24242a, #0b0b0e 70%);
    border-color: #17171b;
    color: #d7d7dd;
}

.cm-letter-archive-seal.is-court {
    background: radial-gradient(circle at 35% 30%, #2f4c7a, #172a45 70%);
    border-color: #102037;
    color: #d8e6ff;
}

.cm-letter-archive-seal.is-official {
    background: radial-gradient(circle at 35% 30%, #6b5a2e, #3d3117 70%);
    border-color: #2c2410;
    color: #f5e7bd;
}

.cm-letter-archive-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cm-letter-archive-info b {
    font-size: 10.5px;
    font-weight: 900;
    color: #e9eef7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cm-letter-archive-info span {
    font-size: 8.5px;
    font-weight: 700;
    color: #8492ad;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cm-letter-archive-open {
    flex-shrink: 0;
    height: 27px;
    padding: 0 10px;
    border-radius: 7px;
    border: 1px solid rgba(243, 181, 58, 0.3);
    background: rgba(243, 181, 58, 0.1);
    color: #ffd97a;
    font-family: inherit;
    font-size: 8.5px;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
}

.cm-letter-archive-open:hover {
    background: rgba(243, 181, 58, 0.2);
}

.cm-mission-zone {
    padding: 9px 10px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--cm-line);
    transition: border-color 0.18s ease, background 0.18s ease;
}

.cm-mission-zone.cm-zone-complete {
    border-color: rgba(84, 217, 201, 0.24);
    background: rgba(84, 217, 201, 0.05);
}

.cm-mission-zone.cm-zone-active {
    border-color: rgba(243, 181, 58, 0.28);
    background:
        radial-gradient(120% 90% at 0% 0%, rgba(243, 181, 58, 0.1) 0%, transparent 70%),
        rgba(255, 255, 255, 0.02);
}

.cm-mission-zone.cm-zone-locked {
    opacity: 0.6;
}

.cm-zone-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cm-mission-objectives {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px dashed rgba(255, 255, 255, 0.06);
}

.cm-zone-name {
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: 0.3px;
    color: var(--cm-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cm-zone-badge {
    flex-shrink: 0;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 7px;
    font-weight: 900;
    letter-spacing: 1.1px;
    text-transform: uppercase;
}

.cm-zone-complete .cm-zone-badge {
    color: var(--cm-cyan);
    background: rgba(84, 217, 201, 0.1);
    border: 1px solid rgba(84, 217, 201, 0.24);
}

.cm-zone-active .cm-zone-badge {
    color: var(--cm-gold);
    background: rgba(243, 181, 58, 0.1);
    border: 1px solid rgba(243, 181, 58, 0.26);
}

.cm-zone-locked .cm-zone-badge {
    color: var(--cm-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--cm-line);
}

/* --- Görev satırları --- */

.cm-obj-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

.cm-obj-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border-radius: 6px;
    color: var(--cm-gold);
    background: rgba(243, 181, 58, 0.08);
    border: 1px solid rgba(243, 181, 58, 0.16);
}

.cm-obj-icon svg {
    width: 10px;
    height: 10px;
}

.cm-obj-info {
    flex: 1;
    min-width: 0;
}

.cm-obj-label {
    display: block;
    font-size: 9px;
    font-weight: 700;
    color: #c3cee0;
}

.cm-obj-bar-bg {
    height: 4px;
    margin-top: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.cm-obj-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, #54d9c9, #f3b53a);
    box-shadow: 0 0 8px rgba(84, 217, 201, 0.3);
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cm-obj-bar-fill.complete {
    background: linear-gradient(90deg, #54d9c9, #7bf0e1);
    box-shadow: 0 0 8px rgba(84, 217, 201, 0.45);
}

.cm-obj-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--cm-muted);
    opacity: 0.5;
}

.cm-obj-check svg {
    width: 12px;
    height: 12px;
}

.cm-obj-check.is-done {
    color: var(--cm-cyan);
    opacity: 1;
}

/* --- Kısa ekranlar --- */

@media (max-height: 700px) {
    .cm-mission-zone {
        padding: 7px 9px;
    }

    .cm-mission-objectives {
        margin-top: 5px;
        padding-top: 5px;
        gap: 5px;
    }

    .cm-obj-label {
        font-size: 8.5px;
    }
}
