@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

body {
    margin: 0;
    padding: 0;
    font-family: "Roboto", sans-serif;
    background-color: rgb(10, 10, 10);
}

#mainHeader {
    display: flex;
    justify-content: center;
    align-items: center;
}

#title {
    color: white;
    margin-top: 35px;
}

.redTitle {
    color: rgb(210, 0, 0);
}

#userInput {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-top: 40px;
}

#textInput {
    height: 400px;
    width: 600px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgb(22, 22, 22);
    color: #e0e0e0;
    padding: 16px;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    outline: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    resize: none;
}

#textInput:focus {
    background-color: rgb(30, 30, 30);
    box-shadow: 0 4px 20px rgba(50, 50, 50, 0.3);
}

#textInput::placeholder {
    color: #666;
}

#startButton {
    border: none;
    color: white;
    background-color: rgb(80, 80, 80);
    border-radius: 5px;
    padding: 10px 20px;
    margin-top: 30px;
    cursor: pointer;
}

#reader {
    display: none;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    height: 100vh;
}

#readerHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 25px;
}

#backButton {
    border: none;
    border-radius: 10px;
    background-color: rgba(100, 100, 100, 0.4);
    height: 40px;
    width: 40px;
    padding-left: 0px;
    margin-left: 40px;
    cursor: pointer;
}

#backButtonImg {
    height: 40px;
    width: 40px;
}

#progress {
    color: gray;
    font-size: 21px;
    margin-right: 40px;
}

#focusWord {
    color: white;
    font-size: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 200px;
    font-family: monospace;
    letter-spacing: 0;
}

#focusWord span {
    font-variant-ligatures: none;
}

.leftPart {
    flex: 1;
    text-align: right;
    padding-right: 8px;
    overflow: hidden;
    white-space: nowrap;
}

.orp {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.redLetter {
    color: rgb(210, 0, 0);
}

.rightPart {
    flex: 1;
    text-align: left;
    padding-left: 8px;
    overflow: hidden;
    white-space: nowrap;
}

#otherButtons {
    margin-bottom: 40px;
}

#resetButton, #playPauseButton, #speedButton {
    border: none;
    border-radius: 10px;
    background-color: rgba(100, 100, 100, 0.4);
    height: 50px;
    width: 50px;
    padding-top: 6px;
    cursor: pointer;
    margin: 0px 32px;
}

#speedWrapper {
    position: relative;
    display: inline-block;
}

#speedButton {
    padding-top: 4px !important;
}

#speedMenu {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 30, 0.95);
    border-radius: 12px;
    display: none;
    flex-direction: column;
    padding: 10px;
    gap: 6px;
    min-width: 140px;
}

#speedMenu button {
    background: transparent;
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
}

#speedMenu button:hover {
    background: rgba(200, 200, 200, 0.15);
    color: white;
}

#speedMenu button.active {
    background: rgba(200, 200, 200, 0.25);
}

#playPauseButton {
    padding-right: 8px !important;
}

#resetButtonImg, #playButtonImg, #pauseButtonImg, #speedButtonImg {
    height: 35px;
    width: 35px;
}

#pauseButtonImg {
    display: none;
}

@media (min-width: 768px) and (max-width: 1023px) {

    #title {
        margin-top: 35px;
    }

    #userInput {
        margin-top: 30px;
    }

    #textInput {
        height: 350px;
        width: 525px;
        border-radius: 10px;
        padding: 12px;
    }

    #startButton {
        border-radius: 4px;
        padding: 9px 18px;
        margin-top: 25px;
    }

    #focusWord {
        font-size: 75px;
        height: 150px;
    }

    .leftPart {
        padding-right: 6px;
    }

    .orp {
        width: 50px;
        min-width: 50px;
        max-width: 50px;
    }

    .rightPart {
        padding-left: 4px;
    }
}

@media (min-width: 481px) and (max-width: 767px) {

    #title {
        margin-top: 30px;
    }

    #userInput {
        margin-top: 25px;
    }

    #textInput {
        height: 600px;
        width: 400px;
        border-radius: 8px;
        padding: 8px;
    }

    #startButton {
        border-radius: 4px;
        padding: 9px 18px;
        margin-top: 25px;
        margin-bottom: 30px;
    }

    #focusWord {
        font-size: 50px;
        height: 100px;
    }

    .leftPart {
        padding-right: 4px;
    }

    .orp {
        width: 35px;
        min-width: 35px;
        max-width: 35px;
    }

    .rightPart {
        padding-left: 2px;
    }
}

@media (min-width: 320px) and (max-width: 480px) {

    #title {
        margin-top: 30px;
    }

    #userInput {
        margin-top: 20px;
    }

    #textInput {
        height: 600px;
        width: 300px;
        border-radius: 6px;
        padding: 6px;
    }

    #startButton {
        border-radius: 3px;
        padding: 8px 16px;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    #focusWord {
        font-size: 40px;
        height: 80px;
    }

    .leftPart {
        padding-right: 3px;
    }

    .orp {
        width: 25px;
        min-width: 25px;
        max-width: 25px;
    }

    .rightPart {
        padding-left: 1px;
    }

    #resetButton, #playPauseButton, #speedButton {
        margin: 0px 24px;
    }
}