@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap');   
body {
    font-family: 'Kanit', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    height: 100vh;
    overflow: hidden;
}

.lottery-ball {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle at 30% 30%, #fff, #ff5252);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(255, 82, 82, 0.7);
    position: absolute;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.lottery-ball:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.lottery-ball:nth-child(2) {
    top: 70%;
    left: 15%;
    animation-delay: 1s;
}

.lottery-ball:nth-child(3) {
    top: 30%;
    right: 15%;
    animation-delay: 2s;
}

.lottery-ball:nth-child(4) {
    bottom: 20%;
    right: 10%;
    animation-delay: 3s;
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-code {
    background: #2c3e50;
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    letter-spacing: 5px;
    font-weight: bold;
    flex-grow: 1;
    text-align: center;
    user-select: none;
}

.refresh-btn {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.refresh-btn:hover {
    transform: rotate(180deg);
}

.login-container {
    backdrop-filter: blur(10px);
    background: rgba(26, 32, 44, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-lottery {
    background: linear-gradient(45deg, #ff5252, #ff4081);
    box-shadow: 0 4px 15px rgba(255, 82, 82, 0.4);
    transition: all 0.3s;
}

.btn-lottery:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 82, 82, 0.6);
}

.input-field {
    background: rgba(26, 32, 44, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.input-field:focus {
    border-color: #ff5252;
    box-shadow: 0 0 0 3px rgba(255, 82, 82, 0.3);
}

.toggle-password {
    cursor: pointer;
    color: #718096;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #fff;
}

.remember-checkbox:checked {
    background-color: #ff5252;
    border-color: #ff5252;
}

.alert-box {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border: 1px solid #f5c6cb;
    font-size: 15px;
    max-width: 360px;
}

.otp-input {
    width: 42px;
    height: 50px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    border-radius: 8px;
    border: 1px solid #4b5563; /* gray-700 */
    background: #1f2937;       /* gray-800 */
    color: #fff;
    outline: none;
    transition: all 0.2s;
}
.otp-input:focus {
    border-color: #ff5252;
    box-shadow: 0 0 0 2px rgba(255, 82, 82, 0.5);
}

/* ===== Toast Notification System ===== */
#toast-root {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: rgba(17, 24, 39, 0.95);
    color: #ffffff;
    border: 1px solid rgba(75, 85, 99, 0.6);
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateX(16px);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(16px);
    opacity: 0;
}

/* ===== Toast Status Dots ===== */
.dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    animation: pulseDot 1.4s infinite;
}

.dot.success {
    background: #22c55e;
}

.dot.error {
    background: #ef4444;
}

.dot.info {
    background: #60a5fa;
}

/* ===== Dot Animation ===== */
@keyframes pulseDot {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.25);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.6;
    }
}

/* ===== QR Code Container ===== */
#qrBox {
    background: #ffffff;
    padding: 12px;
    border-radius: 12px;
    display: inline-block;
}

/* QR Code Canvas Styling */
#qrBox canvas {
    width: 256px !important;
    height: 256px !important;
    image-rendering: pixelated;
}

/* QR Code Image Styling - Prevent blur/scale issues */
#qrBox img {
    width: 256px !important;
    height: 256px !important;
    image-rendering: pixelated;
}