body {
    background-color: #f8f9fa;
    font-family: sans-serif;
    margin: 0;
    padding: 2rem 0;
    line-height: 1.5;
    background-image: url('images/site-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: white;
    background-image: url('images/background-light-grad.png');
    background-size: cover;
    background-position: center;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 900px;
    width: 95%;
}

.section {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

#main-numbers-section {
    background-color: rgba(74, 144, 226, 0.1);
}

#powerball-section {
    background-color: rgba(226, 74, 74, .1);
}

.header-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding-top: 0;
    padding-bottom: 0;
}

.site-logo {
    width: 120px;
    height: auto;
}

.lotto-logo {
    width: 80px;
    height: auto;
}

h1 {
    margin: 0;
    color: #333;
    font-size: 1.8rem;
}

.selection-grid h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #555;
    font-size: 1.3rem;
}

.numbers-grid {
    display: grid;
    gap: 0.5rem;
    justify-content: center;
}

#numbers-selection-container {
    grid-template-columns: repeat(7, 50px);
}

#powerball-selection-container {
    grid-template-columns: repeat(5, 50px);
}

/* Dynamic Grids */
.grid-cols-7 {
    grid-template-columns: repeat(7, 50px) !important;
}

.grid-cols-9 {
    grid-template-columns: repeat(9, 50px) !important;
}

.grid-cols-10 {
    grid-template-columns: repeat(10, 50px) !important;
}

/* Custom Themes */
.theme-oz-lotto {
    background-color: rgba(144, 238, 144, 0.2) !important;
}

.theme-gold-lotto {
    background-color: rgba(255, 99, 71, 0.1) !important;
}

.theme-powerball {
    background-color: rgba(74, 144, 226, 0.1) !important;
}

/* Override default #main-numbers-section background if needed, leveraging class specificity */


.number-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid #ccc;
    background-color: #fff;
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.number-button.selected {
    background-color: #4a90e2;
    border-color: #4a90e2;
    color: white;
}

.number-button.powerball.selected {
    background-color: #e24a4a;
    border-color: #e24a4a;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.input-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.input-container label {
    font-size: 1.2rem;
    color: #555;
}

.input-container input {
    width: 80px;
    padding: 0.5rem;
    font-size: 1.2rem;
    border-radius: 0.5rem;
    border: 1px solid #ccc;
    text-align: center;
}

#generate-btn {
    background-color: #50e3c2;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#generate-btn:hover {
    background-color: #48d1b3;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

#generate-btn:active {
    background-color: #40c0a0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tabs-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background-color: white;
}

.tab-button {
    background-color: #f0f0f0;
    border: none;
    padding: 10px 20px;
    font-size: 1.1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    font-weight: bold;
    color: #555;
    display: inline-flex;
    /* Changed from default to inline-flex for <a> */
    align-items: center;
    justify-content: center;
    text-decoration: none;
    /* Remove underline for <a> */
}

.tab-button:hover {
    background-color: #e0e0e0;
}

.tab-button.active {
    background-color: #4a90e2;
    color: white;
}

.hidden {
    display: none !important;
}

#instructions-section {
    background-color: #fdfdfd;
    text-align: left;
    padding: 1.5rem 2rem;
}

#instructions-section h2 {
    text-align: center;
    margin-top: 0;
}

#instructions-section ol {
    padding-left: 20px;
    margin: 0;
}

#instructions-section li {
    margin-bottom: 0.75rem;
}

#results-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 0;
    padding: 1.5rem;
    min-height: 100px;
}

.numbers-set {
    display: flex;
    justify-content: center;
    align-items: center;
}

.row-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #555;
    margin-right: 15px;
    width: 30px;
    text-align: right;
}


.main-numbers,
.powerball-number {
    display: flex;
    gap: 0.5rem;
    padding-bottom: 4px;
}

