/**
 * Webest XS Main Styles - Inspired by DEMO
 * 
 */

:root {
    --primary-red: #d9230f;
    --dark-red: #ba1f12;
    --special-red: #ed1c23;
    --gold-bg: #fcf2c1;
    --border-gray: #d8d7d7;
    --bg-light: #f4f4f4;
    --text-dark: #333333;
    --text-muted: #666666;
    --nav-bg: #d9230f;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-light);
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text-dark);
    line-height: 1.5;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.site-header {
    background: var(--nav-bg);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    height: 50px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    margin-right: 20px;
    text-transform: uppercase;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    margin-left: auto;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background: #fff;
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* Toggle Animation */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
}

/* Navigation */
.main-nav .nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav .nav-list li {
    position: relative;
}

.main-nav .nav-list li a {
    color: #fff;
    text-decoration: none;
    padding: 0 15px;
    height: 50px;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 700;
    transition: background 0.3s ease;
}

.main-nav .nav-list li a:hover,
.main-nav .nav-list li:hover>a,
.main-nav .nav-list li.current-menu-item a {
    background-color: var(--dark-red);
}

/* Sub-menu (Dropdown) */
.main-nav .nav-list li .sub-menu {
    position: absolute;
    top: 50px;
    left: 0;
    min-width: 200px;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 0;
    margin: 0;
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 999;
}

.main-nav .nav-list li:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav .nav-list .sub-menu li a {
    color: var(--text-dark);
    height: auto;
    padding: 12px 15px;
    background: transparent;
    font-weight: 500;
}

.main-nav .nav-list .sub-menu li a:hover {
    background-color: #f9f9f9;
    color: var(--primary-red);
}

/* Indicator for items with children */
.menu-item-has-children>a::after {
    content: "▼";
    font-size: 0.6rem;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.menu-item-has-children:hover>a::after {
    transform: rotate(180deg);
}

/* Regional Opening Table */
.opening-grid {
    margin-bottom: 25px;
}

.opening-table {
    width: 100%;
    border-collapse: collapse;
}

.opening-table td {
    border: 1px solid #eee;
    padding: 12px;
    text-align: center;
    width: 33.33%;
}

.opening-table td a {
    color: #0056b3;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.opening-table td a:hover {
    text-decoration: underline;
}

/* Lottery Result Box Modernization */
.result-box {
    background: #fff;
    border: 1px solid #ddd;
    margin-bottom: 30px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    width: 100%;
    clear: both;
}

.lottery-item {
    display: block;
    width: 100%;
    clear: both;
}

.result-header {
    background-color: #fcf2c1;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.result-header h2 {
    font-size: 1rem;
    color: #d9230f;
    text-align: center;
    text-transform: uppercase;
    font-weight: 700;
    margin: 0;
}

.result-table,
.stats-table {
    width: 100%;
    border-collapse: collapse;
}

.result-table td {
    border: 1px solid #eee;
    padding: 12px;
    text-align: center;
    vertical-align: middle;
}

.label-cell {
    width: 70px;
    background-color: #f8f9fa;
    font-weight: 700;
    color: #444;
    font-size: 0.85rem;
}

.value-cell {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

.db-row .value-cell {
    font-size: 2rem;
    color: #ed1c23;
}

.g7-row .value-cell {
    color: #ed1c23;
    font-size: 1.35rem;
}

/* Stats Section Modernization */
.stats-container {
    padding: 20px;
    background: #fff;
    border-top: 1px solid #eee;
}

.stats-header {
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    font-size: 0.95rem;
    text-align: center;
    text-transform: uppercase;
}

.stats-table th,
.stats-table td {
    border: 1px solid #eee;
    padding: 8px;
    font-size: 0.85rem;
}

.stats-table th {
    background: #f8f9fa;
    font-weight: 700;
    color: #555;
}

.stat-label {
    width: 40px;
    font-weight: 700;
    color: #d9230f;
    background: #fdfceb;
    text-align: center !important;
}

.stat-vals {
    text-align: left !important;
    padding-left: 12px !important;
    letter-spacing: 1px;
}

.webest-loading-dots {
    display: inline-block;
}

.webest-loading-box {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 24px;
    margin: 0;
}

.webest-loading {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Layout */
.site-main {
    padding: 30px 0;
    min-height: 70vh;
}

.main-wrapper {
    display: flex;
    flex-direction: row;
    gap: 30px;
    align-items: flex-start;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 70px;
}

/* Sidebar Widgets */
.widget {
    background: #fff;
    border: 1px solid var(--border-gray);
    margin-bottom: 25px;
    padding: 15px;
    border-radius: 4px;
}

.widget-title {
    font-size: 1rem;
    color: var(--primary-red);
    border-bottom: 2px solid var(--primary-red);
    padding-bottom: 8px;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-weight: 700;
}

.lottery-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lottery-sidebar-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f2f2f2;
}

.lottery-sidebar-list li a {
    text-decoration: none;
    color: #444;
    font-size: 0.9rem;
    display: block;
    transition: all 0.2s ease;
}

.lottery-sidebar-list li a:hover {
    color: var(--primary-red);
    padding-left: 8px;
}

.util-list li a {
    font-weight: 600;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 10px 0;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-gray);
}

.breadcrumbs a {
    color: var(--text-dark);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--primary-red);
    text-decoration: underline;
}

