:root {
    --bg-color: #1e1e2e;
    --key-bg: #313244;
    --key-active: #cba6f7;
    --key-text: #cdd6f4;
    --key-text-active: #1e1e2e;
    --border: #45475a;
    --highlight: #89b4fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto Mono', monospace;
    background-color: var(--bg-color);
    color: var(--key-text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 1200px;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.highlight {
    color: var(--highlight);
}

.subtitle {
    color: #a6adc8;
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
    background: #181825;
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat .label {
    display: block;
    font-size: 0.8rem;
    color: #a6adc8;
    margin-bottom: 0.25rem;
}

.stat .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--highlight);
}

/* Keyboard Visualizer */
.keyboard-visualizer {
    background: #181825;
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
    overflow-x: auto;
}

.key-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    justify-content: center;
}

.key {
    background: var(--key-bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--key-text);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
    height: 50px;
    width: 50px;
    /* Base unit */
    transition: all 0.05s;
    user-select: none;
    box-shadow: 0 4px 0 #11111b;
}

.key.active {
    background: var(--key-active);
    color: var(--key-text-active);
    transform: translateY(4px);
    box-shadow: 0 0 0 #11111b;
    border-color: var(--key-active);
}

.key.tested {
    border-color: #a6e3a1;
    /* Green border for tested keys */
    color: #a6e3a1;
}

.key.active.tested {
    color: var(--key-text-active);
}

/* Key Sizes */
.wide-1-25 {
    width: 62.5px;
}

.wide-1-5 {
    width: 75px;
}

.wide-1-75 {
    width: 87.5px;
}

.wide-2 {
    width: 100px;
}

.wide-2-25 {
    width: 112.5px;
}

.wide-2-75 {
    width: 137.5px;
}

.wide-6 {
    width: 300px;
}

.empty {
    background: transparent;
    border: none;
    box-shadow: none;
}

.nav-cluster {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.actions {
    text-align: center;
    margin-bottom: 2rem;
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--key-text);
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background: var(--key-bg);
    border-color: var(--highlight);
}

.log-area {
    background: #181825;
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.log-area h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #a6adc8;
}

.log-box {
    height: 150px;
    overflow-y: auto;
    font-size: 0.85rem;
    color: #a6adc8;
    font-family: 'Roboto Mono', monospace;
}

.log-entry {
    margin-bottom: 0.25rem;
    border-bottom: 1px solid #313244;
    padding-bottom: 0.25rem;
}

.log-entry .code {
    color: var(--highlight);
    font-weight: 700;
}