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

body {
    font-family: Arial, Helvetica, sans-serif;
    color: #333333;
    font-size: 13px;
    line-height: 1.4;
    background-color: #ffffff;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 10px;
}


.header-main {
    padding: 10px 0;
    background: #ffffff;
}

.header-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sphere-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffb74d, #f57c00 60%, #e65100 100%);
    box-shadow: inset -2px -2px 4px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.15);
}

.brand-title {
    font-size: 26px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.5px;
}

.txt-blue { color: #0288d1; }
.txt-red { color: #d32f2f; margin-left: 4px; }
.txt-orange { color: #f57c00; }
.txt-sm { font-size: 14px; color: #555555; }

.header-banner {
    flex: 1;
    max-width: 600px;
    background: linear-gradient(90deg, #00897b, #1976d2);
    border-radius: 4px;
    padding: 8px 14px;
    color: #ffffff;
}

.banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.lotto-chip {
    background: #4caf50;
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
}

.banner-headline strong {
    font-size: 13px;
    display: block;
    color: #fff9c4;
}

.banner-headline small {
    font-size: 10px;
    opacity: 0.9;
}

.btn-play-yellow {
    background: #ffeb3b;
    color: #c62828;
    border: none;
    padding: 6px 12px;
    font-weight: 800;
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
}

/* Nav Menu */
.main-nav {
    background-color: #2b5f9e;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links-scroll {
    display: flex;
    flex-wrap: wrap;
}

.main-nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 11px;
    padding: 9px 11px;
    display: inline-block;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.main-nav a:hover {
    background-color: #1e4575;
}

.main-nav a.nav-keno {
    background-color: #f57c00;
}

.hotline-badge {
    background-color: #f57c00;
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    padding: 9px 14px;
    white-space: nowrap;
}

/* 2-Column Grid Layout */
.layout-main {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
    margin-top: 15px;
    margin-bottom: 30px;
}

/* Sidebar Panels */
.panel-box {
    border: 1px solid #d0d7de;
    border-radius: 4px;
    background-color: #ffffff;
    overflow: hidden;
}

.panel-head-blue {
    background-color: #2b5f9e;
    color: #ffffff;
    font-weight: bold;
    font-size: 12px;
    padding: 7px 12px;
    text-align: center;
}

.panel-list {
    list-style: none;
}

.panel-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
}

.badge-plus {
    background: #4caf50;
    color: #ffffff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 12px;
}

.map-banner {
    margin-top: 15px;
    height: 170px;
    background: #ffecb3 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><path d="M0 30 L60 30 M30 0 L30 60" stroke="%23ffe082" stroke-width="2"/></svg>');
    border: 1px solid #ffe082;
    border-radius: 4px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.map-overlay h3 {
    color: #d32f2f;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.map-overlay span {
    color: #c62828;
    font-size: 22px;
}

.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }

.news-vertical-list {
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.news-card-mini {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 4px;
    border-bottom: 1px dashed #f0f0f0;
}

.thumb-box {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.bg-purple { background: #7b1fa2; }
.bg-yellow { background: #fbc02d; color: #000; }
.bg-orange { background: #f57c00; }
.bg-green { background: #388e3c; }
.bg-red { background: #d32f2f; }

.news-card-mini a {
    color: #0d47a1;
    font-size: 11px;
    font-weight: bold;
    text-decoration: none;
    line-height: 1.3;
}

.news-card-mini a:hover {
    text-decoration: underline;
}

.panel-down-arrow {
    text-align: center;
    background: #ff9800;
    color: #ffffff;
    font-size: 10px;
    padding: 3px;
    cursor: pointer;
}

/* Main Content Area */
.lottery-card {
    border: 1px solid #d0d7de;
    border-radius: 4px;
    overflow: hidden;
}

.card-meta-header {
    background-color: #f5f5f5;
    color: #333333;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    padding: 7px;
    border-bottom: 1px solid #e0e0e0;
}

.lottery-statistics {
    width: 100%;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.result-table th, 
.result-table td {
    border: 1px solid #e0e0e0;
    padding: 7px 6px;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
}

.result-table th {
    background: #f7f7f7;
}

.col-prize {
    width: 110px;
    background-color: #fafafa;
    color: #333333;
}

.text-red-bold {
    color: #d32f2f;
    font-size: 14px;
    font-weight: 800;
}

.text-bold {
    color: #222222;
    font-weight: 800;
}

/* MAX3D PRO Panel */
.max3d-panel {
    border: 1px solid #d0d7de;
    border-radius: 4px;
    overflow: hidden;
}

.max3d-header {
    background-color: #880e4f;
    color: #ffffff;
    text-align: center;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.max3d-logo {
    background: #d81b60;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 900;
    font-size: 12px;
}

.max3d-header strong {
    font-size: 13px;
    letter-spacing: 0.5px;
}

.max3d-header small {
    font-size: 10px;
    opacity: 0.9;
}

.max3d-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.max3d-table th, 
.max3d-table td {
    border: 1px solid #e0e0e0;
    padding: 6px 8px;
    text-align: center;
}

.max3d-table th {
    background: #fafafa;
    font-size: 11px;
    color: #555555;
}

.ball-group {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.ball-purple, .ball-gray {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 11px;
    font-weight: bold;
    color: #ffffff;
}

.ball-purple { background: #880e4f; }
.ball-gray { background: #9e9e9e; }

.text-magenta { color: #c2185b; }
.text-left { text-align: left !important; }
.row-beige td { background-color: #fff8e1; }


.history-block {
    border: 1px solid #d0d7de;
    border-radius: 4px;
    overflow: hidden;
}

.history-filter-bar {
    background: #f5f5f5;
    padding: 6px 10px;
    border-bottom: 1px solid #e0e0e0;
}

#datePickerHistory {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

/* Spinner Loader */
.loading {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    border-top: 2px solid #0288d1;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

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


.footer-orange {
    background-color: #f57c00;
    color: #ffffff;
    text-align: center;
    padding: 10px 0;
    font-size: 11px;
}


@media (max-width: 860px) {
    .layout-main {
        grid-template-columns: 1fr;
    }
    .header-grid {
        flex-direction: column;
        align-items: flex-start;
    }
    .header-banner {
        width: 100%;
    }
}