/**!
 * 字幕提词器程序-网页样式
 */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    /* 这里不限制容器的最大宽度，根据屏幕宽度来自适应显示 */
    width: 100%;
    /* max-width: 1000px; */
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-top: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.control-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.control-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #FFD700;
}

select, input[type="range"], textarea {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    resize: vertical;
}

textarea {
    min-height: 120px;
    font-family: inherit;
}

input[type="range"] {
    height: 8px;
    -webkit-appearance: none;
    background: #ddd;
    outline: none;
    padding: 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FFD700;
    cursor: pointer;
}

.value-display {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
}

.subtitle-container {
    position: relative;
    width: 100%;
    height: 900px;
    /* height: 300px; */
    overflow: hidden;
    border: 3px solid #FFD700;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.8);
    margin-bottom: 20px;
}

.subtitle-content {
    position: absolute;
    width: 100%;
    text-align: center;
    padding: 20px;
    white-space: pre-line;
    line-height: 1.6;
}

.button-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

button {
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    background: #FFD700;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    min-width: 120px;
}

button:hover {
    background: #FFC400;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

button:active {
    transform: translateY(0);
}

#pauseBtn {
    background: #ff5e00;
    color: white;
}

#resetBtn {
    background: #c30000;
    color: white;
}

#updateBtn {
    background: #00a86b;
    color: white;
}

.preview-text {
    margin-top: 10px;
    font-style: italic;
    color: #aaa;
}

.text-input-group {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .control-panel {
        grid-template-columns: 1fr;
    }

    .subtitle-container {
        height: 850px;
        /* height: 250px; */
    }

    .button-group {
        flex-direction: column;
        align-items: center;
    }

    button {
        width: 100%;
        max-width: 300px;
    }
}

