:root {
    --primary-color: #4a9e4d;
    --accent-color: #f4d35e;
    --text-color: #fff;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    touch-action: none; /* Prevent default touch actions like scrolling */
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-family);
    background-color: #222;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass through to canvas */
    padding: 20px;
}

#hud {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.icon-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: transform 0.1s;
}

.icon-btn:active {
    transform: scale(0.95);
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-color);
    backdrop-filter: blur(5px);
    pointer-events: auto;
    z-index: 10;
}

.hidden {
    display: none !important;
}

h1 {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 10px;
    text-shadow: 2px 2px 0px #000;
}

p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.primary-btn {
    padding: 15px 40px;
    font-size: 1.5rem;
    color: white;
    background: var(--primary-color);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s, background 0.2s;
}

.primary-btn:hover {
    background: #5dbf60;
    transform: translateY(-2px);
}

.primary-btn:active {
    transform: translateY(0);
}

.secondary-btn {
    padding: 10px 20px;
    background: #666;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    margin-top: 20px;
}

/* Collection Grid */
#collection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 80%;
    max-height: 60%;
    overflow-y: auto;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.collection-item {
    background: rgba(0,0,0,0.5);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.collection-item img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}
