* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    height: 100vh;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
}

body {
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
}

.output-section {
    flex: 1 1 auto;
    min-height: 25%;
    padding: 10px;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
    border-bottom: 3px solid #0d6efd;
    box-sizing: border-box;
}

#keyboard-output {
    flex: 1 1 auto;
    font-size: clamp(1rem, 3vw, 2.5rem) !important;
    padding: 10px !important;
    border: 3px solid #0d6efd !important;
    border-radius: 10px !important;
    word-wrap: break-word;
    white-space: pre-wrap;
    overflow-y: auto;
    resize: none;
}

.scroll-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: auto;
}

.scroll-button {
    flex: 1 1 50%;
    width: 60px;
    min-width: 50px;
    font-size: clamp(1.5rem, 3vw, 2rem) !important;
    font-weight: bold !important;
    border: 2px solid #0d6efd !important;
    background-color: #d9d9d9 !important;
    color: #000000 !important;
    cursor: pointer;
    transition: all 0.1s;
    border-radius: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

.scroll-button:hover {
    background-color: #0d6efd !important;
    color: white !important;
    transform: scale(1.05);
}

.scroll-button:active {
    transform: scale(0.95);
}

.keyboard-section {
    flex: 1 1 auto;
    min-height: 75%;
    padding: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.keyboard-table {
    width: 100%;
    height: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.keyboard-table tr {
    height: 25%;
}

.keyboard-table td {
    padding: 5px;
    border: none;
    box-sizing: border-box;
}

.keyboard-button {
    width: 100%;
    height: 100%;
    font-size: clamp(1rem, 4vw, 3.5rem) !important;
    font-weight: bold !important;
    border: 2px solid #0d6efd !important;
    cursor: pointer;
    transition: all 0.1s;
    border-radius: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

.keyboard-button.key-light {
    background-color: #f0f0f0 !important;
    color: #000000 !important;
}

.keyboard-button.key-dark {
    background-color: #d9d9d9 !important;
    color: #000000 !important;
}

.keyboard-button:hover {
    background-color: #0d6efd !important;
    color: white !important;
    transform: scale(1.05);
}

.keyboard-button:active {
    transform: scale(0.95);
}

.enter-button {
    width: 100%;
    height: 100%;
    font-size: clamp(1rem, 4vw, 3.5rem) !important;
    font-weight: bold !important;
    border: 2px solid #0d6efd !important;
    background-color: #0d6efd !important;
    color: white !important;
    cursor: pointer;
    transition: all 0.1s;
    border-radius: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

.enter-button:hover {
    background-color: #0a58ca !important;
    transform: scale(1.05);
}

.enter-button:active {
    transform: scale(0.95);
}

.spacebar-button {
    width: 100%;
    height: 100%;
    font-size: clamp(1rem, 4vw, 3.5rem) !important;
    font-weight: bold !important;
    border: 2px solid #0d6efd !important;
    background-color: #f0f0f0 !important;
    color: #000000 !important;
    cursor: pointer;
    transition: all 0.1s;
    border-radius: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

.spacebar-button:hover {
    background-color: #0d6efd !important;
    color: white !important;
    transform: scale(1.05);
}

.spacebar-button:active {
    transform: scale(0.95);
}