* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow: hidden;
    background: #000;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    cursor: none;
}

#gameCanvas {
    display: block;
    width: 100vw;
    height: 100vh;
}

/* Crosshair */
#crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 24px;
    font-weight: 100;
    pointer-events: none;
    z-index: 100;
    text-shadow: 0 0 2px rgba(0,0,0,0.8);
    opacity: 0.8;
    mix-blend-mode: difference;
}

/* Hotbar */
#hotbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hotbar-slot {
    width: 52px;
    height: 52px;
    background: rgba(80, 80, 80, 0.5);
    border: 2px solid rgba(100, 100, 100, 0.6);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.15s ease;
}

.hotbar-slot.selected {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.3), inset 0 0 8px rgba(255, 255, 255, 0.1);
    transform: scale(1.08);
}

.slot-number {
    position: absolute;
    bottom: 2px;
    right: 4px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
    font-weight: 600;
}

.block-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    image-rendering: pixelated;
}

.grass-icon {
    background: linear-gradient(to bottom, #4a8c2a 0%, #4a8c2a 30%, #8B6914 30%, #8B6914 100%);
}

.dirt-icon {
    background: #8B6914;
}

.stone-icon {
    background: linear-gradient(135deg, #888 0%, #777 50%, #999 100%);
}

.wood-icon {
    background: linear-gradient(0deg, #6B4226 0%, #8B5A2B 50%, #6B4226 100%);
}

.leaf-icon {
    background: #2d7a2d;
}

.sand-icon {
    background: #d4c472;
}

.water-icon {
    background: rgba(30, 100, 200, 0.7);
}

/* Start Screen */
#startScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
}

.start-content {
    text-align: center;
    color: #fff;
}

.start-content h1 {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: 4px;
    margin-bottom: 16px;
    text-shadow: 0 0 40px rgba(100, 200, 100, 0.5), 0 4px 12px rgba(0,0,0,0.5);
    background: linear-gradient(135deg, #6fcf6f, #4a8c2a, #8bd48b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.start-content > p {
    font-size: 18px;
    opacity: 0.7;
    margin-bottom: 32px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.controls-info {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px 32px;
    display: inline-block;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.controls-info p {
    font-size: 14px;
    margin: 6px 0;
    color: rgba(255, 255, 255, 0.8);
}

.controls-info strong {
    color: #8bd48b;
    display: inline-block;
    min-width: 80px;
}

/* Debug Info */
#debugInfo {
    position: fixed;
    top: 10px;
    left: 10px;
    color: #fff;
    font-size: 12px;
    font-family: 'Consolas', monospace;
    z-index: 100;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    opacity: 0.7;
    line-height: 1.6;
}
