:root {
    --bg-color: #121212;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --accent-color: #00f2ff;
    --accent-glow: rgba(0, 242, 255, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-ui: 'Inter', sans-serif;
    --font-code: 'JetBrains Mono', monospace;


    --radius-lg: 8px;
    --radius-md: 4px;
    --radius-sm: 2px;
}


[data-theme="matrix"] {
    --bg-color: #0d1a0d;
    --text-primary: #00ff41;
    --text-secondary: #008f11;
    --accent-color: #00ff41;
    --accent-glow: rgba(0, 255, 65, 0.4);
    --glass-bg: rgba(0, 20, 0, 0.4);
    --glass-border: rgba(0, 255, 65, 0.2);
}

[data-theme="sunset"] {
    --bg-color: #1a0b1a;
    --text-primary: #ffe6f2;
    --text-secondary: #ff99cc;
    --accent-color: #ff8800;
    --accent-glow: rgba(255, 136, 0, 0.5);
    --glass-bg: rgba(40, 10, 30, 0.3);
    --glass-border: rgba(255, 136, 0, 0.2);
}

[data-theme="ocean"] {
    --bg-color: #0a192f;
    --text-primary: #e6f1ff;
    --text-secondary: #8892b0;
    --accent-color: #64ffda;
    --accent-glow: rgba(100, 255, 218, 0.4);
    --glass-bg: rgba(10, 25, 47, 0.4);
    --glass-border: rgba(100, 255, 218, 0.2);
}

[data-theme="dracula"] {
    --bg-color: #282a36;
    --text-primary: #f8f8f2;
    --text-secondary: #bd93f9;
    --accent-color: #ff79c6;
    --accent-glow: rgba(255, 121, 198, 0.4);
    --glass-bg: rgba(40, 42, 54, 0.4);
    --glass-border: rgba(189, 147, 249, 0.2);
}

[data-theme="monochrome"] {
    --bg-color: #000000;
    --text-primary: #ffffff;
    --text-secondary: #666666;
    --accent-color: #ffffff;
    --accent-glow: rgba(255, 255, 255, 0.3);
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.2);
}

[data-theme="forest"] {
    --bg-color: #0c1a12;
    --text-primary: #e0f2e0;
    --text-secondary: #8fb396;
    --accent-color: #4caf50;
    --accent-glow: rgba(76, 175, 80, 0.4);
    --glass-bg: rgba(12, 26, 18, 0.5);
    --glass-border: rgba(76, 175, 80, 0.2);
}

[data-theme="berry"] {
    --bg-color: #1a0f14;
    --text-primary: #ffe0eb;
    --text-secondary: #cc8da3;
    --accent-color: #ff4081;
    --accent-glow: rgba(255, 64, 129, 0.4);
    --glass-bg: rgba(26, 15, 20, 0.5);
    --glass-border: rgba(255, 64, 129, 0.2);
}

[data-theme="mellow"] {
    --bg-color: #1a180f;
    --text-primary: #fffbe0;
    --text-secondary: #b3a98f;
    --accent-color: #ffd700;
    --accent-glow: rgba(255, 215, 0, 0.4);
    --glass-bg: rgba(26, 24, 15, 0.5);
    --glass-border: rgba(255, 215, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    min-height: 100vh;
    width: 100%;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: var(--font-ui);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

html {
    overflow-x: hidden;
}


.keyboard-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: auto;
}

#keyboard {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.4;
    filter: contrast(1.1);
    pointer-events: none;
}


.attribution-tooltip {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    max-width: 300px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.attribution-tooltip.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    pointer-events: none;
}

.attribution-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.attribution-tooltip h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    font-family: var(--font-ui);
}

.close-tooltip-btn {
    background: transparent;
    border: none;
    color: #888888;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.close-tooltip-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.attribution-tooltip p {
    margin: 6px 0;
    font-size: 13px;
    color: #cccccc;
    font-family: var(--font-ui);
    line-height: 1.5;
}

.attribution-tooltip p strong {
    color: #ffffff;
    font-weight: 600;
}

.attribution-tooltip a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 14px;
    background: rgba(0, 242, 255, 0.15);
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-family: var(--font-ui);
    font-weight: 500;
    border: 1px solid rgba(0, 242, 255, 0.3);
    transition: all 0.2s ease;
}

