* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #222;
    color: #fff;
    overflow: hidden;
}

#app {
    width: 100vw;
    height: 100vh;
    position: relative;
}

.controls {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 15px 20px;
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(0);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.controls.hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

h1 {
    font-size: 20px;
    margin: 0;
    display: inline-block;
}

.instructions {
    color: white;
    font-size: 1rem;
    margin: 0;
    display: inline-block;
    margin-left: 20px;
}

.test-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
    position: relative;
}

.test-section h2 {
    font-size: 14px;
    margin: 0;
    color: #ddd;
    min-width: 100px;
}

.button-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background-color: #444;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

button:hover {
    background-color: #555;
}

button:active {
    background-color: #333;
}

button[data-color="#FFFFFF"] {
    background-color: #f0f0f0;
    color: #333;
}

button[data-color="#000000"] {
    background-color: #111;
}

button[data-color="#FF0000"] {
    background-color: #c00;
}

button[data-color="#00FF00"] {
    background-color: #0a0;
}

button[data-color="#0000FF"] {
    background-color: #00f;
}

button[data-color="#FFFF00"] {
    background-color: #cc0;
    color: #333;
}

button[data-color="#00FFFF"] {
    background-color: #0cc;
    color: #333;
}

button[data-color="#FF00FF"] {
    background-color: #c0c;
}

.fullscreen-btn, .reset-btn {
    padding: 8px 16px;
    font-size: 14px;
    margin: 0;
}

.fullscreen-btn {
    background-color: #0066cc;
}

.fullscreen-btn:hover {
    background-color: #0052a3;
}

.reset-btn {
    background-color: #666;
}

.reset-btn:hover {
    background-color: #777;
}

#test-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Credit styles */
.credit {
    position: absolute;
    right: 0;
    color: white;
    font-size: 1rem;
    white-space: nowrap;
}

/* Fullscreen styles */
:fullscreen .controls,
:-webkit-full-screen .controls,
:-moz-full-screen .controls,
:-ms-fullscreen .controls {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

/* Add header layout */
.header-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-right {
    display: flex;
    gap: 10px;
}