.main-numbers div,
.powerball-number div {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

.main-numbers div {
    background-color: #4a90e2;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.powerball-number div {
    background-color: #e24a4a;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-left: 1rem;
}

footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 900px;
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

footer nav a {
    color: #4a90e2;
    text-decoration: none;
    margin: 0 0.5rem;
}

footer nav a:hover {
    text-decoration: underline;
}


/* Responsive Design */
@media (max-width: 768px) {
    .header-section {
        flex-direction: column;
        gap: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    #numbers-selection-container,
    .grid-cols-7,
    .grid-cols-9,
    .grid-cols-10 {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr)) !important;
        gap: 0.4rem;
    }

    #powerball-selection-container {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
        gap: 0.4rem;
    }

    .number-button {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .controls {
        flex-direction: column;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem 0;
    }

    .container {
        padding: 1rem;
    }

    .section {
        padding: 1rem;
    }

    h1 {
        font-size: 1.3rem;
    }

    .header-section {
        margin-bottom: 0.5rem;
    }

    .site-logo {
        width: 120px;
    }

    .lotto-logo {
        width: 40px;
        align-items: center;
    }

    #numbers-selection-container {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
        gap: 0.3rem;
    }

    .number-button {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .main-numbers div,
    .powerball-number div {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    /* Educational Content - Mobile Responsive */
    .odds-table th,
    .odds-table td {
        padding: 8px;
        font-size: 0.85rem;
    }

    .faq-container summary {
        font-size: 0.9rem;
        padding: 12px;
    }

    .faq-content {
        font-size: 0.85rem;
        padding: 12px;
    }

    h2 {
        font-size: 1.2rem;
    }

    h3 {
        font-size: 1.05rem;
    }

    p {
        font-size: 0.9rem;
    }
}

/* Tables */
.odds-table-container {
    overflow-x: auto;
    margin: 20px 0;
}

.odds-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: white;
}

.odds-table th,
.odds-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.odds-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.odds-table tr:hover {
    background-color: #f5f5f5;
}

/* FAQ Section */
.faq-container summary {
    cursor: pointer;
    font-weight: bold;
    padding: 15px;
    background-color: white;
    margin-bottom: 5px;
    border-radius: 5px;
    list-style: none;
    /* Hide default triangle */
    position: relative;
    padding-right: 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.faq-container summary::-webkit-details-marker {
    display: none;
}

.faq-container summary::after {
    content: '+';
    position: absolute;
    right: 15px;
    font-size: 1.2em;
    font-weight: bold;
    color: #007bff;
}

.faq-container details[open] summary::after {
    content: '-';
}

.faq-container details[open] summary {
    background-color: #e9ecef;
}

.faq-content {
    padding: 15px;
    background-color: white;
    margin-bottom: 15px;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    border-top: 1px solid #eee;
    text-align: left;
    /* Added to fix weird centered look */
}

.faq-content ul {
    list-style: none;
    padding-left: 0;
    margin-top: 10px;
}

.faq-content ul li {
    padding: 10px 15px;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    border-left: 4px solid #4a90e2;
    border-radius: 4px;
    transition: transform 0.2s, background-color 0.2s;
    font-size: 0.95rem;
}

.faq-content ul li:hover {
    background-color: #f1f3f5;
    transform: translateX(5px);
}

.faq-content ul li strong {
    color: #333;
    display: inline-block;
    min-width: 90px;
}

.page-container[data-game="ozLotto"] .faq-content ul li {
    border-left-color: #005900;
}

.page-container[data-game="goldLotto"] .faq-content ul li {
    border-left-color: #bd2821;
}

/* Mobile First Improvements */
button,
.tab-button,
input,
select {
    min-height: 48px;
    /* Tapping target size */
}

#generate-btn {
    padding: 15px 30px;
    font-size: 1.2rem;
    width: 100%;
    max-width: 400px;
}

@media (max-width: 600px) {
    .tabs-container {
        flex-direction: column;
        gap: 10px;
    }

    .tab-button {
        width: 90%;
        margin-bottom: 5px;
    }
}

/* Copy Button Styles */
.copy-btn-container {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.copy-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    margin-bottom: 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.copy-btn:hover {
    background-color: #218838;
}

.copy-btn.copied {
    background-color: #6c757d;
}

/* Custom Generate Button Colors */
.page-container[data-game="powerball"] #generate-btn {
    background-color: #1e3883;
}

.page-container[data-game="powerball"] #generate-btn:hover {
    background-color: #162a63;
}

.page-container[data-game="ozLotto"] #generate-btn {
    background-color: #005900;
}

.page-container[data-game="ozLotto"] #generate-btn:hover {
    background-color: #004000;
}

.page-container[data-game="goldLotto"] #generate-btn {
    background-color: #bd2821;
}

.page-container[data-game="goldLotto"] #generate-btn:hover {
    background-color: #9c211b;
}