.breadcrumbs .sep {
    margin: 0 5px;
    color: #ccc;
}

.breadcrumbs .current {
    color: var(--text-muted);
}

/* Day Navigator (Regional) */
.day-navigator {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.day-btn {
    background: #f1f1f1;
    color: #333;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    border: 1px solid #ddd;
}

.day-btn.active {
    background: var(--dark-red);
    color: #fff;
    border-color: var(--dark-red);
}

/* Day Navigator in Content (Tabs) */
.content-nav {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 25px;
    padding: 10px 0;
    border-bottom: 2px solid #eee;
    overflow-x: auto;
}

.content-nav a {
    padding: 8px 16px;
    text-decoration: none;
    color: #666;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 4px;
    background: #fff;
    border: 1px solid #ddd;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.content-nav a:hover,
.content-nav a.active {
    background: var(--primary-red);
    border-color: var(--primary-red);
    color: #fff;
    box-shadow: 0 4px 8px rgba(217, 35, 15, 0.2);
}

/* Footer */
.site-footer {
    background: #333;
    color: #ccc;
    padding: 40px 0;
    text-align: center;
    margin-top: 30px;
}

@media (max-width: 991px) {
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #fff;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        padding: 70px 20px;
        z-index: 1000;
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav .nav-list {
        flex-direction: column;
    }

    .main-nav .nav-list li a {
        color: var(--text-dark);
        height: auto;
        padding: 15px 0;
        border-bottom: 1px solid #eee;
    }

    .main-nav .nav-list li .sub-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        padding-left: 20px;
        background: #fcfcfc;
    }

    .main-nav .nav-list li.menu-item-has-children.active>.sub-menu {
        display: block;
    }

    .main-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
    }
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-outline-danger {
    display: inline-block;
    padding: 10px 25px;
    background-color: #fff;
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
    text-decoration: none;
    font-weight: 700;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-outline-danger:hover {
    background-color: var(--primary-red);
    color: #fff;
    box-shadow: 0 4px 10px rgba(217, 35, 15, 0.3);
}

/* UTILITIES FOR OPTIMIZED THEME */
.keno-ball {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    background: var(--special-red);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.no-data-msg {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
    font-style: italic;
    background: #fff;
    border-radius: 8px;
    border: 1px dashed var(--border-gray);
}

.lottery-main-title {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--primary-red);
    text-transform: uppercase;
    font-weight: 800;
}

/* Max 3D / Pro Styles */
.max3d-table-container {
    overflow-x: auto;
    border-radius: 4px;
    margin-bottom: 20px;
}

.max3d-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    color: #333;
}

.max3d-table th {
    background: #f3f4f6;
    font-weight: 700;
    color: #374151;
    padding: 12px;
    border: 1px solid #e5e7eb;
    text-align: center;
    vertical-align: middle;
}

.max3d-table td {
    padding: 12px;
    border: 1px solid #e5e7eb;
    text-align: center;
    vertical-align: middle;
}

.max3d-table .prize-name {
    font-weight: 700;
    font-size: 14px;
    color: #374151;
}

.max3d-table .prize-db-name {
    color: #dc2626;
    font-style: italic;
    font-weight: 700;
}

.max3d-table .result-cell {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

.max3d-number {
    font-weight: 900;
    font-size: 20px;
    color: #111827;
    letter-spacing: 1px;
}

.max3d-number-red {
    color: #dc2626;
    font-size: 24px;
}

.max3d-flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.max3d-col-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.max3d-value {
    font-weight: 700;
    color: #dc2626;
    font-size: 14px;
}

.max3d-count {
    font-weight: 600;
}

/* Max 3D Plus Section */
.max3d-plus-title {
    font-size: 18px;
    font-weight: 900;
    color: #111827;
    border-left: 4px solid #dc2626;
    padding-left: 12px;
    margin: 24px 0 16px;
}

.max3d-desc-cell {
    text-align: left !important;
    padding-left: 20px !important;
    color: #4b5563;
    font-size: 13px;
}