:root {
    --primary-pink: #ff69b4;
    --dark-purple: #2d0a4e;
    --glow-pink: rgba(255, 105, 180, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#ui-layer > * {
    pointer-events: auto;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    overflow: hidden;
}

.bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    transform: translate(-50%, -50%);
    opacity: 0.5;
    object-fit: cover;
}

.start-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    text-align: center;
    padding: 20px;
}

.hidden {
    display: none !important;
}

.game-title {
    font-size: 3rem;
    color: var(--primary-pink);
    text-shadow: 0 0 20px var(--glow-pink);
    margin-bottom: 0.5rem;
}

.game-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    letter-spacing: 4px;
}

.start-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.primary-btn {
    padding: 15px 40px;
    font-size: 1.5rem;
    background: var(--primary-pink);
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 15px var(--glow-pink);
    transition: transform 0.2s;
}

.primary-btn:active {
    transform: scale(0.9);
}

.secondary-btn {
    padding: 10px 25px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--primary-pink);
    border-radius: 30px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.lang-selector {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    margin-bottom: 20px;
}

.instructions-text {
    max-width: 400px;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #ffd1dc;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 15px;
    border: 1px solid rgba(255, 105, 180, 0.3);
}

.lang-selector .secondary-btn.active {
    background: var(--primary-pink);
    box-shadow: 0 0 15px var(--glow-pink);
}

.secondary-btn:active {
    transform: scale(0.95);
    background: rgba(255, 105, 180, 0.3);
}

.stats-top {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 1.2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hud-btns {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}

.music-btn.muted {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff4444;
}

/* Mobile Controls */
#mobile-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 240px;
    pointer-events: none;
    z-index: 100;
}

#movement-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

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

.move-btn {
    width: 64px;
    height: 64px;
    border-radius: 15px;
    background: rgba(255, 105, 180, 0.3);
    border: 2px solid var(--primary-pink);
    color: white;
    font-size: 1.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.1s, background 0.1s;
    outline: none;
}

.move-btn:active {
    background: var(--primary-pink);
    transform: scale(0.9);
}

#action-controls {
    position: absolute;
    bottom: 40px;
    right: 30px;
    pointer-events: auto;
}

.shoot-btn {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 20, 147, 0.4);
    border: 3px solid rgba(255, 105, 180, 0.8);
    color: white;
    font-weight: bold;
    font-size: 1.4rem;
    box-shadow: 0 0 30px rgba(255, 20, 147, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.1s, background 0.1s;
    outline: none;
}

.shoot-btn:active {
    background: rgba(255, 20, 147, 0.8);
    transform: scale(0.92);
}

/* Brand Logo Link */
.brand-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    pointer-events: auto;
}

.logo-link, .insta-link {
    display: block;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 20;
    width: fit-content;
    pointer-events: auto;
}

.logo-link:hover, .insta-link:hover {
    transform: scale(1.1);
}

.logo-img {
    width: 80px;
    height: auto;
    filter: drop-shadow(0 0 10px var(--glow-pink));
}

.insta-img {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 5px rgba(255, 105, 180, 0.5));
}

.powerup-text {
    color: #00ffff;
    font-weight: bold;
    text-shadow: 0 0 10px #00ffff;
    font-size: 1.4rem;
    margin-top: 5px;
    animation: blink 0.5s infinite alternate;
}

@keyframes blink {
    from { opacity: 1; }
    to { opacity: 0.4; }
}

/* On mobile, make it slightly smaller to not crowd the HUD */
@media (max-width: 600px) {
    .logo-img {
        width: 60px;
    }
    .insta-img {
        width: 28px;
        height: 28px;
    }
}

/* Ensure controls are hidden on non-touch devices regardless of screen size */
body:not(.is-touch-device) #mobile-controls {
    display: none !important;
}