.attribution-tooltip a:hover {
    background: rgba(0, 242, 255, 0.25);
    border-color: var(--accent-color);
    transform: translateX(3px);
    box-shadow: 0 0 15px var(--accent-glow);
}

.attribution-tooltip a i {
    font-size: 12px;
}


nav {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: 10px;
    z-index: 20;
    position: relative;
}

nav .nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 95%;
    max-width: 1400px;
    padding: 12px 24px;
    position: relative;
    z-index: 20;
    transition: all 0.3s ease;
    gap: 15px;
    flex-wrap: nowrap;
}

nav .nav-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 20, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    z-index: -1;
    pointer-events: none;
    transition: all 0.3s ease;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 0;
}


.slide-menu {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    width: 320px;
    height: 100vh;

    background: linear-gradient(135deg, rgba(20, 20, 20, 0.85), rgba(30, 30, 30, 0.75));
    position: fixed;
    right: 0;
    top: 0;
    z-index: 9999;

    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    padding: 80px 25px 30px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    gap: 15px;
    overflow-y: auto;
}


.slide-menu::-webkit-scrollbar {
    width: 4px;
}

.slide-menu::-webkit-scrollbar-track {
    background: transparent;
}

.slide-menu::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

.slide-menu.active {
    transform: translateX(0);
}


.slide-menu .settings,
.slide-menu .times,
.slide-menu .word-settings,
.slide-menu .coding-v {
    flex-direction: column;
    width: 100%;
    gap: 8px;
    animation: slideInItems 0.4s ease forwards;
}


.slide-menu .times[style*="flex"],
.slide-menu .word-settings[style*="flex"],
.slide-menu .coding-v[style*="flex"] {
    display: flex !important;
    flex-direction: column !important;
}

@keyframes slideInItems {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}



.slide-menu .btn {
    width: 100%;
    justify-content: flex-start;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.02);

    border-radius: var(--radius-md);
    text-align: left;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.slide-menu #theme-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.02);

    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
}


.slide-menu .btn:hover,
.slide-menu #theme-btn:hover {
    background: rgba(255, 255, 255, 0.08);

    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.05);

    transform: translateX(4px);
    box-shadow: none;

}

.slide-menu .btn i,
.slide-menu #theme-btn i {
    width: 24px;
    text-align: center;
    margin-right: 10px;
    color: var(--accent-color);
    transition: transform 0.2s ease;
}

.slide-menu .btn:hover i,
.slide-menu #theme-btn:hover i {
    transform: scale(1.1);
    text-shadow: none;

}


.slide-menu .active-mode {
    background: rgba(0, 242, 255, 0.1) !important;
    border-color: var(--accent-color) !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;

}


.slide-menu #v-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
    margin: 15px 0;
    opacity: 0.5;
}


.close-menu {
    display: none;

    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease, transform 0.3s ease;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    z-index: 10001;

    background: transparent;
    border: none;
}


.slide-menu .close-menu,
.nav-controls.slide-menu .close-menu {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.close-menu:hover {
    color: #ff4757;
}

#menu {
    margin: 0;
    display: none;
    align-items: center;
    justify-content: center;
}


#theme-btn {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#logo {
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

#logo i {
    color: var(--accent-color);
}



.settings {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-bar .btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    transition: all 0.2s ease;
    border-radius: var(--radius-md);
    white-space: nowrap;
}

.nav-bar .btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.active-mode {
    color: var(--accent-color) !important;
    background: rgba(0, 242, 255, 0.1) !important;
    text-shadow: 0 0 10px var(--accent-glow);
}

#v-line {
    width: 1px;
    height: 24px;
    background-color: var(--glass-border);
    margin: 0 15px;
}

.times,
.word-settings,
.coding-v {
    display: none;
    gap: 5px;
    align-items: center;
}


main {
    width: 70%;
    max-width: 900px;
    height: 40vh;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    z-index: 10;
    position: relative;
    pointer-events: auto;
}

#text-wrapper {
    position: relative;
    width: 100%;
    max-height: 180px;
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

