body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Arial', sans-serif;
    cursor: default;
    background: #000;
    user-select: none;
}

body.near-beer {
    cursor: pointer;
}

body.grabbing {
    cursor: grabbing;
}

body.holding {
    cursor: move;
}

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

#beerMeter {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
    color: white;
    padding: 15px 20px;
    border-radius: 15px;
    font-size: 18px;
    border: 2px solid rgba(255, 193, 7, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7),
                inset 0 0 20px rgba(255, 193, 7, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 15px;
}

.meter-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 5px rgba(255, 193, 7, 0.5));
}

.meter-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.meter-label {
    font-size: 12px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#beerAmount {
    font-weight: bold;
    color: #ffc107;
    font-size: 24px;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
    transition: all 0.3s ease;
}

#beerAmount.empty {
    color: #ff4444;
    animation: emptyPulse 0.5s ease;
}

@keyframes emptyPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

#instructions {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
    color: white;
    padding: 15px 30px;
    border-radius: 30px;
    text-align: center;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: opacity 0.3s ease;
}

#grabIndicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#grabIndicator.hidden {
    opacity: 0;
}

#grabIndicator span {
    display: block;
    margin-top: 20px;
    font-size: 18px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 20px;
    border-radius: 20px;
    border: 2px solid rgba(255, 193, 7, 0.8);
}

.grab-circle {
    width: 80px;
    height: 80px;
    border: 3px solid rgba(255, 193, 7, 0.8);
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
    animation: grabPulse 1.5s infinite;
}

.grab-circle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: rgba(255, 193, 7, 0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: grabDot 1.5s infinite;
}

#crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 100;
}

#crosshair.hidden {
    display: none;
}

.crosshair-dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; transform: translateX(-50%) scale(0.98); }
    50% { opacity: 1; transform: translateX(-50%) scale(1); }
    100% { opacity: 0.6; transform: translateX(-50%) scale(0.98); }
}

@keyframes grabPulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

@keyframes grabDot {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.3); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Glow effect for beer can when hoverable */
.beer-glow {
    animation: beerGlow 2s infinite;
}

@keyframes beerGlow {
    0% { filter: drop-shadow(0 0 10px rgba(255, 193, 7, 0.3)); }
    50% { filter: drop-shadow(0 0 20px rgba(255, 193, 7, 0.6)); }
    100% { filter: drop-shadow(0 0 10px rgba(255, 193, 7, 0.3)); }
}

/* Mobile-specific styles */
.desktop-instructions {
    display: inline;
}

.mobile-instructions {
    display: none;
}

@media (max-width: 768px) and (hover: none) {
    .desktop-instructions {
        display: none;
    }
    
    .mobile-instructions {
        display: inline;
    }
    
    #instructions {
        font-size: 14px;
        padding: 12px 20px;
        bottom: 10px;
        max-width: 90%;
    }
    
    #beerMeter {
        top: 10px;
        right: 10px;
        padding: 10px 15px;
        font-size: 16px;
    }
    
    .meter-icon {
        font-size: 24px;
    }
    
    #beerAmount {
        font-size: 20px;
    }
    
    #grabIndicator span {
        font-size: 16px;
        padding: 6px 16px;
    }
    
    .grab-circle {
        width: 60px;
        height: 60px;
    }
}

/* Prevent touch scrolling and bouncing on iOS */
html, body {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    -webkit-overflow-scrolling: touch;
}

/* iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
    #container {
        height: 100vh;
        height: -webkit-fill-available;
    }
}