.tester-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 75vh;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.panel-header h2 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.device-status {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(0,0,0,0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.device-status.connected {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Top HUD */
.hud-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.active-keys-container {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 1rem;
    min-height: 120px;
}

.empty-state {
    color: rgba(255, 255, 255, 0.2);
    font-size: 1.5rem;
    font-weight: 300;
    width: 100%;
    text-align: center;
    margin-top: 2rem;
}

/* Big glowing keycaps */
.keycap {
    background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(0,0,0,0.5));
    border: 1px solid var(--primary-color);
    border-bottom-width: 4px;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    min-width: 80px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
    animation: popIn 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.keycap .key-main {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.keycap .key-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--primary-light);
    margin-top: 0.2rem;
    opacity: 0.8;
}

@keyframes popIn {
    0% { transform: scale(0.8) translateY(10px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Gamepad Axes */
.axes-container {
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 1.5rem;
}

.axes-container.hidden {
    display: none;
}

.axes-container h3 {
    margin-top: 0;
    font-size: 1rem;
    color: var(--text-muted);
}

.axes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.axis-item {
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
}

.axis-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
}

.axis-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.5);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.axis-bar {
    position: absolute;
    height: 100%;
    width: 2px;
    background: var(--primary-color);
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 8px var(--primary-color);
}

/* Bottom Log */
.log-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.btn-clear-beautiful {
    background: linear-gradient(135deg, #ef4444, #f43f5e);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

.btn-clear-beautiful:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, #f87171, #fb7185);
}

.log-container {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.log-entry {
    background: rgba(255,255,255,0.03);
    border-left: 3px solid transparent;
    padding: 0.5rem 0.8rem;
    border-radius: 0 4px 4px 0;
    animation: fadeIn 0.2s ease forwards;
}

.log-entry.keyboard { border-left-color: #a855f7; }
.log-entry.mouse { border-left-color: #3b82f6; }
.log-entry.gamepad { border-left-color: #10b981; }

.log-entry-header {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.log-entry-type {
    font-weight: bold;
    color: white;
}

.log-entry-data {
    color: #a78bfa;
}
.log-entry.mouse .log-entry-data { color: #93c5fd; }
.log-entry.gamepad .log-entry-data { color: #6ee7b7; }

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}
