/* CSS Variables */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --card-bg: rgba(255, 255, 255, 0.05);
  --border-color: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --border-radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.2);
  --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #0A0A23;
    color: #FFFFFF;
    margin: 0;
    min-height: 100vh;
    user-select: none;
}

/* Difficulty Selection Screen */
.difficulty-selection {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 70px);
    padding: 20px;
}

.difficulty-container {
    text-align: center;
    max-width: 800px;
    width: 100%;
}

.difficulty-container h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #FFFFFF;
}

.difficulty-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.difficulty-btn {
    background: linear-gradient(135deg, #003566, #001D3D);
    border: 2px solid #00B4DB;
    border-radius: 15px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #FFFFFF;
    text-align: center;
}

.difficulty-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 180, 219, 0.3);
    border-color: #4CAF50;
}

.difficulty-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.difficulty-btn h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #00B4DB;
}

.difficulty-btn p {
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.4;
}

/* Game Main */
.game-main {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Game Info */
.game-info {
    margin-bottom: 30px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    background: linear-gradient(135deg, #003566, #001D3D);
    border: 2px solid #00B4DB;
    border-radius: 10px;
    padding: 15px 20px;
    min-width: 100px;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #00B4DB;
}

/* Game Board */
.game-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 20px;
    background: linear-gradient(135deg, #003566, #001D3D);
    border-radius: 20px;
    border: 3px solid #00B4DB;
}

/* Holes */
.hole {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, #001D3D 30%, #000814 70%);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    border: 3px solid #003566;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hole:hover {
    border-color: #00B4DB;
    transform: scale(1.05);
}

.hole.hit {
    animation: holeHit 0.3s ease-in-out;
}

@keyframes holeHit {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); border-color: #4CAF50; }
}

/* Moles */
.mole {
    position: absolute;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #8B4513, #A0522D);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    transition: bottom 0.3s ease-in-out;
    cursor: pointer;
    border: 3px solid #654321;
}

.mole.up {
    bottom: 10px;
    animation: moleWiggle 0.5s ease-in-out infinite alternate;
}

.mole.whacked {
    animation: moleWhacked 0.5s ease-in-out;
    bottom: -80px !important;
}

@keyframes moleWiggle {
    0% { transform: translateX(-50%) rotate(-2deg); }
    100% { transform: translateX(-50%) rotate(2deg); }
}

@keyframes moleWhacked {
    0% { transform: translateX(-50%) scale(1) rotate(0deg); }
    50% { transform: translateX(-50%) scale(1.2) rotate(10deg); }
    100% { transform: translateX(-50%) scale(0.8) rotate(-5deg); }
}

/* Special Moles */
.mole.golden {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-color: #FF8C00;
    animation: goldenGlow 1s ease-in-out infinite alternate;
}

@keyframes goldenGlow {
    0% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
    100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8); }
}

.mole.bomb {
    background: linear-gradient(135deg, #FF4444, #CC0000);
    border-color: #990000;
}

.mole.bomb::before {
    content: '💣';
    position: absolute;
    font-size: 2rem;
}

/* Game Controls */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.control-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Modals */
.game-over-modal, .pause-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 35, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: linear-gradient(135deg, #003566, #001D3D);
    border: 2px solid #00B4DB;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #4CAF50;
}

.final-stats {
    margin: 20px 0;
}

.final-stats p {
    font-size: 1.1rem;
    margin: 8px 0;
    color: #00B4DB;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.modal-buttons button {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Score Popup */
.score-popup {
    position: absolute;
    font-size: 2rem;
    font-weight: bold;
    pointer-events: none;
    z-index: 100;
    animation: scorePopup 1s ease-out forwards;
}

.score-popup.positive {
    color: #4CAF50;
}

.score-popup.negative {
    color: #FF6B6B;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .game-board {
        gap: 15px;
        padding: 15px;
        max-width: 400px;
    }
    
    .hole {
        width: 90px;
        height: 90px;
    }
    
    .mole {
        width: 60px;
        height: 60px;
        font-size: 2rem;
        bottom: -60px;
    }
    
    .mole.up {
        bottom: 8px;
    }
    
    .stats {
        gap: 15px;
    }
    
    .stat {
        padding: 12px 15px;
        min-width: 80px;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
    
    .difficulty-container h2 {
        font-size: 2rem;
    }
    
    .difficulty-buttons {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .game-board {
        gap: 10px;
        padding: 10px;
        max-width: 320px;
    }
    
    .hole {
        width: 70px;
        height: 70px;
    }
    
    .mole {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        bottom: -50px;
    }
    
    .mole.up {
        bottom: 5px;
    }
}/*
 Mobile optimizations */
@media (max-width: 768px) {
  .hole {
    width: 80px !important;
    height: 80px !important;
    touch-action: manipulation;
  }
  
  .mole {
    font-size: 2rem !important;
  }
  
  .difficulty-btn {
    padding: 15px 20px !important;
    touch-action: manipulation;
  }
  
  .control-btn {
    padding: 12px 20px !important;
    font-size: 1rem !important;
    touch-action: manipulation;
  }
}

/* Touch feedback */
.hole:active {
  transform: scale(0.9);
  transition: transform 0.1s ease;
}

.difficulty-btn:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

.control-btn:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}