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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: manipulation;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.swipe-guard {
    position: fixed;
    top: 0; left: 0;
    width: 30px;
    height: 100%;
    z-index: 9999;
}

body {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #87ceeb 0%, #7ec850 40%, #5da832 100%);
    min-height: 100%;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(5px);
    z-index: 100;
}

.back-btn, .fullscreen-btn {
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    min-width: 48px;
    min-height: 48px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

h1 {
    font-size: 24px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    text-align: center;
    flex: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.score {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    background: rgba(0,0,0,0.15);
    padding: 4px 12px;
    border-radius: 20px;
    min-width: 40px;
    text-align: center;
}

.jar {
    flex-shrink: 0;
    margin: 8px 12px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.35);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    border: 3px solid rgba(255,255,255,0.6);
    min-height: 56px;
}

.jar-label {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    margin-bottom: 4px;
}

.jar-bugs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 28px;
    line-height: 1;
}

.jar-bug {
    animation: jarBounce 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.field {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.bug {
    position: absolute;
    font-size: 48px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s ease;
    filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.3));
    z-index: 10;
}

.bug:active {
    transform: scale(0.85);
}

.bug.caught {
    animation: bugCaught 0.4s ease forwards;
    pointer-events: none;
}

@keyframes bugCaught {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(0); opacity: 0; }
}

.got-it {
    position: absolute;
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
    animation: gotItFloat 0.8s ease-out forwards;
    pointer-events: none;
    z-index: 200;
}

@keyframes gotItFloat {
    0% { transform: translateY(0) scale(0.5); opacity: 1; }
    50% { transform: translateY(-30px) scale(1.2); opacity: 1; }
    100% { transform: translateY(-60px) scale(1); opacity: 0; }
}

/* Grass decorations */
.grass {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(0deg, #4a8c28 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* Flowers */
.flower {
    position: absolute;
    font-size: 24px;
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}