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

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    background: #000;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
    background: #1a2a32;
}

/* HUD Overlay */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 1000;
}

#player-info {
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 12px 15px;
    border-radius: 0 0 15px 0;
    display: inline-block;
    font-size: 14px;
    pointer-events: none;
    backdrop-filter: blur(5px);
    border-right: 2px solid #ff9900;
    border-bottom: 2px solid #ff9900;
}

#player-info div {
    margin: 3px 0;
}

#action-buttons {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    pointer-events: auto;
}

.action-btn {
    background: rgba(0, 0, 0, 0.85);
    color: white;
    border: 2px solid #ff9900;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s;
    backdrop-filter: blur(5px);
}

.action-btn:hover {
    background: #ff9900;
    color: black;
    transform: scale(1.05);
}

.action-btn:active {
    transform: scale(0.95);
}

/* Interaction Panel */
#interaction-panel, #combat-panel {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 20px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    pointer-events: auto;
    border: 2px solid #ff9900;
    backdrop-filter: blur(10px);
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

#interaction-panel button, #combat-panel button {
    margin: 10px;
    padding: 12px 24px;
    cursor: pointer;
    background: #ff9900;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
}

#interaction-panel button:hover, #combat-panel button:hover {
    background: #ffcc00;
}

#interaction-title {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: bold;
}

#interaction-description {
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.4;
}

#interaction-reward {
    margin-bottom: 15px;
    color: #ff9900;
    font-weight: bold;
    font-size: 16px;
}

#message-area {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #ff9900;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    max-width: 80%;
    text-align: center;
    pointer-events: none;
    z-index: 9000;
    font-weight: bold;
}

/* Inventory Modal */
#inventory-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
}

.inventory-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    border: 2px solid #ff9900;
    box-shadow: 0 0 30px rgba(255, 153, 0, 0.3);
}

.inventory-header {
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-bottom: 1px solid #ff9900;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inventory-header h2 {
    color: #ff9900;
    margin: 0;
    font-size: 24px;
}

.close-inventory {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0 10px;
}

.close-inventory:hover {
    color: #ff9900;
}

.inventory-stats {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 153, 0, 0.3);
}

.stat-card {
    text-align: center;
    padding: 10px;
}

.stat-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #ff9900;
}

.stat-label {
    font-size: 12px;
    color: #aaa;
}

.inventory-items {
    padding: 15px;
}

.inventory-section {
    margin-bottom: 20px;
}

.inventory-section h3 {
    color: #ff9900;
    font-size: 16px;
    margin-bottom: 10px;
    border-left: 3px solid #ff9900;
    padding-left: 10px;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.item-slot {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    transition: all 0.2s;
}

.item-slot:hover {
    border-color: #ff9900;
    transform: scale(1.05);
}

.item-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 5px;
}

.item-name {
    font-size: 10px;
    color: white;
}

.item-empty {
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed #444;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    color: #666;
    font-size: 12px;
}

/* Joystick for Mobile */
#joystick-container {
    position: fixed;
    bottom: 80px;
    left: 20px;
    width: 120px;
    height: 120px;
    pointer-events: auto;
    z-index: 1500;
}

#joystick-base {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    position: relative;
    border: 2px solid #ff9900;
}

#joystick-thumb {
    width: 50px;
    height: 50px;
    background: #ff9900;
    border-radius: 50%;
    position: absolute;
    top: 35px;
    left: 35px;
    cursor: pointer;
}

/* Keyboard Instructions */
#keyboard-instructions {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 10px;
    pointer-events: none;
    white-space: nowrap;
    z-index: 8000;
}

/* Camp Marker Styles */
.camp-marker {
    background: rgba(0, 100, 0, 0.9);
    border: 2px solid #00ff00;
    border-radius: 50%;
    width: 35px !important;
    height: 35px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

.poi-marker {
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid #ff9900;
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
    font-weight: bold;
    color: white;
    transition: all 0.2s;
}

.poi-marker:hover {
    background: #ff9900;
    color: black;
    transform: scale(1.05);
}

.player-marker {
    background: #4caf50;
    border: 2px solid white;
    border-radius: 50%;
    width: 30px !important;
    height: 30px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* Health Label Above Player */
.health-label {
    background: transparent !important;
    border: none !important;
}

/* Projectile Animation - Red */
.projectile {
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #ff3333, #cc0000);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 0 8px #ff0000;
    animation: projectile-glow 0.12s ease-out forwards;
}

@keyframes projectile-glow {
    0% {
        transform: scale(1);
        opacity: 1;
        background: radial-gradient(circle, #ff4444, #ff0000);
    }
    100% {
        transform: scale(0.2);
        opacity: 0;
        background: radial-gradient(circle, #ff0000, #990000);
    }
}

/* Radius Circle */
.camp-radius {
    border: 2px solid #00ff00;
    border-radius: 50%;
    background: rgba(0, 255, 0, 0.08);
    pointer-events: none;
}

.player-radius {
    border: 1px solid #ff9900;
    border-radius: 50%;
    background: rgba(255, 153, 0, 0.03);
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .action-btn {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    #player-info {
        font-size: 10px;
        padding: 8px 12px;
    }
    
    #joystick-container {
        width: 100px;
        height: 100px;
        bottom: 60px;
    }
    
    #joystick-thumb {
        width: 40px;
        height: 40px;
        top: 30px;
        left: 30px;
    }
    
    #keyboard-instructions {
        font-size: 8px;
        bottom: 5px;
        white-space: normal;
        text-align: center;
        width: 90%;
    }
    
    #interaction-panel, #combat-panel {
        padding: 15px;
        width: 95%;
    }
    
    .inventory-container {
        width: 95%;
        max-height: 85vh;
    }
    
    .stat-value {
        font-size: 16px;
    }
}
    #move-to-btn {
    background: #4caf50;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
}

#move-to-btn:hover {
    background: #45a049;
}
/* Camp Circle - More Transparent */
.camp-radius {
    opacity: 0.6;
}

/* Tower Marker */
.tower-marker {
    background: rgba(100, 100, 200, 0.9);
    border: 2px solid #00ccff;
    border-radius: 10px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 200, 255, 0.5);
}

.tower-marker:hover {
    transform: scale(1.05);
    background: rgba(0, 150, 200, 0.9);
}

/* Tower Projectile */
.tower-projectile {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #00ccff, #0088aa);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 0 6px #00ccff;
    animation: tower-shot 0.1s ease-out forwards;
}

@keyframes tower-shot {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.3);
        opacity: 0;
    }
}