body {
    margin: 0;
    padding: 0;
    background: #0a0a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

#game-wrapper {
    position: relative;
    width: 800px;
    height: 480px;
    border: 3px solid #c9a227;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(201, 162, 39, 0.3);
}

canvas {
    display: block;
    background: #1a1a2e;
    border-radius: 5px;
}

#ui-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    color: #c9a227;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    pointer-events: none;
    z-index: 10;
}

#title-screen, #game-over-screen, #win-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(10, 10, 26, 0.95);
    color: #e0e0e0;
    z-index: 20;
    border-radius: 5px;
}

#title-screen h1 {
    font-size: 2.5rem;
    color: #c9a227;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(201, 162, 39, 0.5);
}

#shop-screen {
    background: rgba(10, 10, 26, 0.95);
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#shop-screen h2 {
    color: #c9a227;
    margin-bottom: 10px;
}

#shop-currency {
    font-size: 1.2rem;
    color: #c9a227;
    margin-bottom: 20px;
}

#shop-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    max-width: 600px;
    margin-bottom: 20px;
}

.shop-item {
    background: linear-gradient(135deg, #1a1a3e, #0f0f2e);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    width: 150px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shop-item:hover {
    border-color: var(--accent-gold);
    transform: translateY(-3px);
}

.shop-item.owned {
    border-color: var(--accent-green);
    opacity: 0.7;
}

.shop-item .item-icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.shop-item .item-name {
    font-weight: bold;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.shop-item .item-desc {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin: 5px 0;
}

.shop-item .item-cost {
    color: var(--accent-gold);
    font-weight: bold;
    font-size: 0.85rem;
}

.shop-item.cant-afford {
    opacity: 0.4;
    cursor: not-allowed;
}

#game-over-screen h1 { color: #8b2635; }
#win-screen h1 { color: #c9a227; }

button {
    margin-top: 20px;
    padding: 12px 32px;
    font-size: 1rem;
    background: transparent;
    border: 2px solid #c9a227;
    color: #c9a227;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

button:hover {
    background: #c9a227;
    color: #0a0a1a;
}

.hidden {
    display: none !important;
}

p {
    margin: 5px 0;
    color: #8888aa;
}