/* ==========================================================================
   1. ADMIN PANEL STYLES (Preserved & Cleaned)
   ========================================================================== */
.aone-box { background: #fff; border: 1px solid #ccd0d4; margin-bottom: 20px; box-shadow: 0 1px 1px rgba(0,0,0,.04); }
.aone-box-title { padding: 10px 12px; border-bottom: 1px solid #ccd0d4; font-weight: 600; background: #f7f7f7; }
.aone-inside { padding: 15px; }
.opt-row { display: flex; align-items: flex-start; margin-bottom: 12px; background: #f9f9f9; padding: 10px; border: 1px solid #eee; }
.opt-image-preview { width: 45px; height: 45px; background: #eee; border: 1px solid #ddd; margin-left: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.opt-image-preview img { max-width: 100%; height: auto; }
.quick-edit-row { background: #f0f6fb; border-left: 4px solid #2271b1; }

/* ==========================================================================
   2. FRONTEND QUIZ PLAYER STYLES (Core UI)
   ========================================================================== */
.aone-quiz-container { 
    max-width: 800px; 
    margin: 20px auto; 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important; 
    background: transparent; 
    line-height: normal !important; 
}
.aone-question-block { 
    background: #fff; padding: 25px; border-radius: 15px; margin-bottom: 15px !important; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.05); border: 1px solid #edf2f7; 
    display: none; animation: aoneFadeIn 0.5s; transition: transform 0.3s ease; 
}
.aone-question-block.active { display: block; }
@keyframes aoneFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.aone-question-text { font-size: 22px !important; color: #1a202c !important; font-weight: 700 !important; margin-bottom: 25px !important; line-height: 1.5 !important; }
.aone-options-list { list-style: none !important; padding: 0 !important; margin: 0 0 20px 0 !important; }
.aone-option-item { 
    border: 2px solid #edf2f7 !important; border-radius: 12px !important; padding: 16px 20px !important; 
    margin-bottom: 14px !important; cursor: pointer; display: flex; align-items: center; 
    transition: all 0.2s ease-in-out; font-size: 17px !important; color: #4a5568 !important; position: relative; background: #fff !important; 
}
.aone-option-item:hover { border-color: #cbd5e0 !important; background: #f8fafc !important; }
.aone-option-label { font-weight: 800 !important; margin-right: 15px !important; color: #718096 !important; min-width: 25px; }

/* Indicators */
.aone-option-item.correct { border-color: #38a169 !important; background: #f0fff4 !important; color: #2f855a !important; }
.aone-option-item.correct::after { content: "\2713"; position: absolute; right: 20px; font-size: 22px; font-weight: bold; color: #38a169; }
.aone-option-item.wrong { border-color: #e53e3e !important; background: #fff5f5 !important; color: #c53030 !important; }
.aone-option-item.wrong::after { content: "\2715"; position: absolute; right: 20px; font-size: 20px; font-weight: bold; color: #e53e3e; }

/* ==========================================================================
   2.1 PROFESSIONAL IMAGE GRID STYLES (New Integrated)
   ========================================================================== */
.aone-options-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    padding: 0 !important;
    margin: 0 0 20px 0 !important;
    list-style: none !important;
}
.aone-option-item.has-image-card {
    padding: 0 !important;
    border: none !important;
    margin-bottom: 0 !important;
    background: none !important;
    display: block !important;
}
.aone-option-item.has-image-card::after { display: none !important; } /* Hide old indicator */

.aone-card-wrapper {
    background: #fff;
    border: 2px solid #edf2f7;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
    height: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.aone-option-item.has-image-card:hover .aone-card-wrapper {
    border-color: #cbd5e0;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}
.aone-opt-img-wrap {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #f7fafc;
}
.aone-opt-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.aone-opt-caption {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    border-top: 1px solid #edf2f7;
    background: #fff;
}
/* Grid Indicators */
.aone-option-item.correct .aone-card-wrapper { border-color: #38a169 !important; background: #f0fff4 !important; }
.aone-option-item.wrong .aone-card-wrapper { border-color: #e53e3e !important; background: #fff5f5 !important; }

/* ==========================================================================
   3. EXPLANATION UI (Cleaned)
   ========================================================================== */
.aone-explanation-wrapper.pro-look { 
    background: #ffffff !important; border: 1px solid #e2e8f0 !important; border-radius: 12px !important; 
    padding: 20px !important; margin-top: 25px !important; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important; 
}
.aone-exp-header { border-bottom: 1px solid #edf2f7 !important; padding-bottom: 12px !important; margin-bottom: 15px !important; }
.aone-exp-header h3 { margin: 0 !important; color: #2d3748 !important; font-size: 18px !important; font-weight: 700 !important; }
.aone-exp-body { color: #4a5568 !important; line-height: 1.8 !important; font-size: 17px !important; }

/* ==========================================================================
   4. NAVIGATION BUTTONS
   ========================================================================== */
.aone-btn-wrapper { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 15px; clear: both; }
.aone-next-btn, .aone-feedback-btn { background: #3182ce; color: white; border: none; padding: 10px 25px; border-radius: 50px; font-weight: 600; cursor: pointer; transition: background 0.3s; }
.aone-feedback-btn { background: #e53e3e !important; }

/* ==========================================================================
   5. MOBILE VIEW OPTIMIZATION (Updated for 2x2 Grid)
   ========================================================================== */
@media (max-width: 600px) {
    .aone-quiz-container { margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: 100% !important; }
    .aone-question-block { margin: 0 0 10px 0 !important; padding: 15px 8px !important; border-radius: 0 !important; }
    .aone-question-text { font-size: 18px !important; }
    
    /* 2 columns on mobile for image grid */
    .aone-options-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .aone-opt-img-wrap { height: 110px !important; }
    .aone-opt-caption { padding: 8px !important; font-size: 13px !important; }
    .aone-option-label { margin-right: 5px !important; min-width: 18px !important; }
    
    .aone-explanation-wrapper.pro-look { margin: 10px 0 0 0 !important; padding: 15px 10px !important; border-radius: 0 !important; }
    .aone-btn-wrapper { flex-direction: column !important; gap: 10px !important; padding: 0 10px !important; }
    .aone-next-btn, .aone-feedback-btn { width: 100% !important; text-align: center; }
}

.animated.pulse { animation: pulse 0.4s ease-in-out; }
.animated.shake { animation: shake 0.3s ease-in-out; }