/* css/base.css */
:root {
    --c-primary: #f7893d;
    --c-bg: #1a1e2f;
    --c-text: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background: var(--c-bg);
    color: var(--c-text);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

h1 {
    margin: 1rem 0 1rem;
    font-size: 1.25rem;
    text-align: center;
}

h2 {
    margin: 1rem 0 0.5rem;
    font-size: 1rem;
    text-align: center;
}

/* css/layout.css */
#app {
    width: 100%;
    max-width: 760px;
    min-height: 90vh;
    background: #1a1e2f;
    color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
}

/* Container for teleprompter controls */
.teleprompter-controls-container {
    display: flex;
    flex-direction: column;
    row-gap: 0.875rem;
    margin: 0 0.7rem 0;
}

/* General layout for slider rows */
.slider-row {
    display: flex;
    align-items: center;
    column-gap: 0.875rem;
}

.progress-wrap {
    text-align: center;
    margin: 0.5rem 0.7rem 1rem;
}

/* css/utilities.css */
.hidden {
    display: none !important;
}

#status {
    text-align: center;
    font-size: 0.875rem;
    min-height: 1.2rem;
    margin: 1rem 0.5rem 0rem;
}

#debugStats {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: #ccc;
    word-wrap: break-word;
}

/* css/components/audio-player.css */
audio {
    display: block;
    width: 80%;
    margin: 1rem auto;
}

/* css/components/buttons.css */
.mainbtn {
    border: none;
    border-radius: 9999px;
    background: #f7893d;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btns {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 1.25rem;
}

button {
    /* General button styles */
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    color: #fff;
    background: var(--c-primary);
    transition: opacity 0.2s;
}

button[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Styles for buttons within .btns if specific overrides are needed */
.btns #nextBtn,
.btns #secondBtn,
.btns #startIntro,
.btns #startInstruction,
.btns #mainBtn {
    min-width: 200px;
    font-weight: bold;
    padding: 0.25rem 0 0.5rem;
    font-size: 1rem;
}

#ackBtn {
    min-width: 200px;
    font-weight: bold;
    padding: 0.55rem 0 0.5rem;
    font-size: 1rem;
}

/* css/components/overlay.css */
#overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    /* Initial display is none, controlled by JS */
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    z-index: 9999;
    flex-direction: column;
    text-align: center;
    padding: 1rem;
}

.record_instruction {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 95%;
    max-width: 600px;
    padding: 1.5rem;
    box-sizing: border-box;
    margin: 0 auto 1.5rem;
    color: #333;
}

.recommender-code-input {
    width: 95%;
    height: auto;
    line-height: 2rem;
    font-size: 1rem;
    color: #000;
    padding: 0 16rpx;
    box-sizing: border-box;
    border-radius: 10px;
    background-color: #fff;
    outline: none;
    display: block;
    margin: 0 auto 20rpx;
    /* 如果需要居中并加下方间距 */
}


#overlay-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0.5rem;
}

/* css/components/progress.css */
progress {
    width: 100%;
    height: 1rem;
    appearance: none;
    margin-bottom: 0.25rem;
}

progress::-webkit-progress-bar {
    background: #ffffff;
    border-radius: 0.5rem;
}

progress::-webkit-progress-value {
    background: var(--c-primary);
    border-radius: 0.5rem;
}

/* Progress label (from inline style) */
#progressLabel {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* css/components/sliders.css */
label[for="fontSlider"],
label[for="speedSlider"] {
    min-width: 75px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

/* Slider track containers (from inline styles in HTML) */
#fontContainer,
#speedContainer {
    position: relative;
    flex: 1;
    height: 8px;
    border-radius: 4px;
}

/* Initial static background for #fontContainer before JS applies dynamic one */
#fontContainer {
    background: linear-gradient(to right, #f7893d 0%, #f7893d 14%, #334155 14%, #334155 100%);
}

/* Initial static background for #speedContainer before JS applies dynamic one */
#speedContainer {
    background: linear-gradient(to right, #f7893d 0%, #f7893d 16%, #334155 16%, #334155 100%);
}

/* Slider input elements (from inline styles in HTML) */
#fontSlider,
#speedSlider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    appearance: none;
    background: transparent;
    cursor: pointer;
    accent-color: #ffffff;
}

#speedSlider {
    padding: 0;
}

/* Slider thumbs */
#fontSlider::-webkit-slider-thumb,
#speedSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
}

#fontSlider::-moz-range-thumb,
#speedSlider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    cursor: pointer;
}

/* Slider value display spans (from inline styles in HTML) */
#fontVal,
#speedVal {
    font-size: 0.875rem;
    width: 24px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    padding-right: 10px;
}

/* css/components/teleprompter.css */
#teleprompter {
    position: relative;
    height: 35vh;
    overflow-y: hidden;
    /* JS handles scrolling */
    border: 1px solid #444;
    border-radius: 8px;
    margin: 0 0.5rem 1rem;
    background: #ffffff;
    color: #000000;
    padding: 1rem;
}

#teleprompterContent {
    white-space: pre-wrap;
    line-height: 1.25;
    /* font-size is controlled by JS via fontSlider */
}

#teleMsg {
    font-size: 0.875rem;
}