@import url('https://fonts.googleapis.com/css2?family=Alex+Brush&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Times+New+Roman&display=swap');

#lottery-result-container {
    background: #0a0e23;
    color: #fff;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    margin: 30px auto;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

#lottery-result-form {
    width: 100%;
    box-sizing: border-box;
}

#lottery-result-form input,
#lottery-result-form button {
    margin: 10px 0;
    padding: 10px;
    width: 100%;
    display: block;
    box-sizing: border-box;
    border: 1px solid #333;
    border-radius: 5px;
    background: #1a1f3a;
    color: #fff;
}

#lottery-result-form input:focus {
    outline: none;
    border-color: #ff6600;
}

#lottery-result-form button {
    background: #ff6600;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
}

#lottery-result-form button:hover {
    background: #e55a00;
}

.result-error {
    margin-top: 10px;
    color: #f44336;
    font-size: 14px;
    text-align: center;
}

/* Winners Dashboard Styles */
.winners-dashboard {
    position: relative;
    padding: 40px;
    background: #f5f5f5 url('https://www.transparenttextures.com/patterns/paper.png') repeat;
    border: 2px solid #006400;
    border-radius: 15px;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-family: 'Times New Roman', Times, serif;
    color: #333;
    max-width: 800px;
    margin: 20px auto;
}

.winners-header {
    margin-bottom: 30px;
}

.winners-header h2 {
    color: #006400;
    font-size: 28px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.winners-header p {
    color: #004d00;
    font-size: 18px;
}

.ticket-number {
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
    background: linear-gradient(135deg, #ff6600, #ffd700);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.lottery-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    display: block;
}

.lottery-details {
    margin: 20px 0;
    text-align: left;
}

.lottery-details p {
    margin: 5px 0;
    font-size: 14px;
}

.prize-list {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #006400;
}

.prize-list h3 {
    color: #006400;
    font-size: 18px;
    margin-bottom: 10px;
}

.prize-list p {
    margin: 5px 0;
    font-size: 14px;
}

.prize-list .user-ticket {
    font-weight: bold;
    color: #ffd700;
    background: #006400;
    padding: 5px 10px;
    border-radius: 5px;
}

.signature-section {
    margin-top: 20px;
    text-align: left;
    font-size: 14px;
}

.signature-section p {
    margin: 5px 0;
}

.signature-box {
    background: #006400;
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

/* Certificate Styles */
.certificate-container {
    display: none;
    text-align: center;
    margin-top: 30px;
    background: #1a1f3a;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #333;
}

#certificateCanvas {
    border: 1px solid #ccc;
    max-width: 100%;
    height: auto;
}

/* Buttons */
.download-certificate-btn,
.download-pdf-btn {
    margin: 10px;
    padding: 10px 20px;
    background-color: #006400;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-family: 'Times New Roman', Times, serif;
    font-weight: bold;
    text-transform: uppercase;
    transition: background 0.3s ease;
}

.download-certificate-btn:hover,
.download-pdf-btn:hover {
    background-color: #004d00;
}

/* Firecracker Animation */
.firecracker {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ffd700;
    border-radius: 50%;
    animation: firecracker 1s ease-out forwards;
    pointer-events: none;
}

@keyframes firecracker {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    #lottery-result-container,
    .winners-dashboard,
    .certificate-container {
        padding: 20px;
        margin: 20px auto;
    }
    .winners-header h2 {
        font-size: 24px;
    }
    .ticket-number {
        font-size: 20px;
    }
    .lottery-logo {
        width: 80px;
        height: 80px;
    }
    #certificateCanvas {
        width: 100%;
        height: auto;
    }
}