/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #1a1a1a;
    color: #fff;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: #111;
    padding: 20px 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.logo {
    height: 60px;
    transition: transform 0.3s;
}

.logo:hover {
    transform: scale(1.1);
}

nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    margin-left: 25px; /* Spacing between toggle and links */
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    color: #ffd700;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s, transform 0.2s;
}

.nav-links a:hover {
    color: #00ff00;
    transform: translateY(-2px);
}

.nav-links a.active {
    color: #00ff00;
    border-bottom: 2px solid #00ff00;
}

.menu-toggle {
    display: none;
    font-size: 28px;
    color: #ffd700;
    cursor: pointer;
    margin-left: 15px; /* Spacing from the right edge */
}

/* Header Layout Adjustment */
header .container {
    display: flex;
    justify-content: space-between; /* Logo left, nav right */
    align-items: center;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logout-btn {
    background: #ffd700;
    color: #111;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #00ff00;
}

/* Hero Section */
.hero {
    background: url('../images/banner.jpg') center/cover no-repeat;
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
    margin-top: 80px; /* Adjust for fixed header height */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: fadeIn 1s ease-in;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.cta-button {
    background: #ffd700;
    color: #111;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.2rem;
    transition: background 0.3s, transform 0.2s;
}

.cta-button:hover {
    background: #00ff00;
    transform: scale(1.05);
}

/* Play Hero Section */
.play-hero {
    background: linear-gradient(45deg, #111, #222);
    padding: 100px 0;
    text-align: center;
    position: relative;
    margin-top: 80px; /* Adjust for fixed header height */
}

.play-hero h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    animation: fadeIn 1s ease-in;
}

.play-hero p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.jackpot-display {
    margin-top: 20px;
}

.jackpot-display h2 {
    color: #ffd700;
    font-size: 2rem;
}

/* Payment Hero Section */
.payment-hero {
    background: linear-gradient(45deg, #111, #222);
    padding: 80px 0;
    text-align: center;
    position: relative;
    margin-top: 80px; /* Adjust for fixed header height */
}

.payment-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    animation: fadeIn 1s ease-in;
}

.payment-hero p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Winners Hero Section */
.winners-hero {
    background: linear-gradient(45deg, #111, #222);
    padding: 80px 0;
    text-align: center;
    position: relative;
    margin-top: 80px; /* Adjust for fixed header height */
}

.winners-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    animation: fadeIn 1s ease-in;
}

.winners-hero p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Terms Hero Section */
.terms-hero {
    background: linear-gradient(45deg, #111, #222);
    padding: 80px 0;
    text-align: center;
    position: relative;
    margin-top: 80px; /* Adjust for fixed header height */
}

.terms-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    animation: fadeIn 1s ease-in;
}

.terms-hero p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Promo and Celebration Banner */
.promo-banner, .celebration-banner {
    background: #ffd700;
    color: #111;
    padding: 20px 0;
    text-align: center;
}

.promo-banner h3, .celebration-banner h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.promo-banner .cta-button, .celebration-banner .cta-button {
    background: #00ff00;
    color: #111;
    padding: 10px 20px;
}

.promo-banner .cta-button:hover, .celebration-banner .cta-button:hover {
    background: #fff;
}

/* Countdown Timer */
.countdown {
    padding: 60px 0;
    text-align: center;
    background: #222;
}

.timer-wrapper {
    display: flex;
    justify-content: center;
}

.timer {
    display: flex;
    gap: 20px;
    font-size: 2rem;
    color: #00ff00;
}

.timer-block {
    text-align: center;
    background: #333;
    padding: 15px;
    border-radius: 10px;
    min-width: 80px;
}

.timer-block p {
    font-size: 0.9rem;
    color: #ffd700;
}

/* Winner Cards */
.winners {
    padding: 60px 0;
}

.winner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    animation: fadeInUp 1s ease-in;
}

.winner-card {
    background: #222;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.winner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 255, 0, 0.3);
}

.winner-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 2px solid #ffd700;
}

.winner-card h3 {
    color: #ffd700;
    margin-bottom: 10px;
}

/* Terms Section */
.terms {
    padding: 60px 0;
}

.terms-content {
    background: #222;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease-in;
}

.terms-content h2 {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.terms-content p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.terms-accept {
    text-align: center;
}

.terms-accept label {
    display: block;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.terms-accept input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.terms-accept button {
    background: #ffd700;
    color: #111;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.terms-accept button:hover:not(:disabled) {
    background: #00ff00;
    transform: scale(1.05);
}

.terms-accept button:disabled {
    background: #555;
    cursor: not-allowed;
}

.message {
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    display: none;
}

.message.success {
    background: #00ff00;
    color: #111;
    display: block;
}

/* How to Play */
.how-to-play {
    padding: 60px 0;
    background: #1a1a1a;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.step {
    text-align: center;
    animation: fadeInUp 1s ease-in;
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.step h3 {
    color: #ffd700;
    margin-bottom: 10px;
}

/* Testimonials */
.testimonials {
    padding: 60px 0;
    background: #222;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.testimonial {
    background: #333;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.testimonial img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 15px;
}

.testimonial h4 {
    color: #ffd700;
}

/* Newsletter */
.newsletter {
    padding: 60px 0;
    text-align: center;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 500px;
    margin: 20px auto;
}

.newsletter-form input {
    padding: 10px;
    border: none;
    border-radius: 5px;
    flex: 1;
}

.newsletter-form button {
    background: #ffd700;
    color: #111;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: #00ff00;
}

/* Footer */
footer {
    background: #111;
    padding: 40px 0;
    color: #ccc;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.footer-section h3 {
    color: #ffd700;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #00ff00;
}

.social-links a {
    margin-right: 15px;
}

.footer-copy {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
}

/* Game Cards */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    animation: fadeInUp 1s ease-in;
}

.game-card {
    position: relative;
    overflow: hidden;
    background: #222;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s;
}

.game-card:hover {
    transform: translateY(-5px);
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent, rgba(0, 255, 0, 0.1));
    opacity: 0;
    transition: opacity 0.3s;
}

.game-card:hover::before {
    opacity: 1;
}

.buy-ticket {
    background: #ffd700;
    color: #111;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.buy-ticket:hover {
    background: #00ff00;
}

/* Number Picker Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: #222;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    animation: fadeIn 0.5s ease-in;
}

#number-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.number {
    background: #333;
    padding: 12px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.number.selected {
    background: #00ff00;
    color: #111;
    transform: scale(1.1);
}

.number.disabled {
    background: #555;
    cursor: not-allowed;
}

.quick-pick {
    background: #ffd700;
    color: #111;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.quick-pick:hover {
    background: #00ff00;
}

/* Payment Page */
.payment {
    padding: 60px 0;
}

.payment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
    animation: fadeInUp 1s ease-in;
}

