/* Görev denetim kulesi — oyun içi iletişim penceresi (DarkOrbit tarzı) */
.qtk-overlay {
    position: fixed;
    inset: 0;
    z-index: 12050;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    font-family: Arial, Helvetica, sans-serif;
}

.qtk-overlay.hidden {
    display: none;
}

.qtk-window {
    width: min(920px, 96vw);
    height: min(560px, 92vh);
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(180deg, rgba(18, 22, 28, 0.98) 0%, rgba(8, 10, 14, 0.99) 100%);
    border: 1px solid rgba(120, 140, 155, 0.45);
    box-shadow:
        inset 0 0 0 1px rgba(0, 180, 220, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.85),
        0 12px 40px rgba(0, 0, 0, 0.65);
    border-radius: 2px;
    overflow: hidden;
}

.qtk-titlebar {
    flex: 0 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 0 12px;
    background: linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
    border-bottom: 1px solid rgba(90, 105, 118, 0.5);
    color: #d8dde2;
    font-size: 13px;
    letter-spacing: 0.01em;
    user-select: none;
    cursor: grab;
    touch-action: none;
}

.qtk-titlebar:active {
    cursor: grabbing;
}

.qtk-close {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid rgba(110, 125, 138, 0.55);
    background: linear-gradient(180deg, #2a3038 0%, #14181e 100%);
    color: #c8d0d8;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    border-radius: 1px;
}

.qtk-close:hover {
    background: linear-gradient(180deg, #3a4550 0%, #1e242c 100%);
    color: #fff;
}

.qtk-tabs {
    flex: 0 0 34px;
    display: flex;
    align-items: stretch;
    gap: 2px;
    padding: 4px 6px 0;
    background: linear-gradient(180deg, #12161c 0%, #0c0f14 100%);
    border-bottom: 1px solid rgba(70, 85, 98, 0.45);
}

.qtk-tab {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    padding: 0 10px 0 14px;
    border: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    color: #b8c4ce;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: linear-gradient(180deg, #2a313a 0%, #181c22 55%, #12161a 100%);
    clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.45);
}

.qtk-tab::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: rgba(255, 255, 255, 0.35);
    opacity: 0;
}

.qtk-tab.active {
    color: #0a1014;
    background: linear-gradient(180deg, #b8dce8 0%, #7eb4cc 35%, #5a96b0 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        inset 0 -1px 0 rgba(0, 60, 80, 0.25);
}

.qtk-tab.active::before {
    opacity: 1;
}

.qtk-tab:not(.active):hover {
    color: #e8eef4;
    background: linear-gradient(180deg, #343c48 0%, #222830 100%);
}

.qtk-body {
    flex: 1 1 auto;
    display: flex;
    min-height: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.012) 2px,
            rgba(255, 255, 255, 0.012) 3px
        ),
        linear-gradient(135deg, rgba(14, 18, 24, 0.95) 0%, rgba(6, 8, 12, 0.98) 100%);
}

.qtk-sidebar {
    flex: 0 0 290px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid rgba(60, 72, 84, 0.55);
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.15) 0%, transparent 100%);
}

.qtk-portrait {
    flex: 0 0 148px;
    margin: 8px 8px 6px;
    border: 1px solid rgba(90, 105, 118, 0.5);
    background:
        linear-gradient(180deg, rgba(20, 28, 40, 0.12) 0%, rgba(8, 12, 18, 0.38) 100%),
        var(--qtk-portrait-image, url("img/quest/mmo.jpg")) center bottom / cover no-repeat,
        radial-gradient(ellipse at 30% 20%, rgba(60, 90, 130, 0.18) 0%, transparent 55%),
        #0a1016;
    box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.55);
}

.qtk-portrait--mars {
    --qtk-portrait-image: url("img/quest/mmo.jpg");
}

.qtk-portrait--eic {
    --qtk-portrait-image: url("img/quest/eıc.jpg");
}

.qtk-portrait--vru {
    --qtk-portrait-image: url("img/quest/vru.jpg");
}

.qtk-filters {
    flex: 0 0 auto;
    display: flex;
    gap: 4px;
    padding: 0 8px 6px;
}

