/* Trading Trade Quiz — frontend v1.3.2
   Układ:
   - duży screen po lewej,
   - kokpit z przyciskami po prawej,
   - kliknięcie screena otwiera powiększenie na cały ekran.
*/

.ttq-app,
.ttq-app * {
    box-sizing: border-box;
}

.ttq-app {
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding: 8px 12px 18px !important;
    background: #ffffff;
    color: #111827;
    font-family: Arial, Helvetica, sans-serif;
}

.ttq-start-screen,
.ttq-result-screen {
    max-width: 900px;
    margin: 40px auto;
    text-align: center;
    padding: 30px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #f9fafb;
}

.ttq-start-btn,
.ttq-restart-btn,
.ttq-next-btn {
    font-size: 21px;
    font-weight: 800;
    padding: 16px 24px;
    border-radius: 12px;
    border: 0;
    cursor: pointer;
    background: #111827;
    color: #fff;
}

.ttq-warning {
    margin-top: 20px;
    color: #b45309;
    font-weight: 700;
}

.ttq-quiz-screen {
    width: 100%;
}

.ttq-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 7px 10px;
    margin-bottom: 6px;
    background: rgba(255,255,255,0.96);
    border-bottom: 1px solid #e5e7eb;
    font-size: 17px;
    font-weight: 800;
}

.ttq-counter,
.ttq-score,
.ttq-time {
    padding: 6px 12px;
    background: #f3f4f6;
    border-radius: 999px;
}

.ttq-question {
    max-width: 1800px !important;
    margin: 4px auto 8px !important;
    padding: 0 10px !important;
    font-size: clamp(19px, 2vw, 30px) !important;
    line-height: 1.2 !important;
    font-weight: 900 !important;
}

.ttq-main-layout {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 14px;
    align-items: start;
}

.ttq-image-wrap {
    width: 100% !important;
    max-width: none !important;
    text-align: center !important;
    padding: 0 !important;
}

.ttq-question-image {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: calc(100vh - 135px) !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    border: 1px solid #d1d5db;
    background: #fff;
    cursor: zoom-in;
}

.ttq-cockpit {
    position: sticky;
    top: 58px;
    min-height: 420px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #f9fafb;
    box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}

.ttq-cockpit-title {
    margin-bottom: 12px;
    text-align: center;
    font-size: 20px;
    font-weight: 900;
}

.ttq-answer-btn {
    display: block;
    width: 100%;
    margin: 0 0 12px 0;
    font-size: 25px;
    font-weight: 950;
    padding: 20px 14px;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.16);
    text-align: center;
}

.ttq-answer-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ttq-buy {
    background: #16a34a;
}

.ttq-sell {
    background: #dc2626;
}

.ttq-no-trade {
    background: #6b7280;
}

.ttq-feedback {
    min-height: 56px;
    margin: 10px 0 12px;
    text-align: center;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 900;
}

.ttq-feedback.good {
    color: #15803d;
}

.ttq-feedback.bad {
    color: #b91c1c;
}

.ttq-next-btn {
    display: block;
    width: 100%;
    margin: 0;
    background: #111827;
}

.ttq-cockpit-hint {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.35;
}

.ttq-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0,0,0,0.92);
}

.ttq-lightbox[hidden] {
    display: none !important;
}

.ttq-lightbox-image {
    display: block;
    max-width: 98vw;
    max-height: 96vh;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: zoom-out;
    background: #fff;
}

.ttq-lightbox-close {
    position: fixed;
    top: 14px;
    right: 18px;
    z-index: 1000000;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #111827;
    font-size: 36px;
    line-height: 42px;
    font-weight: 900;
    cursor: pointer;
}

.ttq-result-screen p {
    font-size: 24px;
    font-weight: 800;
}

@media (max-width: 1000px) {
    .ttq-main-layout {
        grid-template-columns: 1fr;
    }

    .ttq-cockpit {
        position: static;
        min-height: 0;
        max-width: 720px;
        width: 100%;
        margin: 0 auto;
    }

    .ttq-question-image {
        max-height: 70vh !important;
    }
}

@media (max-width: 700px) {
    .ttq-app {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    .ttq-topbar {
        font-size: 15px;
        gap: 6px;
    }

    .ttq-question {
        padding: 0 4px !important;
    }

    .ttq-answer-btn {
        font-size: 22px;
        padding: 17px 12px;
    }

    .ttq-question-image {
        max-height: 62vh !important;
    }
}

/* --- Nowe style - budżet i wyniki trejda (wersja 1.3) --- */

.ttq-money {
    padding: 6px 12px;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 999px;
    font-weight: 900;
}

.ttq-trade-res {
    display: block;
    margin-top: 6px;
    font-size: 16px;
    font-weight: 700;
    color: #4b5563;
}