.payment-btn {
    background: #333;
    color: #fff;
    padding: 20px;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
    font-size: 1.1rem;
}

.payment-btn img {
    width: 40px;
    height: 40px;
}

.payment-btn:hover {
    background: #00ff00;
    transform: scale(1.05);
}

.transaction-summary {
    background: #222;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    animation: fadeIn 1s ease-in;
}

.transaction-summary h3 {
    color: #ffd700;
    margin-bottom: 15px;
}

/* Admin Dashboard */
.admin-section {
    padding: 100px 20px;
}

.admin-form {
    background: #222;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    align-items: center;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #ffd700;
}

.form-group input,
.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    background: #333;
    border: none;
    border-radius: 5px;
    color: #fff;
    transition: border 0.3s;
}

.form-group input:focus {
    border: 2px solid #00ff00;
}

.form-group button {
    background: #ff5555;
    color: #fff;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.form-group button:hover {
    background: #cc0000;
}

.admin-form button[type="submit"] {
    background: #ffd700;
    color: #111;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.admin-form button[type="submit"]:hover {
    background: #00ff00;
}

.message {
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

.message.success {
    background: #00ff00;
    color: #111;
}

.message.error {
    background: #ff5555;
    color: #fff;
}

/* Floating Cart */
.floating-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ffd700;
    color: #111;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s;
}

.floating-cart:hover {
    transform: scale(1.1);
}

/* Scroll to Top */
.scroll-top {
    position: fixed;
    bottom: 70px;
    right: 20px;
    background: #ffd700;
    color: #111;
    padding: 10px 15px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.scroll-top.visible {
    opacity: 1;
}

.scroll-top:hover {
    transform: scale(1.1);
}

/* Loader */
.loader {
    text-align: center;
    font-size: 1.2rem;
    color: #ffd700;
    animation: pulse 1s infinite;
}

/* Confetti Canvas */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Light Mode */
body.light-mode {
    background: #f4f4f4;
    color: #333;
}

body.light-mode header,
body.light-mode footer {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

body.light-mode .hero-overlay {
    background: rgba(255, 255, 255, 0.3);
}

body.light-mode .play-hero,
body.light-mode .payment-hero,
body.light-mode .winners-hero,
body.light-mode .terms-hero {
    background: linear-gradient(45deg, #e0e0e0, #f4f4f4);
}

body.light-mode .countdown,
body.light-mode .testimonials,
body.light-mode .promo-banner,
body.light-mode .celebration-banner {
    background: #e0e0e0;
}

body.light-mode .game-card,
body.light-mode .winner-card,
body.light-mode .testimonial,
body.light-mode .admin-form,
body.light-mode .modal-content,
body.light-mode .transaction-summary,
body.light-mode .terms-content {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

body.light-mode .number {
    background: #e0e0e0;
}

body.light-mode .number.selected {
    background: #00ff00;
    color: #fff;
}

body.light-mode .payment-btn {
    background: #e0e0e0;
}

body.light-mode .form-group input {
    background: #f4f4f4;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        right: 20px;
        background: #111;
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    header .container {
        justify-content: flex-end; /* Align nav to right on mobile, logo takes natural left */
    }

    .logo {
        margin-left: 20px; /* Ensure logo stays visible on left */
    }

    .hero h1, .play-hero h1, .payment-hero h1, .winners-hero h1, .terms-hero h1 {
        font-size: 2.5rem;
    }

    .hero p, .play-hero p, .payment-hero p, .winners-hero p, .terms-hero p {
        font-size: 1rem;
    }

    .timer {
        font-size: 1.5rem;
        gap: 10px;
    }

    .timer-block {
        min-width: 60px;
    }

    .payment-grid, .steps-grid, .testimonial-grid, .winner-grid {
        grid-template-columns: 1fr;
    }

    .admin-form {
        padding: 15px;
    }

    .form-group {
        grid-template-columns: 1fr;
    }

    .jackpot-display h2 {
        font-size: 1.5rem;
    }

    .promo-banner h3, .celebration-banner h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .hero h1, .play-hero h1, .payment-hero h1, .winners-hero h1, .terms-hero h1 {
        font-size: 2rem;
    }

    .cta-button {
        padding: 10px 20px;
        font-size: 1rem;
    }

    .logo {
        height: 40px; /* Reduce logo size on very small screens */
    }
}