.qtk-filter {
    flex: 1 1 0;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(80, 95, 108, 0.55);
    background: linear-gradient(180deg, #222830 0%, #12161c 100%);
    color: #e8c030;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.qtk-filter.active {
    border-color: rgba(0, 210, 240, 0.85);
    background: linear-gradient(180deg, #2a3848 0%, #162028 100%);
    box-shadow:
        inset 0 0 8px rgba(0, 180, 220, 0.15),
        0 0 6px rgba(0, 190, 230, 0.35);
}

.qtk-filter-icon-lock::before { content: "🔒"; font-size: 11px; }
.qtk-filter-icon-check::before { content: "✓"; }
.qtk-filter-icon-sort::before { content: "⇅"; font-size: 12px; }

.qtk-list-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0 4px 8px 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 170, 210, 0.45) rgba(0, 0, 0, 0.35);
}

.qtk-list-scroll::-webkit-scrollbar { width: 8px; }
.qtk-list-scroll::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.35); }
.qtk-list-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3a98b8 0%, #267088 100%);
    border-radius: 2px;
}

.qtk-list-empty {
    padding: 16px 8px;
    color: #8898a8;
    font-size: 12px;
    text-align: center;
}

.qtk-mission-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    margin-bottom: 2px;
    padding: 4px 8px 4px 6px;
    cursor: pointer;
    background: linear-gradient(90deg, rgba(28, 34, 42, 0.95) 0%, rgba(18, 22, 28, 0.85) 100%);
    border: 1px solid rgba(50, 60, 72, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.qtk-mission-item:hover {
    border-color: rgba(0, 160, 200, 0.35);
}

.qtk-mission-item.active {
    background: linear-gradient(90deg, rgba(55, 95, 120, 0.55) 0%, rgba(28, 48, 62, 0.45) 100%);
    border-color: rgba(0, 190, 230, 0.45);
    box-shadow:
        inset 0 0 12px rgba(0, 180, 220, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.qtk-mission-item.qtk-mission-item--expired {
    opacity: 0.5;
    filter: grayscale(0.35);
}

.qtk-mission-item.qtk-mission-item--expired .qtk-mission-name,
.qtk-mission-item.qtk-mission-item--expired .qtk-mission-status {
    color: #9aa6b2;
}

.qtk-mission-icon {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #6a8090 0%, #2a3844 100%);
    border: 1px solid rgba(120, 140, 155, 0.4);
    position: relative;
}

.qtk-mission-icon--done::after {
    content: "";
    position: absolute;
    inset: 3px;
    border: 2px solid rgba(180, 200, 220, 0.7);
    border-radius: 50%;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.35);
}

.qtk-mission-icon--active {
    background: radial-gradient(circle at 40% 35%, #a07050 0%, #503020 100%);
    border-radius: 4px;
}

.qtk-mission-icon--active::after {
    content: "☠";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 1;
}

.qtk-mission-icon--expired {
    background: radial-gradient(circle at 35% 30%, #666c74 0%, #2a2f36 100%);
}

.qtk-mission-icon--expired::after {
    content: "!";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f2b0b0;
    font-size: 12px;
    font-weight: 700;
}

.qtk-mission-text {
    flex: 1 1 auto;
    min-width: 0;
}

.qtk-mission-name {
    display: block;
    color: #e8c828;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qtk-mission-item.active .qtk-mission-name {
    color: #ffe860;
}

.qtk-mission-status {
    display: block;
    color: #98a8b4;
    font-size: 10px;
    margin-top: 1px;
}

.qtk-detail {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 10px 14px 10px 12px;
    overflow: hidden;
}

.qtk-detail-title {
    margin: 0 0 8px;
    color: #e8c020;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.qtk-detail-desc {
    margin: 0 0 12px;
    color: #c8d0d8;
    font-size: 12px;
    line-height: 1.45;
    max-height: 72px;
    overflow-y: auto;
}

.qtk-detail-desc.qtk-detail-desc--expired {
    color: #f0a0a0;
    font-weight: 700;
}

.qtk-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 4px;
    color: #e8c020;
    font-size: 13px;
    font-weight: 700;
}

.qtk-section-planet {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #5090b8 0%, #204060 100%);
    border: 1px solid rgba(120, 180, 220, 0.5);
    box-shadow: 0 0 6px rgba(0, 140, 200, 0.25);
}

.qtk-box {
    margin-bottom: 10px;
    padding: 8px 10px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(8, 12, 18, 0.55) 100%);
    border: 1px solid rgba(50, 62, 74, 0.65);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.45);
}

.qtk-objective {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #d0d8e0;
    font-size: 12px;
}

.qtk-objective-icon {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #4088b0 0%, #206080 100%);
    border: 1px solid rgba(100, 160, 200, 0.5);
    box-shadow: 0 0 4px rgba(0, 140, 200, 0.3);
}

.qtk-reward-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 3px 0;
    font-size: 12px;
}

