/* General Slide Container */
.mks-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    border: 2px solid #007bff;
    background-color: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.mks-reading-highlight {
    background-color: rgba(255, 230, 150, 0.6);
    border-radius: 3px;
    transition: background-color 0.2s ease-in-out;
}

/* --- Settings Icon and Panel --- */
.mks-settings-container { position: absolute; top: 10px; right: 10px; z-index: 110; }
.mks-settings-button { background: #f1f1f1; border: 1px solid #ddd; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-size: 1.2em; color: #555; display: flex; align-items: center; justify-content: center; }
.mks-settings-button:hover { background: #e0e0e0; }
.mks-settings-panel { display: none; position: absolute; right: 0; top: 40px; width: 250px; background: #fff; border: 1px solid #ccc; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); padding: 15px; text-align: left; }
.mks-settings-panel .mks-setting-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.mks-settings-panel .mks-setting-row label { font-size: 0.95em; color: #333; margin-right: 10px; }
.mks-toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.mks-toggle-switch input { opacity: 0; width: 0; height: 0; }
.mks-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 24px; }
.mks-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .mks-slider { background-color: #007bff; }
input:focus + .mks-slider { box-shadow: 0 0 1px #007bff; }
input:checked + .mks-slider:before { transform: translateX(20px); }
.mks-slide-text-display br + br { display: none; }
#mks-speech-controls { margin-top: 15px; padding-top: 15px; border-top: 1px solid #eee; }
#mks-speech-rate { width: 100%; padding: 5px; border-radius: 4px; border: 1px solid #ccc; }

/* Initial Slide Info Styling */
.mks-slide-initial-info { margin-bottom: 20px; padding: 10px; background-color: #e9f5fe; border: 1px solid #bde0fe; border-radius: 6px; text-align: center; }
.mks-slide-initial-info p { margin: 5px 0; font-size: 1.1em; color: #0056b3; font-weight: 500; }
.mks-slide-initial-info p span { font-weight: bold; color: #004085; }
.mks-slide-range-selector { margin-top: 15px; padding-top: 10px; border-top: 1px solid #bde0fe; display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.mks-slide-range-selector label { font-size: 1em; color: #0056b3; }
.mks-slide-range-selector input[type="number"] { width: 60px; padding: 5px; text-align: center; border: 1px solid #bde0fe; border-radius: 4px; font-size: 1em; }

/* Top Bar (Progress + Timer) */
.mks-top-bar { display: none; align-items: center; padding: 5px 10px; background-color: #f1f1f1; border-radius: 6px; margin-bottom: 15px; min-height: 40px; box-sizing: border-box; position: relative; z-index: 90; }
.mks-timer-display { font-size: 1em; font-weight: bold; color: #ff5722; white-space: nowrap; margin-left: 15px; }
.mks-progress-bar { flex-grow: 1; height: 18px; background-color: #e9ecef; border-radius: 8px; overflow: hidden; box-shadow: inset 0 0 5px rgba(0,0,0,0.1); }
.mks-progress-bar .mks-progress { height: 100%; width: 0; background-color: #007bff; transition: width 0.4s ease, background-color 0.4s ease; }
.mks-top-bar .mks-settings-container { position: static; top: auto; right: auto; z-index: auto; margin-left: auto; }

/* Buttons */
.mks-read-listen-again-button { display: block; width: auto; min-width: 200px; margin: 25px auto 10px; padding: 12px 20px; font-size: 1.1em; font-weight: bold; color: #fff; background-color: #17a2b8; border: none; border-radius: 6px; cursor: pointer; transition: all 0.3s; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.mks-read-listen-again-button:hover { background-color: #138496; transform: translateY(-1px); }

/* Scorecard (End Screen) */
.mks-scorecard { margin-top: 20px; padding: 20px; background-color: #fff; border: 1px solid #dee2e6; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.05); text-align: left; }
.mks-scorecard .mks-scorecard-content h2 { text-align: center; color: #007bff; margin-bottom: 20px; }
.mks-scorecard .mks-scorecard-content p { font-size: 1.1em; line-height: 1.6; margin-bottom: 10px; color: #495057; text-align: center; }
.mks-start-slides { display: block; width: auto; min-width: 200px; margin: 20px auto; padding: 15px 25px; font-size: 1.2em; font-weight: bold; color: #fff; background-color: #007bff; border: none; border-radius: 8px; cursor: pointer; transition: all 0.3s; box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3); }
.mks-start-slides:hover { background-color: #0056b3; transform: translateY(-2px); }

/* Knowledge Slides */
.mks-knowledge-slides-area { padding: 20px; border: 1px dashed #007bff; background-color: #f0f8ff; margin-bottom: 20px; text-align: center; border-radius: 6px; }
.mks-slide-text-display { padding: 25px; margin-bottom: 20px; border: 1px solid #bde0fe; background: #e7f5ff; color: #004085; min-height: 80px; border-radius: 6px; font-size: 1.4em; text-align: left; line-height: 1.5; }
.mks-slide-controls { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 15px; }
.mks-slide-controls button { margin: 0; font-size: 1.6em; font-weight: bold; cursor: pointer; border: none; color: white; transition: all 0.2s; width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.mks-slide-controls button:hover { transform: translateY(-2px); }
.mks-slide-controls button.mks-text-button { width: auto; height: auto; border-radius: 5px; padding: 10px 20px; font-size: 1em; font-weight: 500; }
.mks-replay-slide-button { background-color: #fd7e14; }
.mks-previous-slide-button { background-color: #6c757d; }
.mks-next-slide-button { background-color: #28a745; }
.mks-skip-slides-button { background-color: #ffc107; color: #212529; }

/* Overlays & Animations */
.mks-explanation-animation-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: transparent; z-index: 95; display: flex; justify-content: center; align-items: center; pointer-events: none; }
.mks-sound-wave { display: flex; justify-content: space-around; align-items: center; width: 100px; height: 60px; }
.mks-sound-wave .mks-bar { width: 6px; height: 10px; border-radius: 3px; background-color: rgba(23, 162, 184, 0.35); animation: mks-wave-animation 1.2s ease-in-out infinite; }
.mks-sound-wave .mks-bar:nth-child(2) { animation-delay: 0.1s; } .mks-sound-wave .mks-bar:nth-child(3) { animation-delay: 0.2s; } .mks-sound-wave .mks-bar:nth-child(4) { animation-delay: 0.3s; } .mks-sound-wave .mks-bar:nth-child(5) { animation-delay: 0.4s; } .mks-sound-wave .mks-bar:nth-child(6) { animation-delay: 0.5s; } .mks-sound-wave .mks-bar:nth-child(7) { animation-delay: 0.6s; } .mks-sound-wave .mks-bar:nth-child(8) { animation-delay: 0.7s; } .mks-sound-wave .mks-bar:nth-child(9) { animation-delay: 0.8s; } .mks-sound-wave .mks-bar:nth-child(10){ animation-delay: 0.9s; }
@keyframes mks-wave-animation { 0% { height: 10px; } 50% { height: 50px; } 100% { height: 10px; } }