body {
    background-color: #2d2d30;
    color: #f1f1f1;
}

.teleprompter-container {
    background-color: #2d2d30;
    color: #f1f1f1;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.control-panel {
    background-color: #3e3e42;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.control-section {
    margin-bottom: 20px;
}

.control-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #f1f1f1;
}

.control-row {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.form-control, .form-select {
    background-color: #555;
    border-color: #666;
    color: #f1f1f1;
}

.form-control:focus, .form-select:focus {
    background-color: #555;
    border-color: #007bff;
    color: #f1f1f1;
}

.form-control::placeholder {
    color: #bbb;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.btn-play {
    background: linear-gradient(to right, #0078d4, #1084d7);
    border: none;
    color: white;
    font-weight: 600;
    padding: 10px 25px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-play:hover {
    background: linear-gradient(to right, #106ebe, #0078d4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.4);
}

.btn-play:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-play img {
    flex-shrink: 0;
    filter: brightness(0) invert(1);
}

.btn-play svg {
    flex-shrink: 0;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-control {
    background-color: #0078d4;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-control:hover {
    background-color: #106ebe;
}

.btn-control img {
    display: block;
    filter: brightness(0) invert(1);
}

#downloadButton {
    background: linear-gradient(to right, #107c10, #0e7d0e);
}

#downloadButton:hover {
    background: linear-gradient(to right, #0e6b0e, #107c10);
}

.value-display {
    background-color: #555;
    border: 1px solid #666;
    padding: 8px 12px;
    border-radius: 4px;
    text-align: center;
    min-width: 60px;
    color: #f1f1f1;
}

.slider {
    width: 150px;
    height: 6px;
    cursor: pointer;
}

.display-area {
    background-color: #1e1e1e;
    border: 2px solid #555;
    border-radius: 4px;
    padding: 40px 60px;
    text-align: center;
    min-height: 300px;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
}

.display-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    transition: transform 0.05s linear;
}

.display-text {
    word-wrap: break-word;
    white-space: pre-wrap;
    text-align: center;
    line-height: 1.6;
}

.display-area.scrolling .display-content {
    transform: translateY(var(--scroll-offset, 0px));
}

.color-picker-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-preview {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 2px solid #666;
    cursor: pointer;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.info-text {
    color: #aaa;
    font-size: 13px;
    margin-top: 5px;
}

.modal-dark {
    --bs-modal-bg: #3e3e42;
    --bs-modal-header-bg: #2d2d30;
    --bs-modal-header-border-color: #555;
    color: #f1f1f1;
}

.modal-dark .btn-close {
    filter: brightness(0) invert(1);
}

.last-spoken-word {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 36px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    display: none;
}

.last-spoken-word.active {
    display: block;
}
