:root {
    --primary-color: #4a90e2; /* Blue */
    --secondary-color: #6b7b8a; /* Darker Grey for text */
    --accent-color-orange: #f5a623; /* Orange */
    --accent-color-purple: #8A2BE2; /* Purple */
    --background-gradient-start: #e0eafc; /* Light Blue start */
    --background-gradient-end: #cfdef3;   /* Lighter Blue end */
    --text-color: #333;
    --card-background: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.15);
    --glow-color-primary: rgba(74, 144, 226, 0.6);
    --glow-color-purple: rgba(138, 43, 226, 0.6);
}

.dark-mode {
    --primary-color: #5dade2;
    --secondary-color: #95a5a6;
    --accent-color-orange: #ffa500;
    --accent-color-purple: #9370DB; /* MediumPurple */
    --background-gradient-start: #2c3e50;
    --background-gradient-end: #34495e;
    --text-color: #ecf0f1;
    --card-background: #34495e;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --glow-color-primary: rgba(93, 173, 226, 0.6);
    --glow-color-purple: rgba(147, 112, 219, 0.6);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-image: linear-gradient(to top, var(--background-gradient-start), var(--background-gradient-end));
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

.home-page {
    display: flex;
    flex-direction: column;
}

.home-page .page-wrapper {
    margin: auto 0;
}

.theme-switcher-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

#theme-switcher-btn {
    background: var(--card-background);
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px var(--shadow-color);
}

#theme-switcher-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--glow-color-primary);
}

    margin: 2rem auto;

main {
    flex: 2;
}

aside {
    flex: 1;
    position: sticky;
    top: 20px;
}

header {
    text-align: center;
    width: 100%;
    margin-bottom: 1rem;
}

.header-generator-link {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    text-decoration: none;
    background-color: var(--primary-color);
    color: white;
    transition: all 0.3s;
    margin-top: 1rem;
}

.header-generator-link:hover {
    background-color: #357ABD;
    transform: translateY(-2px);
}

.info-content {
    text-align: left;
    margin-top: 2rem;
}

.info-content h3 {
    color: var(--primary-color);
    margin-top: 1.5rem;
}

.header-content {
    position: relative;
}

.language-switcher {
    position: absolute;
    top: 0;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--card-background);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px var(--shadow-color);
}

.language-switcher i {
    color: var(--secondary-color);
}

#language-select {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 1px 1px 3px var(--shadow-color);
    margin: 0;
}

header h1 .fa-star {
    font-size: 2.5rem;
    vertical-align: middle;
    animation: spin 5s linear infinite;
}

header p {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.lottery-card {
    background-color: var(--card-background);
    padding: 2.5rem;
    border-radius: 25px;
    box-shadow: 0 10px 25px -5px var(--shadow-color), 0 20px 50px -10px rgba(0,0,0,0.1); /* Layered shadow */
    text-align: center;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
    display: flex; /* Use flexbox for button alignment */
    flex-direction: column; /* Stack buttons vertically */
    align-items: center; /* Center items horizontally */
    gap: 15px; /* Spacing between elements within the card */
    animation: fade-in-up 0.8s ease-out forwards; /* Entry animation */
    opacity: 0; /* Start invisible for animation */
    transform: translateY(20px); /* Start slightly below for animation */
}

.lottery-card:hover {
    transform: translateY(-8px); /* More pronounced lift */
    box-shadow: 0 15px 35px -8px var(--shadow-color), 0 25px 60px -12px rgba(0,0,0,0.15); /* Enhanced hover shadow */
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 {
    margin-top: 0;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--secondary-color);
}

#generator-btn {
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 15px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease-out;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 8px 20px -8px var(--glow-color-primary);
}

#generator-btn:hover {
    background-color: #357ABD;
    box-shadow: 0 10px 25px -8px var(--glow-color-primary);
    transform: translateY(-3px);
}

#statistical-generator-btn {
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 15px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease-out;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    background-color: var(--accent-color-purple); /* Purple from new variables */
    color: white;
    box-shadow: 0 8px 20px -8px var(--glow-color-purple); /* Purple glow */
}

#statistical-generator-btn:hover {
    background-color: #7A1FC6; /* Darker purple on hover */
    box-shadow: 0 10px 25px -8px var(--glow-color-purple);
    transform: translateY(-3px);
}

#back-btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    text-decoration: none;
    background: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    transition: all 0.3s;
}

#back-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.how-it-works {
    margin-top: 4rem;
    text-align: center;
}

.featured-content {
    margin-top: 4rem;
}

.blog-list .blog-post-summary {
    background: var(--card-background);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 20px -10px var(--shadow-color);
    transition: transform 0.3s;
}

.blog-list .blog-post-summary:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px -8px var(--shadow-color), 0 25px 60px -12px rgba(0,0,0,0.15); /* Enhanced hover shadow */
}

.blog-list .blog-post-summary h3 {
    margin-top: 0;
}

.blog-list .blog-post-summary h3 a {
    text-decoration: none;
    color: var(--primary-color);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.disclaimer {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-top: 1rem;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.form-group input, .form-group textarea {
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--secondary-color);
    background: var(--background-gradient-start);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}


.how-it-works h3 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.steps {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.step {
    flex: 1;
    max-width: 200px;
}

.step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

footer {
    margin-top: auto;
    padding: 3rem 1rem;
    font-size: 0.9rem;
    color: var(--secondary-color);
    text-align: center;
    width: 100%;
    background: var(--card-background);
    box-shadow: 0 -5px 15px -5px var(--shadow-color);
}

.footer-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
    text-align: left;
}

.footer-column {
    flex: 1;
    min-width: 200px;
}

.footer-column h4 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column ul li a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--secondary-color);
    padding-top: 2rem;
    margin-top: 2rem;
}


@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
    .main-container {
        flex-direction: column;
        align-items: center;
    }
    aside {
        width: 100%;
        max-width: 550px;
        position: static;
    }
    .language-switcher {
        position: static;
        margin-bottom: 1rem;
        justify-content: center;
    }
    .steps {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 600px) {
    body {
        padding: 15px;
    }

    header h1 {
        font-size: 2.5rem;
    }

    .lottery-card {
        padding: 2rem;
    }
}
