* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    position: fixed;
}

#canvas-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

#hud-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.hud-header {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    pointer-events: auto;
}

.hud-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hud-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
}

.hud-title {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: #f1f5f9;
}

.hud-stats {
    font-size: 11px;
    color: #94a3b8;
    font-family: monospace;
}

.hud-controls-top {
    position: absolute;
    top: 72px;
    right: 16px;
    display: flex;
    gap: 8px;
    pointer-events: auto;
}

.hud-btn {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s;
}

.hud-btn:active {
    transform: scale(0.95);
    background: rgba(51, 65, 85, 0.95);
}

.hud-btn-action {
    background: #0284c7;
    border-color: #38bdf8;
    color: #fff;
}

/* Joystick Area */
#joystick-zone {
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 130px;
    height: 130px;
    pointer-events: auto;
    touch-action: none;
}

#joystick-base {
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    position: relative;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

#joystick-thumb {
    width: 50px;
    height: 50px;
    background: rgba(56, 189, 248, 0.8);
    border: 2px solid #bae6fd;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
    pointer-events: none;
}

/* Action Zone */
#action-zone {
    position: absolute;
    bottom: 35px;
    right: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: auto;
}

.action-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    border: 2px solid #38bdf8;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
    touch-action: manipulation;
}

.action-btn-dive {
    background: linear-gradient(135deg, #0d9488, #115e59);
    border-color: #2dd4bf;
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
}

.action-btn:active {
    transform: scale(0.92);
    filter: brightness(0.9);
}

.water-hint {
    position: absolute;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(14, 116, 144, 0.85);
    border: 1px solid #38bdf8;
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
