* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fredoka', cursive;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.03) 10px,
        rgba(255, 255, 255, 0.03) 20px
    );
    animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 90%;
    position: relative;
    z-index: 1;
}

.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-header h1 {
    font-family: 'Bungee', cursive;
    font-size: 3.5rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
}

.stat-item {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    padding: 10px 25px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
}

.stat-label {
    display: block;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.stat-value {
    display: block;
    color: #fff;
    font-size: 2rem;
    font-weight: 600;
    font-family: 'Bungee', cursive;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.game-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 40px auto;
    max-width: 500px;
    perspective: 1000px;
}

.hole {
    width: 140px;
    height: 140px;
    position: relative;
    cursor: crosshair;
}

.hole-bg {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to bottom, #3d2817, #1a0f07);
    border-radius: 50% 50% 0 0;
    box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.mole {
    position: absolute;
    bottom: -100%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 80%;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    border-radius: 50% 50% 40% 40%;
    transition: bottom 0.3s ease-out;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.mole.up {
    bottom: 20%;
    animation: wiggle 0.5s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% { transform: translateX(-50%) rotate(-3deg); }
    50% { transform: translateX(-50%) rotate(3deg); }
}

.mole::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    width: 20%;
    height: 20%;
    background: #000;
    border-radius: 50%;
    box-shadow: 30px 0 0 #000;
}

.mole::after {
    content: '';
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 30%;
    height: 15%;
    background: #ff6b6b;
    border-radius: 50%;
}

.mole.hit {
    animation: hitAnimation 0.5s ease-out;
    pointer-events: none;
}

@keyframes hitAnimation {
    0% { transform: translateX(-50%) scale(1) rotate(0deg); }
    50% { transform: translateX(-50%) scale(1.2) rotate(180deg); opacity: 0.5; }
    100% { transform: translateX(-50%) scale(0) rotate(360deg); opacity: 0; }
}

.game-controls {
    text-align: center;
    margin-top: 30px;
}

.btn {
    font-family: 'Bungee', cursive;
    font-size: 1.3rem;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-start {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-restart {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(-1px) scale(1.02);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translate(-50%, -60%); opacity: 0; }
    to { transform: translate(-50%, -50%); opacity: 1; }
}

.modal-content h2 {
    font-family: 'Bungee', cursive;
    font-size: 2.5rem;
    color: #f5576c;
    margin-bottom: 20px;
}

.modal-score {
    font-size: 1.8rem;
    font-weight: 600;
    color: #4facfe;
    margin-bottom: 15px;
}

.modal-message {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 25px;
}

.btn-modal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.1rem;
    padding: 12px 30px;
}

.sound-effects {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Bungee', cursive;
    font-size: 3rem;
    pointer-events: none;
    z-index: 999;
}

.sound-effect {
    position: absolute;
    animation: soundPop 0.8s ease-out forwards;
}

@keyframes soundPop {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.5) rotate(180deg);
    }
    100% {
        transform: scale(2) rotate(360deg) translateY(-50px);
        opacity: 0;
    }
}

.score-popup {
    position: absolute;
    font-family: 'Bungee', cursive;
    font-size: 2rem;
    color: #f5576c;
    pointer-events: none;
    z-index: 100;
    animation: scoreFloat 1s ease-out forwards;
}

@keyframes scoreFloat {
    0% {
        transform: translateY(0) scale(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-80px) scale(1);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .game-header h1 {
        font-size: 2.5rem;
    }
    
    .stats {
        gap: 20px;
    }
    
    .stat-item {
        padding: 8px 15px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .hole {
        width: 100px;
        height: 100px;
    }
    
    .game-board {
        gap: 15px;
    }
}
