.pgt-chem-app {
    max-width: 980px;
    margin: 20px auto;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.07);
    padding: 24px;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #0f172a;
    box-sizing: border-box;
}
.pgt-chem-app * {
    box-sizing: border-box;
}
.pgt-chem-banner {
    background: linear-gradient(135deg, #064e3b 0%, #0f766e 55%, #1d4ed8 100%);
    color: #ffffff;
    padding: 20px 24px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.pgt-chem-banner h2 {
    margin: 0 !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    line-height: 1.3 !important;
}
.pgt-chem-banner p {
    margin: 5px 0 0 0 !important;
    font-size: 14px !important;
    color: #d1fae5 !important;
}
.pgt-chem-badge {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.pgt-chem-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
    flex-wrap: wrap;
}
.pgt-chem-tab-btn {
    padding: 12px 20px !important;
    border: 2px solid #cbd5e1 !important;
    background: #f8fafc !important;
    color: #334155 !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}
.pgt-chem-tab-btn.active {
    background: #0f766e !important;
    color: #ffffff !important;
    border-color: #0f766e !important;
}
.pgt-chem-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    background: #f8fafc;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    margin-bottom: 20px;
    align-items: end;
}
.pgt-chem-ctrl-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}
.pgt-chem-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #94a3b8;
    border-radius: 6px;
    font-size: 15px;
    background: #ffffff;
    color: #0f172a;
    font-weight: 600;
}
.pgt-chem-load-btn {
    width: 100%;
    padding: 11px 18px !important;
    background: #16a34a !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
}
.pgt-chem-load-btn:hover {
    background: #15803d !important;
}
.pgt-chem-statusbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}
.pgt-chem-status-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f766e;
}
.pgt-chem-timer {
    background: #fee2e2;
    color: #dc2626;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 700;
    border: 1px solid #fecaca;
}
.pgt-chem-workspace {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 20px;
}
@media (max-width: 780px) {
    .pgt-chem-workspace {
        grid-template-columns: 1fr;
    }
    .pgt-chem-app {
        padding: 14px;
    }
}
.pgt-chem-qcard {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 20px;
}
.pgt-chem-qhead {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}
.pgt-chem-qnum {
    font-size: 16px;
    font-weight: 800;
    color: #0f766e;
}
.pgt-chem-qtag {
    background: #ccfbf1;
    color: #115e59;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}
.pgt-chem-qtext {
    font-size: 17px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.65;
    margin-bottom: 20px;
}
.pgt-chem-opts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pgt-chem-opt-lbl {
    display: flex !important;
    align-items: center;
    padding: 13px 16px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 15.5px;
    color: #0f172a;
    font-weight: 500;
}
.pgt-chem-opt-lbl:hover {
    background: #f1f5f9;
    border-color: #64748b;
}
.pgt-chem-opt-lbl.selected {
    background: #f0fdfa;
    border-color: #0f766e;
    color: #134e4a;
    font-weight: 700;
}
.pgt-chem-radio {
    margin-right: 12px !important;
    width: 18px;
    height: 18px;
    accent-color: #0f766e;
    cursor: pointer;
    flex-shrink: 0;
}
.pgt-chem-instant-box {
    margin-top: 14px;
    padding: 14px;
    border-radius: 8px;
    background: #f0fdf4;
    border-left: 4px solid #16a34a;
    color: #14532d;
    font-size: 15px;
    line-height: 1.6;
}
.pgt-chem-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 10px;
}
.pgt-chem-btn {
    padding: 10px 18px !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
}
.pgt-chem-btn:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
}
.pgt-chem-btn-prev { background: #475569 !important; color: #fff !important; }
.pgt-chem-btn-clear { background: #d97706 !important; color: #fff !important; }
.pgt-chem-btn-check { background: #0284c7 !important; color: #fff !important; }
.pgt-chem-btn-next { background: #0f766e !important; color: #fff !important; }
.pgt-chem-btn-submit { background: #16a34a !important; color: #fff !important; padding: 11px 22px !important; font-size: 15px !important; }
.pgt-chem-palette {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 16px;
}
.pgt-chem-palette-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}
.pgt-chem-palette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}
.pgt-chem-pbtn {
    padding: 7px 0 !important;
    border: 1px solid #94a3b8 !important;
    border-radius: 5px !important;
    background: #ffffff !important;
    color: #1e293b !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-align: center !important;
}
.pgt-chem-pbtn.answered {
    background: #16a34a !important;
    color: #ffffff !important;
    border-color: #16a34a !important;
}
.pgt-chem-pbtn.current {
    outline: 2px solid #0f766e !important;
    font-weight: 800 !important;
}
.pgt-chem-legend {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #334155;
    margin-top: 12px;
    flex-wrap: wrap;
    font-weight: 600;
}
.pgt-chem-result-box {
    background: #f8fafc;
    border: 2px solid #5eead4;
    border-radius: 12px;
    padding: 24px;
    margin-top: 20px;
}
.pgt-chem-score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.pgt-chem-stat-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
}
.pgt-chem-stat-val {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
}
.pgt-chem-stat-lbl {
    font-size: 13px;
    color: #475569;
    font-weight: 700;
}
.pgt-chem-sol-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-left: 5px solid #0f766e;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 14px;
}
.pgt-chem-sol-card.correct { border-left-color: #16a34a; }
.pgt-chem-sol-card.wrong { border-left-color: #dc2626; }
.pgt-chem-sol-exp {
    margin-top: 10px;
    background: #f0fdf4;
    padding: 12px;
    border-radius: 6px;
    color: #14532d;
    font-size: 14px;
    line-height: 1.6;
}
