/* Kill the Raven Game Styles */
/* Separated from main style.css for better organization */

/* Game UI Styles */
.kill-counter {
    position: fixed;
    top: 50px;
    left: 30px; /* Moved to left side */
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    z-index: 1001;
    border: 2px solid #dc2626;
    text-align: center;
    min-width: 150px;
}

.coin-counter {
    position: fixed;
    top: 50px;
    left: 210px; /* Next to kill counter */
    background: rgba(0, 0, 0, 0.8);
    color: #ffd700;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    z-index: 1001;
    border: 2px solid #ffd700;
    text-align: center;
    min-width: 120px;
}

.wave-counter {
    position: fixed;
    top: 110px;
    left: 30px; /* Under kill counter */
    background: rgba(0, 0, 0, 0.8);
    color: #4ade80;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    z-index: 1001;
    border: 2px solid #4ade80;
    text-align: center;
    min-width: 150px;
}

.lives-counter {
    position: fixed;
    top: 110px;
    left: 210px; /* Next to wave counter */
    background: rgba(0, 0, 0, 0.8);
    color: #ff6b6b;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    z-index: 1001;
    border: 2px solid #ff6b6b;
    text-align: center;
    min-width: 120px;
}

/* Kill Feedback Animation */
.kill-feedback {
    position: absolute;
    color: #dc2626;
    font-size: 24px;
    font-weight: bold;
    pointer-events: none;
    z-index: 1002;
    animation: killFeedback 0.5s ease-out forwards;
}

@keyframes killFeedback {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-30px) scale(1.5);
        opacity: 0;
    }
}

/* Coin Collection Animation */
.coin-feedback {
    position: absolute;
    color: #ffd700;
    font-size: 20px;
    font-weight: bold;
    pointer-events: none;
    z-index: 1002;
    animation: coinFeedback 0.8s ease-out forwards;
}

@keyframes coinFeedback {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-50px) scale(1.3);
        opacity: 0;
    }
}

/* Upgrade Shop */
.upgrade-shop {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid #dc2626;
    border-radius: 20px;
    padding: 30px;
    z-index: 2000;
    min-width: 400px;
    max-width: 600px;
    color: white;
    text-align: center;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.5);
}

.upgrade-shop h2 {
    color: #dc2626;
    font-size: 2rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.shop-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.shop-item {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.shop-item:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
    transform: scale(1.05);
}

.shop-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.shop-item.disabled:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1);
}

.shop-item-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.shop-item-name {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.shop-item-desc {
    color: #ccc;
    font-size: 12px;
    margin-bottom: 10px;
}

.shop-item-price {
    color: #FFD700;
    font-size: 18px;
    font-weight: bold;
}

.shop-continue-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shop-continue-btn:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    transform: scale(1.02);
}

/* Keep old upgrade-grid for compatibility */
.upgrade-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.upgrade-item {
    background: rgba(220, 38, 38, 0.1);
    border: 2px solid #dc2626;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upgrade-item:hover {
    background: rgba(220, 38, 38, 0.3);
    transform: scale(1.05);
}

.upgrade-item h3 {
    color: #ffd700;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.upgrade-description {
    font-size: 0.9rem;
    color: #e0e0e0;
    margin-bottom: 8px;
}

.upgrade-cost {
    color: #ffd700;
    font-weight: bold;
    font-size: 1.1rem;
}

.continue-button {
    background: #dc2626;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.continue-button:hover {
    background: #b91c1c;
    transform: scale(1.05);
}

/* Mega Raven Boss */
.mega-raven {
    position: absolute;
    width: 80px;
    height: 40px;
    top: 30%;
    left: -150px;
    animation: megaFly 15s linear infinite;
    cursor: crosshair !important;
    z-index: 200;
    pointer-events: auto;
    user-select: none;
}

.mega-raven-body {
    width: 100%;
    height: 100%;
    position: relative;
    background: transparent;
    padding: 20px;
    margin: -20px;
    cursor: crosshair !important;
}

/* Mega Raven uses larger wings */
.mega-raven-body::before {
    content: '';
    position: absolute;
    width: 35px;
    height: 8px;
    background: #000;
    border-radius: 80% 40% 60% 100%;
    left: 10px;
    top: 25px;
    transform: rotate(-5deg);
    animation: leftWing 0.4s ease-in-out infinite alternate;
}

.mega-raven-body::after {
    content: '';
    position: absolute;
    width: 35px;
    height: 8px;
    background: #000;
    border-radius: 40% 80% 100% 60%;
    left: 10px;
    top: 27px;
    transform: rotate(5deg);
    animation: rightWing 0.4s ease-in-out infinite alternate;
}

.mega-raven.dying {
    animation: megaRavenDeath 1s ease-out forwards;
}

@keyframes megaRavenDeath {
    0% {
        transform: translateY(-50%) rotate(0deg) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-50%) rotate(180deg) scale(1.2);
        filter: hue-rotate(0deg) saturate(0) brightness(2);
    }
    100% {
        transform: translateY(200%) rotate(360deg) scale(0);
        opacity: 0;
    }
}

@keyframes megaFly {
    0% {
        left: -200px;
    }
    100% {
        left: 110%;
    }
}

@keyframes leftWing {
    0% {
        transform: rotateZ(-10deg) rotateX(0deg);
    }
    100% {
        transform: rotateZ(-30deg) rotateX(-15deg);
    }
}

@keyframes rightWing {
    0% {
        transform: rotateZ(10deg) rotateX(0deg);
    }
    100% {
        transform: rotateZ(30deg) rotateX(-15deg);
    }
}

/* Health Bar for Mega Raven */
.health-bar-container {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.health-bar {
    width: 100%;
    height: 100%;
    background: #22c55e;
    transition: width 0.3s ease, background 0.3s ease;
}

.boss-health-bar {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 30px;
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid #dc2626;
    border-radius: 15px;
    overflow: hidden;
    z-index: 1001;
}

.boss-health-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc2626, #ff0000);
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.boss-health-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    animation: healthShine 2s linear infinite;
}

@keyframes healthShine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.boss-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 1;
}

/* Game Over Screen */
.game-over-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.game-over-content {
    text-align: center;
    color: white;
}

.game-over-content h2 {
    font-size: 4rem;
    color: #dc2626;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 3px;
    animation: gameOverPulse 1s ease-in-out infinite;
}

@keyframes gameOverPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.game-over-content .final-score {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.game-over-content button {
    background: #dc2626;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.3rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.game-over-content button:hover {
    background: #b91c1c;
}