/* assets/css/frontend.css */
.lotto-stats-container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 30px;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px; /* Aligned with admin.css */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #23282d;
    overflow: hidden;
}

.lotto-stats-container h1 {
    color: #0073aa; /* From admin.css */
    font-size: 24px; /* Consistent with admin h1 */
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
}

.lotto-date-search {
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.lotto-date-search label {
    font-weight: 600;
    margin-right: 15px;
    color: #23282d;
    font-size: 1.1em;
}

.lotto-date-picker {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 250px;
    display: inline-block;
    background: #f9f9f9 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><path fill="%23666" d="M19 4h-1V2h-2v2H8V2H6v2H5C3.9 4 3 4.9 3 6v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zm0-12H5V6h14v2z"/></svg>') no-repeat right 8px center;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.lotto-date-picker:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa; /* Consistent with admin input focus */
}

.lotto-date-picker:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.lotto-date-status {
    display: inline-block;
    margin-left: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.lotto-date-status.success {
    color: #e74c3c; /* From admin.css notice-success */
}

.lotto-date-status.error {
    color: #dc3232; /* From admin.css notice-error */
}

/* Style-specific modal adjustments */
.lotto-style-bold .lotto-modal-content {
    background: #1a1a1a;
    color: #fff;
    border: 2px solid #ffcc00;
}

.lotto-style-bold .lotto-modal-close {
    color: #ffcc00;
}

/* Custom datepicker styling */
.ui-datepicker.lotto-datepicker {
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: #fff;
    border: 1px solid #ddd;
}

.ui-datepicker .ui-datepicker-title {
    color: #0073aa;
    font-weight: 600;
}

.ui-datepicker .ui-datepicker-buttonpane button {
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
}

.ui-datepicker .ui-datepicker-buttonpane button:hover {
    background: #006799;
}
.lotto-results-grid.loading {
    opacity: 0.5;
    pointer-events: none; /* Disable interaction during loading */
}

.lotto-results-grid.loading::after {
    content: 'Loading...';
    display: block;
    text-align: center;
    padding: 20px;
    color: #666
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.lotto-lottery-card {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 4px; /* From admin.css */
    border: 1px solid #ddd; /* Aligned with admin forms */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lotto-lottery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.lotto-lottery-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 15px;
}

.lotto-lottery-logo {
    max-width: 180px;
    height: auto;
    border-radius: 4px; /* From admin.css */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease; /* From admin.css */
}

.lotto-lottery-logo[onerror] {
    opacity: 0.5;
    display: none; /* Consistent with admin.css */
}

.lotto-lottery-card h2 {
    color: #0073aa; /* From admin.css */
    margin: 0;
    font-size: 1.8em;
    flex-grow: 1;
    font-weight: 700;
}

.lotto-view-all {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px; /* From admin.css */
    padding: 8px 16px;
    border: 1px solid #ddd; /* Aligned with admin inputs */
    border-radius: 4px;
    background: #fff;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.lotto-view-all:hover,
.lotto-view-all:focus {
    background-color: #0073aa;
    color: #fff;
    transform: translateY(-2px); /* From admin button hover */
    outline: none;
    box-shadow: 0 0 0 1px #0073aa; /* Focus state from admin.css */
}

.lotto-game-card {
    background: #fff;
    padding: 20px;
    border-radius: 4px; /* From admin.css */
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lotto-game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.lotto-game-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.lotto-game-logo {
    max-width: 120px;
    height: auto;
    border-radius: 4px; /* From admin.css */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease;
}

.lotto-game-logo[onerror] {
    opacity: 0.5;
    display: none; /* Consistent with admin.css */
}

.lotto-game-card h3 {
    color: #23282d;
    margin: 0;
    font-size: 1.5em;
    flex-grow: 1;
    font-weight: 600;
}

.lotto-results-numbers {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 15px 0;
}

.lotto-number-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    margin: 5px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.5s ease-out;
}

.lotto-number-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

/* Append to assets/css/frontend.css */
.lotto-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.lotto-modal-overlay.active {
    display: block;
}

.lotto-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.lotto-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.lotto-loading {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    color: #666;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.lotto-no-results {
    color: #dc3232; /* From admin.css error */
    text-align: center;
    margin: 15px 0;
    font-size: 14px; /* From admin.css */
    font-weight: 500;
}

.error {
    color: #dc3232;
    font-style: italic;
    margin-top: 15px;
    text-align: center;
    font-size: 14px; /* From admin.css */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .lotto-stats-container {
        padding: 15px;
        margin: 10px auto;
    }

    .lotto-stats-container h1 {
        font-size: 20px; /* Adjusted for smaller screens */
    }

    .lotto-results-grid {
        grid-template-columns: 1fr;
    }

    .lotto-date-picker {
        width: 100%;
        max-width: 200px;
    }

    .lotto-lottery-header,
    .lotto-game-header {
        flex-direction: column;
        text-align: center;
    }

    .lotto-lottery-logo,
    .lotto-game-logo {
        max-width: 120px;
    }

    .lotto-lottery-card h2,
    .lotto-game-card h3 {
        font-size: 1.3em;
    }

    .lotto-number-circle {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .lotto-date-search label {
        display: block;
        margin-bottom: 10px;
    }

    .lotto-lottery-logo,
    .lotto-game-logo {
        max-width: 100px;
    }

    .lotto-number-circle {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    /* Append to assets/css/frontend.css */
.lotto-lotteries, .lotto-games, .lotto-recent-results {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    margin: 20px 0;
}

.lotto-lottery, .lotto-game, .lotto-result {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.lotto-lottery:hover, .lotto-game:hover, .lotto-result:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.lotto-lottery img, .lotto-game img {
    max-width: 100px;
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px;
}

.lotto-lottery h3, .lotto-game h3, .lotto-result h3 {
    font-size: 16px;
    margin: 0 0 10px;
    color: #23282d;
}

.lotto-result p {
    margin: 0;
    font-size: 14px;
    color: #666;
}
    
    /* Add to assets/css/frontend.css */
.lotto-adsense {
    margin: 20px 0;
    text-align: center;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lotto-adsense ins {
    display: block;
    margin: 0 auto;
}
}

/* Base styles remain as previously defined */

/* Style Variations */
.lotto-style-classic .lotto-stats-container {
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.lotto-style-classic .lotto-lottery-card,
.lotto-style-classic .lotto-game-card {
    background: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.lotto-style-classic .lotto-number-circle {
    background: #333;
    color: #fff;
    border: 2px solid #fff;
}

.lotto-style-modern .lotto-stats-container {
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    border: none;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.lotto-style-modern .lotto-lottery-card,
.lotto-style-modern .lotto-game-card {
    background: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.lotto-style-modern .lotto-number-circle {
    background: #0073aa;
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.lotto-style-minimal .lotto-stats-container {
    background: #fff;
    border: none;
    box-shadow: none;
}

.lotto-style-minimal .lotto-lottery-card,
.lotto-style-minimal .lotto-game-card {
    background: transparent;
    border-bottom: 1px solid #eee;
    border-radius: 0;
    box-shadow: none;
    padding: 10px 0;
}

.lotto-style-minimal .lotto-number-circle {
    background: transparent;
    color: #333;
    border: 1px solid #333;
    font-weight: normal;
}

.lotto-style-bold .lotto-stats-container {
    background: #1a1a1a;
    color: #fff;
    border: 2px solid #ffcc00;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.lotto-style-bold .lotto-lottery-card,
.lotto-style-bold .lotto-game-card {
    background: #333;
    color: #fff;
    border: 2px solid #ffcc00;
    border-radius: 6px;
}

.lotto-style-bold .lotto-number-circle {
    background: #ffcc00;
    color: #1a1a1a;
    font-size: 24px;
    font-weight: bold;
    border: 3px solid #fff;
}

/* Ensure other elements adapt */
.lotto-style-bold h1,
.lotto-style-bold h2,
.lotto-style-bold h3 {
    color: #ffcc00;
}

.lotto-style-bold .lotto-view-all {
    color: #ffcc00;
    border-color: #ffcc00;
}

.lotto-style-bold .lotto-view-all:hover,
.lotto-style-bold .lotto-view-all:focus {
    background: #ffcc00;
    color: #1a1a1a;
}

/* Ensure consistency with admin.css transitions */
* {
    transition: all 0.3s ease; /* From admin.css */
}