/* Reset & Global Overrides (Like Read Lesson) */
header,
footer,
#ast-scroll-top {
    display: none !important;
}

body {
    background: #77c9f8 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: sans-serif !important;
    color: white !important;
}

#primary,
#main,
.site-main,
.site-content,
.ast-container,
#content {
    margin: 0 !important;
    padding: 0 !important;
}

/* Wrapper */
.teleprompter-main-wrapper {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px 15px;
    box-sizing: border-box;
}

/* Header (Quiz Style) */
.teleprompter-header-container {
    background-color: #91bd35;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.teleprompter-header-top-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-button-header {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.teleprompter-title {
    margin: 0;
    font-size: 20px;
    color: black;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Teleprompter Viewport (Dark background like read-lesson content) */
.teleprompter-container-outer {
    background-color: #0f172a;
    border: 2px solid #20263b;
    border-radius: 20px;
    padding: 10px;
    margin-bottom: 0;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.teleprompter-viewport {
    height: 60vh;
    overflow: hidden;
    position: relative;
    background: #0f172a;
    border-radius: 12px;
}

.teleprompter-scrolling-content {
    position: absolute;
    top: 100%;
    width: 100%;
    font-size: 24px;
    line-height: 1.8;
    padding: 40px 20px;
    text-align: center;
    color: #e2e8f0;
}

/* Speed Slider */
.teleprompter-speed-control {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: white;
    font-size: 16px;
}

.teleprompter-speed-control label {
    white-space: nowrap;
}

.teleprompter-speed-control input[type="range"] {
    flex: 1;
    accent-color: #91bd35;
}

/* Controls */
.teleprompter-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.btn-tele-play {
    flex-shrink: 0;
    padding: 15px 30px;
    border-radius: 50px;
    border: none;
    background: #91bd35;
    color: #000;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
    transition: all 0.2s;
}

.btn-tele-play:active {
    transform: scale(0.95);
}

.btn-tele-play.is-paused {
    background: #d6961e;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.4);
}

.btn-tele-rec {
    flex: 1;
    min-width: 0;
    padding: 12px 10px;
    border-radius: 50px;
    border: none;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-tele-rec:active {
    transform: scale(0.95);
}

.btn-tele-rec:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-tele-rec.is-recording {
    background: #dc2626;
    color: white;
    box-shadow: 0 0 0 2px #dc2626;
}

/* Footer Selector (Quiz Style) */
.teleprompter-footer-nav {
    background: #91bd35;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
}

.teleprompter-footer-nav label {
    display: block;
    margin-bottom: 8px;
    color: white;
    font-size: 14px;
}

.tele-select-input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    background: #0f172a;
    color: white;
    border: 1px solid #334155;
}

/* Mobile Tweaks */
@media (max-width: 600px) {
    .teleprompter-main-wrapper {
        padding: 10px;
    }
    .teleprompter-scrolling-content {
        font-size: 20px;
    }
    .teleprompter-viewport {
        height: 55vh;
    }
}
