* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    background-color: #282c34;
    color: #abb2bf;
}

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.nav-container {
    width: 100%;
    padding: 10px 20px;
    background-color: #21252b;
    height: 60px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    color: white;
    font-family: "Times New Roman", sans-serif;
    margin-right: 15px;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    padding: 5px 5px;
    transition: color 0.3s ease;
}

nav a:hover {
    background-color: yellow;
    color: #000000;
}

.nav-right {
    margin-left: auto;
}

.container-wrapper {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: calc(100vh - 100px);
}

.left-container, .center-container, .right-container {
    flex: 1;
    padding: 25px;
    background-color: #21252b;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow-y: auto;
}

.left-container, .right-container {
    color: #abb2bf;
}

.center-container {
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.left-container h2, .center-container h2, .right-container h2 {
    color: #e5c07b;
    margin-bottom: 15px;
    font-weight: 600;
}

.left-container p, .center-container p, .right-container p {
    font-size: 16px;
    margin-bottom: 10px;
}

.left-container p {
    color: #abb2bf;
}

.center-container p {
    color: #ffffff;
}

.right-container p {
    color: #abb2bf;
}

.left-container ol, .right-container ol {
    padding-left: 20px;
    font-size: 16px;
    color: #abb2bf;
    line-height: 1.6;
}

.stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 16px;
    width: 100%;
    justify-content: space-between;
}

.stats div {
    background: #2c323c;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #61afef;
    color: #ffffff;
}

.table-container {
    height: 200px;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 2px solid #61afef;
    border-radius: 8px;
    width: 255px;
    background: #2c323c;
}

table {
    width: 100%;
    border-collapse: collapse;
}

td {
    padding: 4px 8px;
    border: 1px solid #3e4451;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 20px;
    line-height: 1.2;
    white-space: nowrap;
    color: #ffffff;
}

td:first-child {
    text-align: right;
}

.wrong {
    color: #e06c75;
}

.correct {
    color: #ffffff;
}

.controls {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: center;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.length-speed-group, .language-tone-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

label {
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 4px;
}

select {
    padding: 8px;
    border: 2px solid #61afef;
    border-radius: 8px;
    background: #21252b;
    font-size: 14px;
    color: #ffffff;
    transition: border-color 0.3s ease;
}

select:hover, select:focus {
    border-color: #98c379;
    outline: none;
}

#cpm {
    font-size: 14px;
    color: #ffffff;
}

.input-and-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    width: 100%;
}

#inputField {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 20px;
    height: 48px;
    width: 150px;
    padding: 2px 10px;
    border: 2px solid #61afef;
    border-radius: 8px;
    background: #21252b;
    color: #ffffff;
    transition: border-color 0.3s ease;
}

#inputField:focus {
    border-color: #98c379;
    outline: none;
}

.buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    width: 100%;
    max-width: 300px;
}

button {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: #98c379;
    color: #282c34;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-transform: uppercase;
}

button:disabled {
    background: #5c6370;
    cursor: not-allowed;
}

button:hover:not(:disabled) {
    background: #7cb305;
    transform: translateY(-2px);
}

button:active:not(:disabled) {
    transform: scale(0.98);
}

.footer-container {
    width: 100%;
    height: 40px;
    background-color: #21252b;
    position: fixed;
    bottom: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
}

footer {
    color: #abb2bf;
    font-size: 18px;
    font-weight: 600;
    padding: 10px;
    text-align: center;
}

@media (max-width: 600px) {
    .stats {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    button {
        padding: 6px 12px;
        font-size: 12px;
    }
}

#resultsTable td {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 20px;
    padding: 4px 8px;
    border: 1px solid #3e4451;
    line-height: 1.2;
    white-space: nowrap;
    color: #ffffff;
}

.correct {
    color: #ffffff;
}

.wrong {
    color: #e06c75;
}

.dash {
    color: #00bfff;
}
