@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    text-align: center;
    background: url('images/bg.webp') no-repeat center center/cover;
    background-size: cover;
    background-attachment: fixed;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    position: relative;
}

/* Overlay blur untuk background */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    filter: blur(10px);
    z-index: -1;
}

/* Kontainer utama */
.container {
    background: rgba(255, 255, 255, 0.2);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    width: 80%;
    max-width: 400px;
    text-align: center;
}

/* Tombol */
button {
    margin: 10px;
    padding: 15px 25px;
    font-size: 18px;
    border: none;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s ease-in-out;
    font-weight: bold;
    width: 160px;
    outline: none;
    color: white !important; /* Paksa teks putih */
}

button#truth {
    background: linear-gradient(45deg, #ff4b5c, #ff758c);
}

button#dare {
    background: linear-gradient(45deg, #ff8c42, #ffae64);
}

button:hover {
    transform: scale(1.1);
    box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.6);
}

/* Hasil Truth/Dare */
#result {
    font-size: 20px;
    font-weight: bold;
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    color: black; /* Warna teks hitam agar jelas */
}

#result.show {
    opacity: 1;
    transform: translateY(0);
}

/* Pilihan Gunting Kertas Batu */
.choices {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.gkb {
    font-size: 24px;
    padding: 10px 20px;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.gkb:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Hasil GKB */
#gkb-result {
    font-size: 22px;
    font-weight: bold;
    margin-top: 20px;
}

/* Tombol restart */
.restart-btn {
    background: linear-gradient(45deg, #4CAF50, #8BC34A);
    margin-top: 20px;
}

/* Sembunyikan elemen */
.hidden {
    display: none;
}

/* Kontainer input nama */
.input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; /* Memberikan jarak antar elemen */
    margin-bottom: 40px; /* Memberikan ruang di bawah input */
}

/* Kolom input nama pemain */
input[type="text"] {
    width: 80%; /* Pastikan input tidak terlalu besar */
    max-width: 300px;
    padding: 10px 15px; /* Tambahkan sedikit padding agar tidak sempit */
    font-size: 18px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-align: center;
    outline: none;
    transition: all 0.3s ease-in-out;
    margin: 10px 0; /* Menambah jarak atas dan bawah */
}

/* Placeholder agar lebih terlihat */
input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

/* Efek saat fokus */
input[type="text"]:focus {
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0px 0px 8px rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.25);
}

/* Perbaikan posisi tombol */
button {
    margin-top: 10px; /* Tambahkan sedikit jarak di atas tombol */
    padding: 12px 18px;
    font-size: 18px;
    border-radius: 30px;
    width: 160px;
}

/* Perbaikan warna teks tombol */
button {
    color: white !important; /* Pastikan teks putih */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Tambahkan efek bayangan agar lebih terbaca */
}

/* Pastikan warna teks kontras dengan latar belakang */
button#truth {
    background: linear-gradient(45deg, #ff4b5c, #ff758c);
    color: white;
}

button#dare {
    background: linear-gradient(45deg, #ff8c42, #ffae64);
    color: black; /* Warna teks hitam agar lebih jelas */
    text-shadow: none; /* Hilangkan shadow jika warna teks sudah kontras */
}

/* Penyesuaian input nama pemain agar tidak terlalu mepet */
.input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px; /* Tambahkan jarak antar elemen */
    margin-bottom: 30px; /* Tambahkan ruang bawah */
    width: 100%;
}

/* Perbaikan input nama agar lebih nyaman */
input[type="text"] {
    width: 90%; /* Lebih fleksibel sesuai layar */
    max-width: 350px; /* Ukuran maksimal */
    padding: 12px 18px;
    font-size: 18px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-align: center;
    outline: none;
    transition: all 0.3s ease-in-out;
    margin-top: 10px; /* Beri jarak atas */
    margin-bottom: 10px; /* Beri jarak bawah */
}

/* Placeholder lebih jelas */
input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.9);
}

/* Efek saat input difokuskan */
input[type="text"]:focus {
    border-color: white;
    box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.3);
}

/* Perbaikan Tombol Mulai */
button#start {
    background: linear-gradient(45deg, #4CAF50, #2E7D32); /* Warna hijau */
    color: white !important; /* Biar kontras */
    text-shadow: none;
}
