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

body {
    background: #0a0a1a;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#gameCanvas {
    display: block;
}

.back-link {
    position: fixed;
    top: 12px;
    left: 12px;
    color: #aaa;
    text-decoration: none;
    font-size: 14px;
    z-index: 100;
    padding: 4px 10px;
    background: rgba(0,0,0,0.5);
    border-radius: 6px;
    transition: color 0.2s;
}

.back-link:hover {
    color: #fff;
}

#hud {
    position: fixed;
    top: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 60px;
    z-index: 50;
    pointer-events: none;
}

#hud-level {
    color: #d4a574;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

#hud-bones {
    color: #f5e6c8;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

#hud-best {
    color: #ffcc00;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

#timer-bar {
    position: fixed;
    top: 44px;
    left: 60px;
    right: 60px;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    z-index: 50;
    overflow: hidden;
}

#timer-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #00ff88, #00d4ff);
    border-radius: 3px;
    transition: width 0.1s linear;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 80;
    background: rgba(10,10,26,0.7);
}

#overlay.hidden {
    display: none;
}

#overlay-content {
    text-align: center;
    color: white;
}

#overlay-title {
    font-size: 2.8rem;
    background: linear-gradient(90deg, #d4a574, #f5e6c8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

#overlay-subtitle {
    font-size: 1.1rem;
    color: #aaa;
    margin-bottom: 30px;
}

#overlay-btn {
    padding: 14px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    background: linear-gradient(90deg, #d4a574, #c4956a);
    color: #1a1a2e;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

#overlay-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(212,165,116,0.4);
}
