/* General Setup */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    font-family: 'Fredoka', 'Noto Color Emoji', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

/* Background Stars Effect */
.background-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
 radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
 radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
 radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0,0,0,0)),
 radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
 radial-gradient(2px 2px at 130px 80px, #fff, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.3;
    animation: twinkle 5s infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes twinkle {
    0% { opacity: 0.3; }
    50% { opacity: 0.5; }
    100% { opacity: 0.3; }
}

/* UI Container */
.ui-container {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 600px;
    height: 90vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-align: center;
}

h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

.stat-box {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.label {
    font-size: 0.8rem;
    opacity: 0.8;
}

.value {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Game Area */
#game-area {
    position: relative;
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

/* Overlays (Start/Game Over) */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 20px;
}

.hidden {
    display: none !important;
}

/* Modal */
.modal {
    background: white;
    color: #333;
    padding: 2rem;
    border-radius: 25px;
    text-align: center;
    max-width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal h2 {
    color: #764ba2;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.modal p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn-primary {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    font-weight: 600;
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

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

    .difficulty-buttons {
 display: flex;
 flex-direction: column;
 gap: 10px;
 width: 100%;
    }

    .btn-easy {
 background: linear-gradient(to right, #56ab2f, #a8e063);
    }

    .btn-medium {
 background: linear-gradient(to right, #f7971e, #ffd200);
    }

    .btn-hard {
 background: linear-gradient(to right, #ff416c, #ff4b2b);
    }

.difficulty-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-easy {
    background: linear-gradient(to right, #56ab2f, #a8e063);
}

.btn-medium {
    background: linear-gradient(to right, #f7971e, #ffd200);
}

.btn-hard {
    background: linear-gradient(to right, #ff416c, #ff4b2b);
}

/* Targets (Star & Emojis) */
.target {
    position: absolute;
    width: 80px;
    height: 80px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 60px;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
    transition: transform 0.1s;
    animation: popIn 0.2s ease-out;
    z-index: 5;
}

.target:hover {
    transform: scale(1.1);
}

.target:active {
    transform: scale(0.9);
}

/* Star SVG styling */
#star {
    color: #ffd700;
}

/* Big Score Display */
.big-score {
    font-size: 4rem;
    font-weight: bold;
    color: #764ba2;
    margin: 1rem 0;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}