#text,
#text2 {
    font-family: var(--font-code);
    font-size: 28px;
    line-height: 1.6;
    width: 100%;
    white-space: pre-wrap;
    padding: 20px;
    box-sizing: border-box;
    margin: 0;
    background: transparent;
    border-radius: 0;
}

#text {
    color: #444;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

#text2 {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    color: var(--text-primary);
    pointer-events: none;
    background: transparent;
}

.c-red {
    color: #ff4757;
    text-shadow: 0 0 5px rgba(255, 71, 87, 0.5);
}

#cursor {
    position: absolute;
    top: 0;
    width: 3px;
    height: 35px;
    background-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color), 0 0 20px var(--accent-color);
    transition: left 0.1s cubic-bezier(0.2, 0, 0.2, 1), top 0.1s cubic-bezier(0.2, 0, 0.2, 1);
    border-radius: 2px;
    pointer-events: none;
}

.timer {
    font-family: var(--font-code);
    font-size: 2rem;
    color: var(--accent-color);
    margin: 20px;
    text-shadow: 0 0 15px var(--accent-glow);
}


section {
    position: absolute;
    bottom: 60px;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 10;
}

.h-keyboard {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.h-keyboard div[class^="container"] {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.h-keyboard div[id^="key"] {
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.1s ease;
    user-select: none;
}

.h-keyboard #key27 {
    width: 250px;
}


.anima {
    background: var(--accent-color) !important;
    color: #000 !important;
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(2px);
    border-color: transparent !important;
    border-radius: var(--radius-md) !important;
}


.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: rgba(18, 18, 18, 0.9);
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    text-align: center;
    color: var(--text-primary);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-content h2 {
    font-family: var(--font-ui);
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px var(--accent-glow);
}

.stats {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 2.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: var(--font-code);
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.stat-item span:first-child {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.stat-item span:last-child {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#retry-btn {
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 12px 35px;
    border-radius: var(--radius-md);
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#retry-btn:hover {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 20px var(--accent-glow);
}


footer {
    width: 100%;
    height: 50px;
    background: var(--bg-color);
    background: linear-gradient(to top, #1a1a1a, transparent);
    position: fixed;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    z-index: 5;
}

footer a {
    color: var(--text-primary);
    text-decoration: none;
    margin-left: 5px;
    font-weight: 600;
}




@media (max-width: 1200px) {
    main {
        width: 85%;
    }

    #text,
    #text2 {
        font-size: 24px;
    }

    #cursor {
        height: 30px;
    }
}

@media (max-width: 1100px) {
    #menu {
        display: flex;
    }

    .nav-controls {
        display: none;
    }
}

@media (max-width: 1024px) {
    main {
        width: 90%;
        height: 35vh;
    }

    #text,
    #text2 {
        font-size: 22px;
        padding: 15px;
    }

    #cursor {
        height: 28px;
    }

    .nav-bar {
        width: 92%;
        padding: 12px 20px;
    }

    .timer {
        font-size: 1.8rem;
    }


    .attribution-tooltip {
        top: 15px;
        right: 15px;
        max-width: 280px;
        padding: 16px 20px;
    }

    .attribution-tooltip h3 {
        font-size: 15px;
    }

    .attribution-tooltip p {
        font-size: 12px;
    }
}