.qtk-reward-label {
    color: #b0bcc8;
}

.qtk-reward-value {
    color: #78c8e8;
    font-weight: 700;
    text-align: right;
}

.qtk-reward-value--white {
    color: #e8eef4;
}

.qtk-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
}

.qtk-slots-info {
    color: #8898a4;
    font-size: 11px;
}

.qtk-accept-btn {
    min-width: 200px;
    height: 34px;
    padding: 0 20px;
    border: none;
    cursor: pointer;
    color: #e8eef4;
    font-size: 13px;
    font-weight: 700;
    background:
        linear-gradient(180deg, rgba(0, 180, 220, 0.15) 0%, transparent 100%),
        linear-gradient(180deg, #3a424c 0%, #222830 45%, #181c22 100%);
    border-left: 3px solid rgba(0, 190, 230, 0.75);
    border-right: 3px solid rgba(0, 190, 230, 0.75);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.45),
        0 2px 6px rgba(0, 0, 0, 0.35);
}

.qtk-accept-btn:hover:not(:disabled) {
    background:
        linear-gradient(180deg, rgba(0, 200, 240, 0.22) 0%, transparent 100%),
        linear-gradient(180deg, #4a5460 0%, #2a323c 45%, #1e242c 100%);
}

.qtk-accept-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.qtk-detail-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #687888;
    font-size: 13px;
}

.qtk-detail-placeholder.hidden {
    display: none;
}

.qtk-detail-content {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.qtk-detail-content.hidden {
    display: none;
}

.qtk-reward-visuals {
    position: relative;
    margin-top: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    align-items: start;
    column-gap: 18px;
    row-gap: 0;
}

.qtk-reward-ship-preview {
    position: relative;
    order: 2;
    flex: 0 0 180px;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    align-self: start;
}

.qtk-reward-ship-preview.hidden {
    display: none;
}

.qtk-reward-ship-frame {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 50%, rgba(0, 180, 220, 0.12) 0%, rgba(0, 0, 0, 0) 68%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(0, 0, 0, 0.04) 100%);
    border-radius: 10px;
}

.qtk-reward-ship-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter:
        drop-shadow(0 0 12px rgba(0, 190, 230, 0.28))
        drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45));
    opacity: 0.95;
}

.qtk-reward-info {
    position: relative;
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    width: 100%;
    min-height: 86px;
    padding: 10px 12px;
    background:
        linear-gradient(180deg, rgba(10, 18, 26, 0.92) 0%, rgba(6, 10, 14, 0.95) 100%);
    border: 1px solid rgba(70, 110, 132, 0.48);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 6px 18px rgba(0, 0, 0, 0.24);
}

.qtk-reward-info.hidden {
    display: none;
}

.qtk-reward-info--expired {
    border-color: rgba(180, 90, 90, 0.55);
}

.qtk-reward-info-title {
    color: #e8c020;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.qtk-reward-info-countdown {
    color: #8fe4ff;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-shadow: 0 0 10px rgba(0, 180, 220, 0.18);
    margin-bottom: 6px;
}

.qtk-reward-info--expired .qtk-reward-info-countdown,
.qtk-reward-info--expired .qtk-reward-info-title {
    color: #f0a0a0;
}

.qtk-reward-info-meta {
    color: #95a7b5;
    font-size: 11px;
    margin-bottom: 5px;
}

.qtk-reward-info-note {
    color: #ccd7df;
    font-size: 11px;
    line-height: 1.35;
}

@media (max-width: 720px) {
    .qtk-window {
        width: 98vw;
        height: 94vh;
    }
    .qtk-sidebar {
        flex: 0 0 240px;
    }
    .qtk-tab {
        font-size: 9px;
        padding: 0 6px 0 10px;
    }
    .qtk-reward-visuals {
        grid-template-columns: 1fr;
        row-gap: 12px;
    }
    .qtk-reward-ship-preview {
        justify-self: start;
    }
}
