/* Base */
.ldq-wrap { max-width: 480px; margin: 24px auto; padding: 16px; border: 1px solid #e5e7eb; border-radius: 12px; background:#fff; }
.ldq-title { margin: 0 0 12px; text-align: center; }
.ldq-field { margin-bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
.ldq-field input { padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; width: 100%; }
.ldq-btn { width: 100%; padding: 10px 12px; border: 0; background: #111827; color: #fff; border-radius: 8px; cursor: pointer; font-weight:600; }
.ldq-msg { margin-top: 10px; font-size: 14px; }
.ldq-msg.ldq-error { color: #b91c1c; }
.ldq-msg.ldq-ok { color: #065f46; }

/* Modal */
.ldq-modal[hidden] { display: none !important; }
.ldq-modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 9999; padding:16px; }
.ldq-modal-content { background: #fff; padding: 22px; border-radius: 16px; width: min(92vw, 460px); position: relative; box-shadow: 0 10px 30px rgba(0,0,0,.15); animation: ldq-pop .25s ease-out; overflow: hidden; }
.ldq-close { position: absolute; top: 8px; right: 12px; border: 0; background: #000000; font-size: 22px; cursor: pointer; line-height:1; }
@keyframes ldq-pop { from{ transform: scale(.94); opacity:.4; } to{ transform: scale(1); opacity:1; } }

.ldq-result { text-align: center; }
.ldq-emoji { font-size: 40px; line-height: 1; margin-bottom: 6px; }
.ldq-prize { margin: 6px 0 6px; font-size: 22px; line-height: 1.25; }
.ldq-result-text { margin: 6px 0 10px; opacity:.9; }
.ldq-stats { font-size: 13px; color: #6b7280; margin-bottom: 14px; }
.ldq-qr { display: flex; justify-content: center; margin-top: 8px; }

/* Winner theme */
.ldq-modal.ldq-win .ldq-modal-content{ 
  background: radial-gradient(1200px 600px at 10% -10%, #e8fff3 0%, #ffffff 40%);
  border: 1px solid #bbf7d0;
}
.ldq-modal.ldq-win .ldq-emoji{ animation: ldq-bounce 1.2s ease; }
@keyframes ldq-bounce{ 0%{ transform: translateY(-8px);} 50%{ transform: translateY(6px);} 100%{ transform: translateY(0);} }
.ldq-modal.ldq-win .ldq-prize{ color:#065f46; }
.ldq-modal.ldq-win .ldq-prize strong{ font-weight:800; }

/* Loser theme */
.ldq-modal.ldq-lose .ldq-modal-content{
  background: radial-gradient(1200px 600px at 10% -10%, #fff1f2 0%, #ffffff 40%);
  border: 1px solid #fecaca;
}
.ldq-modal.ldq-lose .ldq-emoji{ animation: ldq-wobble 1s ease; }
@keyframes ldq-wobble{ 0%{transform: rotate(0)} 25%{transform: rotate(-10deg)} 50%{transform: rotate(10deg)} 100%{transform: rotate(0)} }
.ldq-modal.ldq-lose .ldq-prize{ color:#7f1d1d; }
.ldq-modal.ldq-lose .ldq-prize strong{ font-weight:800; }

/* Confetti */
.ldq-confetti-wrap{ position:absolute; inset:0; pointer-events:none; overflow:hidden; }
.ldq-confetti{
  position:absolute; top:-12px; width:10px; height:14px; border-radius:2px;
  background: var(--c, #10b981);
  animation: ldq-fall linear forwards;
}
.ldq-confetti:nth-child(3n){ --c:#f59e0b; }
.ldq-confetti:nth-child(4n){ --c:#3b82f6; }
.ldq-confetti:nth-child(5n){ --c:#ef4444; }
@keyframes ldq-fall{
  to{ transform: translateY(120vh) rotate(var(--tw)); opacity: .8; }
}

/* Terms & Condition */
.ldq-terms { margin: 12px 0 16px; }
.ldq-terms-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.ldq-terms-title { margin:0; font-size:16px; }
.ldq-terms-link { border:1px solid #000000; background:#000000; padding:6px 10px; border-radius:6px; cursor:pointer; }
.ldq-terms-check { display:block; margin-top:8px; }
.ldq-terms-text { margin:6px 0 0; font-size:13px; color:#666; }

.ldq-terms-modal[hidden] { display:none !important; }
.ldq-terms-modal { position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:99999; display:flex; align-items:center; justify-content:center; padding:16px; }
.ldq-terms-dialog { background:#fff; max-width:500px; width:100%; border-radius:10px; padding:16px 16px 12px; outline:none; }
.ldq-terms-close { float:right; border:none; background:#ffffff; font-size:20px; cursor:pointer; }
.ldq-terms-heading { margin:0 0 8px; }
.ldq-terms-body { max-height:50vh; overflow:auto; padding-right:6px; }
.ldq-terms-actions { display:flex; gap:8px; justify-content:flex-end; margin-top:12px; }
.ldq-terms-agree { background:#2271b1; color:#fff; border:none; padding:8px 12px; border-radius:6px; cursor:pointer; }
.ldq-terms-cancel { background:#ffffff; border:1px solid #000000; padding:8px 12px; border-radius:6px; cursor:pointer; }