@media (max-width: 1024px) {
    main {
        width: 95%;
        margin-top: 3vh;
        height: auto;
        min-height: 30vh;
    }

    #text,
    #text2 {
        font-size: 20px;
        padding: 15px;
        line-height: 1.5;
    }

    #cursor {
        height: 25px;
        width: 2px;
    }

    .nav-bar {
        width: 95%;
        padding: 12px 15px;
        gap: 12px;
        justify-content: space-between;
    }

    .nav-bar .btn {
        font-size: 1rem;
        padding: 12px 16px;
        text-align: center;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .nav-controls .btn:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateX(5px);
    }

    #logo {
        font-size: 1.1rem;
    }

    .timer {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }

    @media (max-width: 768px) {
        .h-keyboard {
            display: none;
        }
    }

    @media (max-width: 1024px) {

        section {
            bottom: 80px;
        }

        .modal-content {
            width: 85%;
            padding: 2.5rem;
        }

        .modal-content h2 {
            font-size: 1.8rem;
            margin-bottom: 1.5rem;
        }

        .stat-item span:last-child {
            font-size: 1.8rem;
        }

    }


    @media (max-width: 480px) {
        main {
            width: 95%;
            margin-top: 2vh;
            min-height: 25vh;
        }

        #text,
        #text2 {
            font-size: 18px;
            padding: 12px;
            line-height: 1.4;
        }

        #cursor {
            height: 22px;
            width: 2px;
        }

        .nav-bar {
            flex-direction: row;
            width: 100%;
            padding: 10px 15px;
            gap: 0;
            justify-content: space-between;
        }

        .nav-controls {
            flex-direction: column;
            gap: 10px;
            width: 100%;
            align-items: center;
        }

        .settings {
            flex-wrap: wrap;
            justify-content: center;
            gap: 6px;
        }

        .nav-bar .btn {
            font-size: 0.8rem;
            padding: 6px 10px;
        }

        #logo {
            font-size: 1rem;
            margin-bottom: 8px;
            text-align: center;
        }

        #v-line {
            display: none;
        }

        .timer {
            font-size: 1.4rem;
            margin-bottom: 10px;
        }

        .modal-content {
            width: 92%;
            padding: 2rem 1.5rem;
        }

        .modal-content h2 {
            font-size: 1.5rem;
            margin-bottom: 1.2rem;
            letter-spacing: 2px;
        }

        .stats {
            grid-template-columns: 1fr;
            gap: 15px;
            margin-bottom: 2rem;
        }

        .stat-item span:first-child {
            font-size: 0.85rem;
        }

        .stat-item span:last-child {
            font-size: 1.6rem;
        }

        #retry-btn {
            padding: 10px 28px;
            font-size: 0.9rem;
        }

        footer {
            font-size: 0.7rem;
        }

        footer p {
            text-align: center;
            padding: 0 10px;
        }

        /* Attribution tooltip mobile positioning */
        .attribution-tooltip {
            position: fixed;
            bottom: 10px;
            top: auto;
            left: 50%;
            right: auto;
            transform: translateX(-50%);
            width: calc(100% - 20px);
            max-width: 340px;
            padding: 14px 16px;
            z-index: 80;
        }

        .attribution-tooltip.hidden {
            transform: translateX(-50%) translateY(-10px) scale(0.95);
        }

        .attribution-tooltip h3 {
            font-size: 14px;
        }

        .attribution-tooltip p {
            font-size: 11px;
            margin: 4px 0;
        }

        .attribution-tooltip .note {
            font-size: 10px;
            margin-top: 8px;
            padding-top: 8px;
        }

        .attribution-tooltip a {
            font-size: 11px;
            padding: 8px 12px;
            margin-top: 10px;
        }

        .close-tooltip-btn {
            width: 22px;
            height: 22px;
            font-size: 16px;
        }
    }


    @media (max-width: 360px) {

        #text,
        #text2 {
            font-size: 16px;
            padding: 10px;
        }

        #cursor {
            height: 20px;
        }

        .nav-bar .btn {
            font-size: 0.75rem;
            padding: 5px 8px;
        }

        #logo {
            font-size: 0.95rem;
        }

        .timer {
            font-size: 1.2rem;
        }

        .modal-content {
            padding: 1.5rem 1rem;
        }

        .modal-content h2 {
            font-size: 1.3rem;
        }

        .stat-item span:last-child {
            font-size: 1.4rem;
        }
    }


    @media (max-height: 750px) {
        .h-keyboard {
            transform: scale(0.7);
            transform-origin: bottom center;
            margin-bottom: -30px;
        }

        main {
            height: 35vh;
            margin-top: 3vh;
        }

        section {
            bottom: 100px;
        }
    }

    @media (max-height: 550px) {
        .h-keyboard {
            display: none;
        }
    }


    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }


    .nav-bar {
        animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    }

    #text-wrapper {
        animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s forwards;
        opacity: 0;
    }

    .h-keyboard {
        animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s forwards;
        opacity: 0;
    }

    .timer,
    .settings {
        animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s forwards;
        opacity: 0;
    }


    #cursor {
        transition: left 0.1s linear, top 0.1s linear;
    }
}

@media (max-height: 800px) {
    .h-keyboard {
        display: none;
    }
}