/* Magic Quest Game Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    overflow: hidden;
    background-color: #2C3E50;
}

.game-container {
    position: relative;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #2C3E50 0%, #1B2631 100%);
    overflow: hidden;
}

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

.game-ui {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: flex;
    gap: 15px;
}

.mana, .health, .score {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.mana {
    border: 2px solid #3498DB; /* Blue for mana */
}

.health {
    border: 2px solid #2ECC71; /* Green for health */
}

.score {
    border: 2px solid #F1C40F; /* Yellow for score */
}

.spell-bar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 2;
}

.spell-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid white;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.spell-btn:hover, .spell-btn.active {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
}

#fireSpell {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(231, 76, 60, 0.3) 100%);
    border-color: #E74C3C;
}

#iceSpell {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(52, 152, 219, 0.3) 100%);
    border-color: #3498DB;
}

#lightningSpell {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(241, 196, 15, 0.3) 100%);
    border-color: #F1C40F;
}

#healSpell {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(46, 204, 113, 0.3) 100%);
    border-color: #2ECC71;
}

.mobile-controls {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 2;
}

.direction-pad {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.direction-pad .middle-row {
    display: flex;
    gap: 50px;
    margin: 5px 0;
}

.direction-pad button, #actionBtn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.direction-pad button:active, #actionBtn:active {
    background: rgba(255, 255, 255, 0.4);
}

#actionBtn {
    background: linear-gradient(135deg, #9B59B6 0%, #8E44AD 100%);
    width: 80px;
    height: 80px;
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.5);
}

.game-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    color: white;
    text-align: center;
}

.game-message h2 {
    font-size: 48px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #3498DB 0%, #9B59B6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
}

.game-message p {
    font-size: 20px;
    margin-bottom: 40px;
    max-width: 80%;
    line-height: 1.5;
}

#startBtn {
    background: linear-gradient(135deg, #3498DB 0%, #9B59B6 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.5);
    transition: all 0.3s ease;
}

#startBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.7);
}

#startBtn:active {
    transform: translateY(1px);
}

/* Hide mobile controls on desktop */
@media (min-width: 769px) {
    .mobile-controls {
        display: none;
    }
    
    .spell-bar {
        bottom: 40px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .game-ui {
        flex-direction: column;
        gap: 5px;
    }
    
    .mana, .health, .score {
        font-size: 14px;
        padding: 5px 10px;
    }
    
    .spell-bar {
        display: none; /* Hide spell bar on mobile, use action button instead */
    }
    
    .game-message h2 {
        font-size: 36px;
    }
    
    .game-message p {
        font-size: 16px;
    }
    
    #startBtn {
        padding: 12px 30px;
        font-size: 16px;
    }
}

/* Special effects */
.magic-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 3;
    animation: fadeParticle 2s forwards;
}

@keyframes fadeParticle {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

/* Combat text animation */
.combat-text {
    position: absolute;
    font-size: 20px;
    font-weight: bold;
    z-index: 3;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: floatText 1.5s forwards;
}

@keyframes floatText {
    0% {
        opacity: 0;
        transform: translateY(0);
    }
    10% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-50px);
    }
}

/* Spell effects */
.fire-effect {
    color: #E74C3C;
}

.ice-effect {
    color: #3498DB;
}

.lightning-effect {
    color: #F1C40F;
}

.heal-effect {
    color: #2ECC71;
}

/* Cursor styles for desktop */
@media (min-width: 769px) {
    canvas {
        cursor: none; /* Hide default cursor on the canvas */
    }
    
    .custom-cursor {
        position: absolute;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        pointer-events: none;
        z-index: 3;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        transform: translate(-50%, -50%);
    }
    
    .cursor-fire {
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="%23E74C3C" d="M12 0c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm3 8c1.657 0 3 1.343 3 3s-1.343 3-3 3-3-1.343-3-3 1.343-3 3-3z"/></svg>');
    }
    
    .cursor-ice {
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="%233498DB" d="M12 0c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm3 8c1.657 0 3 1.343 3 3s-1.343 3-3 3-3-1.343-3-3 1.343-3 3-3z"/></svg>');
    }
    
    .cursor-lightning {
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="%23F1C40F" d="M12 0c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm3 8c1.657 0 3 1.343 3 3s-1.343 3-3 3-3-1.343-3-3 1.343-3 3-3z"/></svg>');
    }
    
    .cursor-heal {
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="%232ECC71" d="M12 0c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm3 8c1.657 0 3 1.343 3 3s-1.343 3-3 3-3-1.343-3-3 1.343-3 3-3z"/></svg>');
    }
} 