* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}
/*
body {
  background: linear-gradient(135deg, #667eea, #764ba2);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  background: white;
  padding: 30px;
  border-radius: 12px;
  width: 400px;
  animation: fadeIn 0.8s ease;
}
*/
body {
  background: linear-gradient(135deg,#667eea,#764ba2);
  min-height:100vh;
  display:flex;
  justify-content:center;
  align-items:center;
  font-family:Arial;
  overflow:hidden;
}

.container {
  background:white;
  padding:30px;
  width:420px;
  border-radius:14px;
  z-index:2;
}

.cards {
  display:grid;
  gap:12px;
}

.card {
  padding:14px;
  border-radius:10px;
  border:2px solid #ddd;
  cursor:pointer;
}

.card.active {
  background:#eef1ff;
  border-color:#667eea;
  font-weight:bold;
}

button {
  margin-top:20px;
  width:100%;
  padding:12px;
  border:none;
  border-radius:8px;
  background:#667eea;
  color:white;
  font-size:16px;
  cursor:pointer;
}

/* overlay */
.overlay {
  position:fixed;
  inset:0;
  background:rgba(102,126,234,.95);
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  opacity:0;
  pointer-events:none;
  z-index:10;
  color:white;
}

/* spinner */
.spinner {
  width:50px;
  height:50px;
  border:5px solid rgba(255,255,255,.3);
  border-top:5px solid white;
  border-radius:50%;
  animation: spin 1s linear infinite;
  margin-bottom:12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


#result {
  margin-top:20px;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
}

.options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.card {
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  width: 120%;
  height: 120%;
  background: rgba(102,126,234,.15);
  border-radius: 50%;
  transform: scale(0);
  transition: transform .4s;
}

.card:active::after {
  transform: scale(1);
}

.card {
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
}

.card input {
  display: none;
}

.card span {
  width: 100%;
}

.card:hover {
  transform: scale(1.03);
  border-color: #667eea;
}

.card input:checked + span {
  font-weight: bold;
  color: #667eea;
}

.card:has(input:checked) {
  background: #eef1ff;
  border-color: #667eea;
}

button {
  margin-top: 20px;
  width: 100%;
  padding: 12px;
  border: none;
  background: #667eea;
  color: white;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background: #5a67d8;
}

#result {
  margin-top: 20px;
  animation: slideUp 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
/* tambahan karena u hp */
@media (max-width: 600px) {
  .card {
    padding: 18px;
    font-size: 16px;
  }

  button {
    padding: 16px;
    font-size: 18px;
  }
}
