body {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    overflow: hidden;
}

html {
    height: 100%;
}

.game-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.header {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-weight: bold;
}

.theme-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
}

.audio-controls {
    display: flex;
    gap: 10px;
}

.audio-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 1.2em;
    transition: background 0.2s ease;
}

.audio-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.score-info {
    display: flex;
    gap: 30px;
    align-items: center;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
}

.game-area {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.basket {
    position: absolute;
    right: 100px;
    top: 150px;
    width: 120px;
    height: 80px;
}

.basket-rim {
    width: 100%;
    height: 8px;
    background: #ff6b35;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.basket-net {
    width: 80%;
    height: 60px;
    margin: 0 auto;
    background: linear-gradient(to bottom, transparent 0%, #fff 20%, #fff 80%, transparent 100%);
    clip-path: polygon(0% 0%, 100% 0%, 90% 100%, 10% 100%);
    opacity: 0.8;
}

.ball {
    position: absolute;
    width: 40px;
    height: 40px;
    cursor: grab;
    transition: transform 0.1s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.ball:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.trajectory-line {
    position: absolute;
    pointer-events: none;
    z-index: 5;
}

.trajectory-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.stage-complete {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    z-index: 100;
    display: none;
}

.stage-complete h2 {
    color: #4CAF50;
    margin: 0 0 20px 0;
    font-size: 2em;
}

.next-stage-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.next-stage-btn:hover {
    transform: translateY(-2px);
}

.game-complete {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    z-index: 100;
    display: none;
}

.game-complete h2 {
    color: #ff6b35;
    margin: 0 0 20px 0;
    font-size: 2.5em;
}

.restart-btn {
    background: linear-gradient(45deg, #ff6b35, #ff8c42);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.restart-btn:hover {
    transform: translateY(-2px);
}

.power-indicator {
    position: absolute;
    bottom: 50px;
    left: 50px;
    width: 200px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

/* Keyframes untuk simulasi partikel pasir terbang */
@keyframes sand-blow-animation {
    0% {
        transform: translateX(0) scaleY(1); /* Mulai dari posisi diam */
        opacity: 0.8;
    }
    100% {
        /* Pasir terbang jauh dan menghilang (misalnya 30px ke kanan) */
        transform: translateX(30px) scaleY(0.5); 
        opacity: 0;
    }
}


/* Gaya untuk Lapisan Pasir */
.sand-floor {
    /* Posisi di dasar game-area */
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    
    /* Atur tinggi pasir (misalnya, 10% dari tinggi area game) */
    height: 4%; 

    /* Warna Pasir (Pilih salah satu) */
    /* Warna pasir lembut */
    background: #e7c08a; 
    
    /* Atau, gunakan sedikit tekstur gradien untuk tampilan lebih dalam */
    /* background: linear-gradient(to top, #c09f6e 0%, #e7c08a 80%); */
    
    /* Tambahkan bayangan di atasnya agar terlihat seperti ada kedalaman */
    box-shadow: 0 -3px 5px rgba(0, 0, 0, 0.1); 
    
    /* Pastikan pasir berada di bawah bola dan keranjang */
    z-index: 5; 
    
    /* TEKSTUR: menggunakan radial gradient utk butiran */
    background-image:
        radial-gradient(circle at 10% 10%, rgba(0, 0, 0, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 90% 90%, rgba(0, 0, 0, 0.15) 1px, transparent 1px),
        linear-gradient(to top, rgba(0, 0, 0, 0.1) 0%, transparent 100%);

    /*Properti baru utk animasi tertiup angin*/
    transition: transform 0.5s ease-out;
}

/* 1. GANTI Gaya untuk Angin Bertiup ke Kanan (Angin Positif) */
.sand-blow-right {
    /* Geser pasir ke kiri sedikit untuk memberi ilusi pasir terbang ke kanan */
    transform: translateX(-5px); 
}
.sand-blow-right::before {
    /* Aktifkan animasi partikel ke KANAN */
    animation: sand-blow-animation 1s linear infinite; 
    animation-direction: normal; 
}


/* 2. GANTI Gaya untuk Angin Bertiup ke Kiri (Angin Negatif) */
.sand-blow-left {
    /* Geser pasir ke kanan sedikit untuk memberi ilusi pasir terbang ke kiri */
    transform: translateX(5px);
}
.sand-blow-left::before {
    /* Aktifkan animasi partikel ke KIRI */
    animation: sand-blow-animation 1s linear infinite;
    animation-direction: reverse; 
}

/* INI HARUS ADA di styles.css Anda */
.sand-blow-right::before,
.sand-blow-left::before {
    content: '';
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 6;
    
    /* Box-Shadows menciptakan titik-titik (butiran pasir) */
    box-shadow: 
        10px 5px 0 0.5px #d4b584, /* titik 1 */
        20px 8px 0 0.5px #c5a374, /* titik 2 */
        30px 2px 0 0.5px #e7c08a, /* titik 3 */
        40px 10px 0 0.5px #d4b584, /* titik 4 */
        80px 1px 0 0.5px #e7c08a,
        120px 6px 0 0.5px #d4b584; 
}

.power-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #FFC107, #FF5722);
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 10px;
}

.instructions {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 15px;
    font-size: 0.9em;
}

.wind-indicator {
    position: absolute;
    top: 50px;
    right: 50px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 15px;
    color: white;
    text-align: center;
    min-width: 120px;
}

.wind-arrow {
    font-size: 2em;
    margin: 5px 0;
    transition: transform 0.3s ease;
}

.basket-moving {
    animation: basketMove 3s ease-in-out infinite;
}

@keyframes basketMove {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(50px); }
}

.start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 50%, #45b7d1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background: linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 50%, #45b7d1 100%); }
    50% { background: linear-gradient(135deg, #4ecdc4 0%, #45b7d1 50%, #ff6b6b 100%); }
}

.start-content {
    text-align: center;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: 60px 40px;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: float 2s ease-in-out infinite;
}

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

.start-content h1 {
    font-size: 3em;
    margin: 0 0 20px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.start-content p {
    font-size: 1.2em;
    margin: 0 0 30px 0;
    opacity: 0.9;
}

.play-btn {
    background: linear-gradient(45deg, #ff6b35, #ff8c42);
    color: white;
    border: none;
    padding: 20px 40px;
    border-radius: 50px;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(255, 107, 53, 0.3);
}

.play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 107, 53, 0.4);
}

.fireworks {
    position: absolute;
    pointer-events: none;
    z-index: 200;
}

.firework {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: fireworkExplode 1s ease-out forwards;
}

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

.sakura {
    position: absolute;
    font-size: 20px;
    animation: sakuraFall 3s linear forwards;
    pointer-events: none;
    z-index: 150;
}

@keyframes sakuraFall {
    0% {
        opacity: 1;
        transform: translateY(-20px) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(360deg);
    }
}

@keyframes sakuraExplode {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(calc(var(--explode-x) * 0.7), calc(var(--explode-y) * 0.7)) rotate(180deg) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(var(--explode-x), var(--explode-y)) rotate(360deg) scale(0.5);
    }
}