:root {
    --tile-border: #3f3f46;
    --tile-border-active: #a1a1aa;
    --bg-dark: #18181b;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
}

/* Custom Row Grid Layout setup */
.row-layout {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto auto;
    gap: 0.5rem;
    align-items: center;
}

/* Dynamic Square Aspect Ratio Utility */
.tile-wrapper {
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    position: relative;
    border: 2px solid var(--tile-border);
    border-radius: 0.375rem;
    background-color: #27272a;
    transition: all 0.15s ease-in-out;
}

.tile-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Visual Active typing box frame highlighting */
.tile-wrapper.active-box {
    border-color: var(--tile-border-active);
    box-shadow: 0 0 0 1px rgba(161, 161, 170, 0.2);
    background-color: #3f3f46;
}

/* Standardized Indicator Circles */
.score-circle {
    width: 42px;
    height: 42px;
    border-radius: 9999px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: #111827;
    margin-left: 0.25rem;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Animation classes */
.pop-effect {
    transform: scale(1.12);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    15%, 45%, 75% { transform: translateX(-6px); }
    30%, 60%, 90% { transform: translateX(6px); }
}

.shake-animation {
    animation: shake 0.45s ease-in-out;
}

@keyframes modalPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.animate-pop {
    animation: modalPop 0.25s ease-out forwards;
}

/* Key element interactivity modifications */
.key-cap {
    background-color: #3f3f46;
    color: #f4f4f5;
    user-select: none;
    cursor: pointer;
    transition: background-color 0.1s ease;
}

.key-cap:hover {
    background-color: #52525b;
}

.key-cap:active {
    background-color: #71717a;
    transform: scale(0.96);
}

/* Custom responsiveness overrides */
@media (max-width: 400px) {
    .tile-content {
        font-size: 1.35rem;
    }
    .score-circle {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
    }
}
