:root { --primary: #0d6efd; --bg: #f4f6f9; }
body { background-color: var(--bg); font-family: 'Segoe UI', sans-serif; font-size: 0.95rem; user-select: none; touch-action: pan-y; } 
.sidebar { width: 250px; background: #2c3e50; color: white; min-height: 100vh; position: fixed; z-index: 1000; transition: 0.3s; }
.sidebar .nav-link { color: #bdc3c7; padding: 12px 20px; }
.sidebar .nav-link.active, .sidebar .nav-link:hover { color: white; background: rgba(255,255,255,0.1); }
.main-content { margin-left: 250px; padding: 20px; }
@media (max-width: 768px) { .sidebar { transform: translateX(-100%); } .sidebar.show { transform: translateX(0); } .main-content { margin-left: 0; } }
.card { border: none; box-shadow: 0 4px 12px rgba(0,0,0,0.05); border-radius: 12px; }
.question-box { background: white; padding: 20px; border-radius: 8px; border-left: 5px solid var(--primary); }
.loading-overlay { position: fixed; top:0; left:0; width:100%; height:100%; background:rgba(255,255,255,0.9); z-index:9999; display:none; justify-content:center; align-items:center; flex-direction:column; }
.nav-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.btn-nav-soal { width: 100%; font-size: 0.8rem; border: 1px solid #ddd; background: white; padding: 8px 0; }
.btn-nav-soal.active { border-color: var(--primary); font-weight: bold; border-width: 2px; }
.btn-nav-soal.answered { background-color: #0d6efd; color: white; border-color: #0d6efd; }
.btn-nav-soal.ragu { background-color: #ffc107; color: black; border-color: #ffc107; }
.secure-watermark { position: fixed; bottom: 10px; right: 10px; opacity: 0.3; font-size: 0.8rem; pointer-events: none; z-index: 9000; }
.stat-card { border-radius: 10px; padding: 20px; color: white; position: relative; overflow: hidden; }
.stat-card h2 { font-weight: bold; font-size: 2.5rem; margin-bottom: 0; }
.stat-card i { position: absolute; right: 20px; bottom: 10px; font-size: 4rem; opacity: 0.2; }
.answer-label { cursor: pointer; transition: all 0.2s; }
.answer-label:hover { background-color: #e9ecef !important; border-color: var(--primary) !important; }

/* Grid Soal Admin */
.soal-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}
.soal-card {
    background: white;
    border: 3px solid #fced35;
    border-radius: 5px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
}
.soal-card:hover {
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
    border-color: #ffc107;
}
.soal-card img {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    margin-top: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}
.text-truncate-multiline {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
}
/* Responsif Grid Soal Admin */
@media (max-width: 1200px) { .soal-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 992px) { .soal-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .soal-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .soal-grid { grid-template-columns: 1fr; } }

/* Fix Gambar Terpotong di HP & Tanda Bisa Di-zoom */
.question-content-area img, 
.question-box img, 
#sContainer img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain;
}

/* Kotak Opsi Jawaban Support Copy-Paste Gambar (Tampilan Tetap Sama) */
.opt-rich-input {
    min-height: 38px;
    max-height: 110px;
    overflow-y: auto;
    background-color: #fff;
    cursor: text;
    white-space: pre-wrap;
    word-break: break-word;
    user-select: text;
}
.opt-rich-input:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
.opt-rich-input:empty:before {
    content: attr(data-placeholder);
    color: #6c757d;
    pointer-events: none;
}
.opt-rich-input img {
    max-height: 45px;
    max-width: 120px;
    object-fit: contain;
    vertical-align: middle;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin: 2px 4px;
}
.answer-label img {
    max-height: 200px;
    border-radius: 6px;
    margin-top: 6px;
    display: block;
}

/* Tampilan Gambar pada Soal Menjodohkan & Kategori (Sisi Siswa) */
.jodoh-left-box img,
.jodoh-btn-content img,
#jodohModalList img,
#jodohModalTitle img {
    max-height: 90px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 4px;
    vertical-align: middle;
    margin: 2px 4px;
}
.jodoh-btn-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    text-align: left;
}