/* Exam Container */
.apm-exam-container {
    font-family: 'Open Sans', sans-serif;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Header with Timer and Finish Button */
.apm-exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f5f5f5;
    padding: 10px 20px;
    border-bottom: 2px solid #ccc;
    margin-bottom: 20px;
}
.apm-timer {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}
.apm-finish-btn {
    background: #d9534f;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}
.apm-finish-btn:hover {
    background: #c9302c;
}

/* Main Content Area */
.apm-exam-main {
    display: flex;
    gap: 20px;
}

/* Question Palette (left side) */
.apm-question-palette {
    width: 200px;
    background: #f9f9f9;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.apm-palette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
}
.apm-palette-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
.apm-palette-item.current {
    background: #5bc0de;
    color: #fff;
    border-color: #46b8da;
}
.apm-palette-item.answered {
    background: #5cb85c;
    color: #fff;
    border-color: #4cae4c;
}
.apm-palette-item.answered.current {
    background: #449d44;
}

/* Question Area (right side) */
.apm-question-area {
    flex: 1;
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.apm-question-container {
    min-height: 300px;
}
.apm-case-study {
    background: #fcf8e3;
    padding: 15px;
    border-left: 4px solid #f0ad4e;
    margin-bottom: 20px;
    font-style: italic;
}
.apm-question-text {
    font-size: 18px;
    margin-bottom: 15px;
}
.apm-marks {
    font-size: 14px;
    color: #777;
    margin-bottom: 15px;
}
.apm-options {
    margin: 20px 0;
}
.apm-option {
    display: block;
    margin-bottom: 10px;
    padding: 5px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 3px;
}
.apm-option:hover {
    background: #f0f0f0;
}
.apm-answer-status {
    margin-top: 10px;
    font-style: italic;
}

/* Navigation Buttons */
.apm-navigation {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
}
.apm-nav-btn {
    background: #337ab7;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}
.apm-nav-btn:hover {
    background: #286090;
}
.apm-nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Calculator */
.apm-calculator-btn {
    background: #f0ad4e;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 10px;
}
.apm-calculator-popup {
    display: none;
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    padding: 15px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    width: 200px;
}
.apm-calc-display {
    width: 100%;
    margin-bottom: 10px;
    padding: 5px;
    font-size: 16px;
}
.apm-calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}
.apm-calc-btn {
    padding: 8px;
    background: #eee;
    border: 1px solid #ccc;
    cursor: pointer;
}
.apm-calc-btn:hover {
    background: #ddd;
}