body {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: Arial, sans-serif;
    background: white;
    overflow-x: hidden;
}

#logo-container {
    text-align: center;
    padding: 20px 0;
    position: relative;
}

#wpm-display {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    font-size: 14px;
    font-weight: bold;
}

#logo {
    height: 60px;
    width: auto;
}

#reader-container {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.word {
    font-size: 48px;
    font-weight: bold;
    max-width: 45%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media screen and (max-width: 768px) {
    body {
        min-height: -webkit-fill-available;
    }

    .word {
        font-size: 24px;
    }
    
    #logo {
        height: 40px;
    }
    
    #controls {
        padding: 10px;
    }
    
    .control-group {
        flex-wrap: wrap;
        gap: 5px;
        justify-content: space-around;
        width: 100%;
    }
    
    button {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 60px;
    }
    
    textarea {
        height: 60px;
        font-size: 14px;
    }
    
    .slider-group {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        max-width: 300px;
    }
    
    .slider-container {
        width: 100%;
    }
    
    input[type="number"] {
        width: 60px;
    }

    #reader-container {
        padding: 0 10px;
    }

    .toggle-group {
        margin: 15px 0;
    }

    .slider-label {
        margin-bottom: 5px;
    }
}

#controls {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

textarea, .input-text {
    width: 100%;
    max-width: 800px;
    height: 100px;
    margin-bottom: 10px;
    padding: 10px;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

#input-text a {
    color: #0066cc;
    text-decoration: underline;
    cursor: pointer;
}

#input-text a:hover {
    color: #0052a3;
}

.control-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

button {
    padding: 8px 16px;
    cursor: pointer;
    background: #000000;
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 14px;
}

button:hover {
    background: #333333;
}

label {
    margin-right: 10px;
}

.slider-group {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
    max-width: 800px;
    justify-content: center;
}

.slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
}

.slider-label {
    font-size: 14px;
    color: #333;
}

.toggle-group {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 10px;
}

.toggle-button {
    padding: 8px 16px;
    cursor: pointer;
    background: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 3px;
    font-size: 14px;
}

.toggle-button.active {
    background: #000;
    color: white;
}

.period-toggle {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    background: #f0f0f0;
    font-weight: bold;
}

.period-toggle.active {
    background: #000;
    color: white;
}

.period-toggle[title] {
    position: relative;
}

.mono .word {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

#right-word.hidden {
    display: none;
}

/* Slider styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    outline: none;
}

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

input[type="range"]::-moz-range-thumb {
    width: 15px;
    height: 15px;
    background: #000000;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

input[type="range"]::-moz-range-track {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}
