/* Settings Page Styles */
.settings-page {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.settings-page h1 {
    margin-bottom: 20px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
    text-shadow: 0 1px 0 #fff;
}

.settings-section {
    background: #fdfdfd;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.settings-section h3 {
    margin-top: 0;
    margin-bottom: 5px;
    text-shadow: none;
}

.settings-section p {
    font-size: 14px;
    color: #666;
    margin-top: 0;
    margin-bottom: 15px;
    text-shadow: none;
}

/* Toggle Switch Styles */
.toggle-switch-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 80px; /* Wider for ON/OFF text */
    height: 30px; /* Slightly smaller height */
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    background-image: linear-gradient(to bottom, #ddd, #bbb);
    transition: .4s;
    border-radius: 30px; /* Pill shape */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
    border: 1px solid #aaa;
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 2px;
    bottom: 2px;
    background-color: #f5f5f5;
    background-image: linear-gradient(to bottom, #ffffff, #e9e9e9);
    transition: .4s;
    border-radius: 24px; /* Circular handle */
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    border: 1px solid #999;
}

/* Add text for ON/OFF states */
.slider:after {
    content: 'OFF';
    color: #777;
    display: block;
    position: absolute;
    transform: translate(-50%,-50%);
    top: 50%;
    left: 70%; /* Position OFF text */
    font-size: 11px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: bold;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
    transition: all 0.4s;
}

input:checked + .slider {
    background-color: #4477A1;
    background-image: linear-gradient(to bottom, #5d9dcf, #4477A1);
}

input:checked + .slider:before {
    transform: translateX(50px); /* Move handle to the right */
}

/* Change text to ON when checked */
input:checked + .slider:after {
    content: 'ON';
    left: 30%; /* Position ON text */
    color: #fff;
    text-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

.slider.round {
    border-radius: 30px;
}

.slider.round:before {
    border-radius: 50%;
}

#language-select,
#tts-text-input,
#tts-voice-select,
#forum-content-input,
#forum-title-input,
#comment-content-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-family: inherit;
    resize: vertical;
    background-color: #ffffff;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
}

#tts-text-input,
#forum-content-input,
#comment-content-input {
    min-height: 80px;
}

.tts-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.tts-controls select {
    flex-grow: 1;
    margin-bottom: 0;
}

/* Highlight for Click-to-Read */
.reading-aloud {
    background-color: #fffbdd !important;
    transition: background-color 0.3s;
}