/* Wedding Game Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Courier New", monospace;
    background: #ffffff;
    color: #000000;
    overflow: hidden;
    height: 100vh;
    touch-action: none;
}

.game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

.game-header {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 100;
}

.game-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.game-header p {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.back-btn {
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.back-btn:hover {
    background: #333333;
}

.game-area {
    width: 100vw;
    height: 100vh;
    position: relative;
    background: #000000 url('background.jpg') center center / cover no-repeat;
    touch-action: none;
}

/* Mobile controls */
.mobile-controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    pointer-events: none; /* allow only buttons to capture */
}

.mobile-controls .dpad {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.mobile-controls .middle-row {
    display: flex;
    gap: 60px;
}

.mobile-controls .ctrl {
    pointer-events: auto;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid #000000;
    background: rgba(255,255,255,0.8);
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    -webkit-user-select: none;
    user-select: none;
}

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

.player, .enemy {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #000000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s ease;
}

.player img, .enemy img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player {
    top: 50%;
    left: 100px;
    transform: translateY(-50%);
    z-index: 10;
}

.enemy {
    top: 50%;
    right: 100px;
    transform: translateY(-50%);
    z-index: 10;
}

/* Victory Screen */
.victory-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.victory-screen.show {
    display: flex;
}

.scrolling-text {
    font-size: 4rem;
    font-weight: bold;
    color: #000000;
    white-space: nowrap;
    animation: scroll-text 3s linear infinite;
    margin-bottom: 50px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes scroll-text {
    0% {
        transform: translateX(100vw);
    }
    100% {
        transform: translateX(-100%);
    }
}

.game-explosions {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.game-explosion {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #000000;
    animation: game-explosion-anim 2s ease-out forwards;
    box-shadow: 0 0 30px #000000, 0 0 60px #000000, 0 0 90px #000000;
}

@keyframes game-explosion-anim {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
        box-shadow: 0 0 30px #000000, 0 0 60px #000000, 0 0 90px #000000;
    }
    25% {
        transform: scale(5) rotate(90deg);
        opacity: 1;
        box-shadow: 0 0 60px #000000, 0 0 120px #000000, 0 0 180px #000000;
    }
    50% {
        transform: scale(15) rotate(180deg);
        opacity: 0.8;
        box-shadow: 0 0 120px #000000, 0 0 240px #000000, 0 0 360px #000000;
    }
    75% {
        transform: scale(25) rotate(270deg);
        opacity: 0.4;
    }
    100% {
        transform: scale(40) rotate(360deg);
        opacity: 0;
        box-shadow: 0 0 400px #000000;
    }
}

.play-again-btn {
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 50px;
    transition: background 0.3s ease;
}

.play-again-btn:hover {
    background: #333333;
}

/* Collision effect */
.collision-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    opacity: 0;
    pointer-events: none;
    z-index: 500;
    animation: flash-effect 0.5s ease-out;
}

@keyframes flash-effect {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.8; }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .game-header {
        top: 10px;
    }
    .game-header h1 {
        font-size: 1.4rem;
        margin-bottom: 6px;
    }
    .game-header p {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    .back-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
        border-radius: 4px;
    }
}