/* Lottery Index & Show Styles */

/* Container */
.lottery-container {
    /* max-width: 1200px; */
    margin: 20px auto;
    /* padding: 0 20px; */
}

/* Breadcrumb */
.lottery-breadcrumb {
    margin-bottom: 15px;
}

.lottery-breadcrumb ol {
    background: transparent;
    padding: 0;
    margin: 0;
}

.lottery-breadcrumb a {
    color: var(--primary-color, #f58b1f);
    text-decoration: none;
}

.lottery-breadcrumb .active {
    color: var(--text-secondary);
}

/* Header */
.lottery-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 32px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.lottery-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(245, 139, 31, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.lottery-header-icon {
    font-size: 48px;
    margin-bottom: 16px;
    color: #f58b1f;
    opacity: 0.9;
}

.lottery-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: white;
    letter-spacing: -0.5px;
}

.lottery-header-subtitle {
    font-size: 16px;
    margin: 0 0 24px 0;
    opacity: 0.85;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.lottery-header-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.lottery-metric {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.2s ease, background 0.2s ease;
}

.lottery-metric:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
}

.metric-icon {
    font-size: 28px;
    color: #f58b1f;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 139, 31, 0.2);
    border-radius: 10px;
}

.metric-content {
    flex: 1;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin-bottom: 4px;
}

.metric-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filter Form */
.lottery-filter {
    background: white;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.lottery-filter form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    align-items: end;
}

.lottery-filter label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 13px;
}

.lottery-filter input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.lottery-filter button {
    background: var(--primary-color, #f58b1f);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    font-size: 14px;
}

.lottery-filter .clear-filter {
    display: block;
    text-align: center;
    background: #f5f5f5;
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

/* Results List */
.lottery-results-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--text-primary);
}

.lottery-results-list {
    display: grid;
    gap: 20px;
}

.lottery-result-card {
    background: white;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.lottery-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color, #f58b1f);
}

.lottery-result-date {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.lottery-result-date a {
    color: var(--primary-color, #f58b1f);
    text-decoration: none;
}

.lottery-result-link {
    background: var(--primary-color, #f58b1f);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
}

/* Desktop Table */
.lottery-table-desktop {
    overflow-x: auto;
}

.lottery-table-desktop table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border: 1px solid #e0e0e0;
}

.lottery-table-desktop thead {
    background: #f8f9fa;
}

.lottery-table-desktop th {
    padding: 12px;
    text-align: center;
    border: 1px solid #e0e0e0;
    font-weight: 600;
    color: var(--text-primary);
    background: white;
}

.lottery-table-desktop td {
    padding: 15px;
    text-align: center;
    border: 1px solid #e0e0e0;
    vertical-align: top;
}

.lottery-table-desktop .number-item {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.lottery-table-desktop .number-item.dac-biet {
    font-size: 20px;
    font-weight: 700;
    color: #e74c3c;
}

.lottery-table-desktop .number-item.nhat {
    font-size: 18px;
    font-weight: 700;
}

.lottery-table-desktop .number-item.other {
    font-size: 15px;
}

.lottery-table-desktop .last-two {
    background: #ffeb3b;
    color: #000;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 700;
}

.lottery-table-desktop .empty {
    color: #ccc;
}

/* Mobile Table */
.lottery-table-mobile {
    display: none;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.lottery-table-mobile table {
    width: 100%;
    max-width: 100vw;
    border-collapse: collapse;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
    border: 1px solid #b3d9ff;
    margin: 0;
    table-layout: auto;
}

.lottery-table-mobile thead {
    background: #e6f2ff;
}

.lottery-table-mobile th {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    color: #333;
    border: 1px solid #b3d9ff;
    font-size: 14px;
}

.lottery-table-mobile td {
    padding: 10px 8px;
    border: 1px solid #b3d9ff;
    text-align: center;
    font-size: 13px;
}

.lottery-table-mobile td:first-child {
    width: 55px;
    min-width: 55px;
    text-align: center;
    background: #f0f0f0;
    font-weight: 600;
    color: #333;
}

.lottery-table-mobile .number-mobile {
    font-weight: 600;
    color: #333;
}

.lottery-table-mobile .number-mobile.dac-biet {
    color: #e74c3c;
    font-size: 15px;
}

.lottery-table-mobile .number-mobile.nhat {
    font-size: 14px;
}

.lottery-table-mobile .last-two-mobile {
    background: #ffeb3b;
    color: #000;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 700;
}

.lottery-table-mobile .empty-mobile {
    color: #999;
}

.lottery-table-mobile tr:nth-child(even) {
    background: #f5f5f5;
}

.lottery-table-mobile tr:nth-child(odd) {
    background: white;
}

/* Pagination */
.lottery-pagination {
    margin-top: 20px;
}

/* Empty State */
.lottery-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.lottery-empty p {
    font-size: 16px;
    margin: 0 0 8px 0;
}

.lottery-empty p:last-child {
    font-size: 14px;
    margin: 0;
}

/* SEO Article */
.lottery-seo-article {
    background: white;
    padding: 30px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    margin-top: 40px;
}

.lottery-seo-article h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: var(--text-primary);
}

.lottery-seo-content {
    line-height: 1.9;
    color: var(--text-primary);
    font-size: 16px;
    position: relative;
}

.lottery-seo-collapsed {
    max-height: 9.5em;
    overflow: hidden;
    position: relative;
    margin-bottom: 0;
}

.lottery-seo-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), white);
    pointer-events: none;
}

.lottery-seo-expanded {
    display: none;
}

.lottery-seo-toggle {
    text-align: center;
    margin-top: 20px;
}

.lottery-seo-btn {
    background: linear-gradient(135deg, var(--primary-color, #f58b1f) 0%, var(--primary-hover, #e67e22) 100%);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(245, 139, 31, 0.3);
}

.lottery-seo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(245, 139, 31, 0.4);
}

/* FAQ */
.lottery-faq {
    background: white;
    padding: 30px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    margin-top: 40px;
}

.lottery-faq h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: var(--text-primary);
}

.lottery-faq-list {
    display: grid;
    gap: 10px;
}

.lottery-faq-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.lottery-faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 15px 20px;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.lottery-faq-question:hover {
    background-color: #f9f9f9;
}

.lottery-faq-icon {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color, #f58b1f);
}

.lottery-faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #fdfdfd;
}

.lottery-faq-answer p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
    margin: 0;
    padding-bottom: 15px;
}

/* SEO Article Content Styles */
.lottery-seo-article p {
    margin-bottom: 20px;
}

.lottery-seo-article p:last-child {
    margin-bottom: 0;
}

.lottery-seo-article h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 25px 0 15px 0;
    color: var(--text-primary);
}

.lottery-seo-article ul {
    margin-bottom: 20px;
    padding-left: 25px;
}

.lottery-seo-article li {
    margin-bottom: 10px;
}

#seo-content-full {
    margin-bottom: 0;
}

/* FAQ Additional Styles */
.faq-item {
    border-bottom: 1px solid #e0e0e0;
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.faq-question:hover {
    background-color: #f9f9f9;
}

.faq-question h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    flex: 1;
}

.faq-icon {
    font-size: 20px;
    color: var(--primary-color, #f58b1f);
    font-weight: bold;
    margin-left: 15px;
    transition: transform 0.3s;
}

.faq-icon.active {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 20px 20px 20px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: none;
}

.faq-answer.active {
    display: block;
}

.faq-answer p {
    margin-bottom: 15px;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* Show Page Specific */
.lottery-show-header {
    background: var(--primary-color, #f58b1f);
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    color: white;
    text-align: center;
}

.lottery-show-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: white;
}

.lottery-show-nav {
    margin-bottom: 15px;
}

.lottery-show-nav a {
    color: var(--primary-color, #f58b1f);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.lottery-show-nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.lottery-show-nav-link {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    text-decoration: none;
    color: var(--text-primary);
    text-align: center;
    font-size: 14px;
}

.lottery-show-results {
    background: white;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.lottery-show-results h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: var(--text-primary);
}

/* Matrix Table */
.lottery-matrix {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.lottery-matrix h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: var(--text-primary);
}

.lottery-matrix-table {
    overflow-x: auto;
}

.lottery-matrix-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin: 0 auto;
    max-width: 600px;
}

.lottery-matrix-table thead {
    background: #f8f9fa;
}

.lottery-matrix-table th {
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    font-weight: 600;
    color: var(--text-primary);
    width: 40px;
}

.lottery-matrix-table th:not(:first-child) {
    width: 50px;
    text-align: center;
}

.lottery-matrix-table td {
    padding: 10px 8px;
    border: 1px solid #e0e0e0;
    text-align: center;
    font-size: 13px;
}

.lottery-matrix-table td:first-child {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

/* Matrix Colors */
.lottery-matrix-dac-biet {
    background: #ffebee !important;
    color: #e74c3c !important;
    font-weight: 700 !important;
}

.lottery-matrix-nhat {
    background: #e3f2fd !important;
    color: #3498db !important;
    font-weight: 700 !important;
}

.lottery-matrix-nhi {
    background: #f3e5f5 !important;
    color: #9b59b6 !important;
    font-weight: 600 !important;
}

.lottery-matrix-ba {
    background: #fff8e1 !important;
    color: #f39c12 !important;
    font-weight: 600 !important;
}

.lottery-matrix-tu {
    background: #e8f5e9 !important;
    color: #27ae60 !important;
    font-weight: 600 !important;
}

.lottery-matrix-nam {
    background: #eceff1 !important;
    color: #34495e !important;
    font-weight: 600 !important;
}

.lottery-matrix-sau {
    background: #ffebee !important;
    color: #e74c3c !important;
    font-weight: 600 !important;
}

.lottery-matrix-bay {
    background: #f5f5f5 !important;
    color: #7f8c8d !important;
    font-weight: 600 !important;
}

.lottery-matrix-empty {
    background: #ffffff !important;
    color: #999999 !important;
    font-weight: 400 !important;
}

/* Matrix Legend */
.lottery-matrix-legend {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    font-size: 12px;
}

.lottery-matrix-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lottery-matrix-legend-box {
    width: 20px;
    height: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
}

.lottery-matrix-legend-text {
    color: var(--text-secondary);
}

/* Summary */
.lottery-summary {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.lottery-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.lottery-summary-item {
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
}

.lottery-summary-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.lottery-summary-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.lottery-summary-value.primary {
    color: var(--primary-color, #f58b1f);
}

.lottery-summary-value.blue {
    color: #3498db;
}

/* Analysis */
.lottery-analysis {
    background: white;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.lottery-analysis h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--text-primary);
}

.lottery-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.lottery-analysis-item {
    padding: 16px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.lottery-analysis-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.lottery-analysis-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .lottery-table-desktop {
        display: none !important;
    }
    
    .lottery-table-mobile {
        display: block !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: auto !important;
    }
    
    .lottery-table-mobile table {
        width: 100% !important;
        max-width: 100vw !important;
        font-size: 13px !important;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
        table-layout: auto !important;
    }
    
    .lottery-table-mobile td:first-child {
        width: 55px !important;
        min-width: 55px !important;
        max-width: 55px !important;
    }
    
    .lottery-table-mobile td:not(:first-child) {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
    }
    
    .lottery-table-mobile td {
        white-space: nowrap !important;
    }
}

@media (min-width: 769px) {
    .lottery-table-desktop {
        display: block !important;
    }
    
    .lottery-table-mobile {
        display: none !important;
    }
}

/* Today Result Section */
.lottery-today-result {
    background: white;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.lottery-today-result h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: var(--text-primary);
}

/* Loading Spinner */
.lottery-loading {
    text-align: center;
    padding: 40px 20px;
}

.lottery-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color, #f58b1f);
    border-radius: 50%;
    animation: lottery-spin 1s linear infinite;
    margin-bottom: 20px;
}

.lottery-loading p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

.lottery-loading p:last-child {
    font-size: 14px;
    margin: 8px 0 0 0;
}

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

/* Table Styles - Common */
.lottery-table-desktop table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border: 1px solid #e0e0e0;
}

.lottery-table-desktop thead tr {
    background: #f8f9fa;
}

.lottery-table-desktop thead tr.primary-header {
    background: var(--primary-color, #f58b1f);
    color: white;
}

.lottery-table-desktop th {
    padding: 12px;
    text-align: center;
    border: 1px solid #e0e0e0;
    font-weight: 600;
    color: var(--text-primary);
    background: white;
    white-space: nowrap;
}

.lottery-table-desktop thead tr.primary-header th {
    padding: 10px;
    border: 1px solid #ddd;
    color: white;
    background: var(--primary-color, #f58b1f);
}

.lottery-table-desktop tbody tr {
    background: white;
}

.lottery-table-desktop td {
    padding: 15px;
    text-align: center;
    border: 1px solid #e0e0e0;
    vertical-align: top;
}

.lottery-number-dac-biet {
    font-size: 20px;
    font-weight: 700;
    color: #e74c3c;
}

.lottery-number-nhat {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.lottery-number-other {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.lottery-number-nhi {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.lottery-last-two {
    background: #ffeb3b;
    color: #000;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 700;
}

.lottery-last-two-mobile {
    background: #ffeb3b;
    color: #000;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 700;
}

.lottery-empty-cell {
    color: #ccc;
}

.lottery-empty-cell-mobile {
    color: #999;
}

/* Mobile Table Styles */
.lottery-table-mobile table {
    width: 100%;
    max-width: 100vw;
    border-collapse: collapse;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
    border: 1px solid #b3d9ff;
    margin: 0;
    table-layout: auto;
}

.lottery-table-mobile thead tr {
    background: #e6f2ff;
}

.lottery-table-mobile th {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    color: #333;
    border: 1px solid #b3d9ff;
    font-size: 14px;
}

.lottery-table-mobile tbody tr:nth-child(odd) {
    background: white;
}

.lottery-table-mobile tbody tr:nth-child(even) {
    background: #f5f5f5;
}

/* Giải Ba và Giải Năm có 2 hàng, đảm bảo hàng 2 có cùng màu với hàng 1 */
.lottery-table-mobile tbody tr:has(td[rowspan="2"]) + tr {
    background: inherit;
}

/* Màu cho giải Ba - hàng 1 và hàng 2 */
.lottery-table-mobile tbody tr.ba-row-1 {
    background: #f5f5f5 !important;
}

.lottery-table-mobile tbody tr.ba-row-1 td {
    background: #f5f5f5 !important;
}

/* Hoặc sử dụng cách khác: hàng 2 của giải Ba */
.lottery-table-mobile tbody tr.ba-row-2 {
    background: #f5f5f5;
}

.lottery-table-mobile tbody tr.ba-row-2 td {
    background: #f5f5f5 !important;
}

/* Màu xen kẽ cho các hàng giải 4, 5, 6, 7 */
.lottery-table-mobile tbody tr.tu-row {
    background: white !important;
}

.lottery-table-mobile tbody tr.tu-row td {
    background: white !important;
}

.lottery-table-mobile tbody tr.nam-row-1 {
    background: #f5f5f5 !important;
}

.lottery-table-mobile tbody tr.nam-row-1 td {
    background: #f5f5f5 !important;
}

.lottery-table-mobile tbody tr.nam-row-2 {
    background: #f5f5f5 !important;
}

.lottery-table-mobile tbody tr.nam-row-2 td {
    background: #f5f5f5 !important;
}

.lottery-table-mobile tbody tr.sau-row {
    background: white !important;
}

.lottery-table-mobile tbody tr.sau-row td {
    background: white !important;
}

.lottery-table-mobile tbody tr.bay-row {
    background: #f5f5f5 !important;
}

.lottery-table-mobile tbody tr.bay-row td {
    background: #f5f5f5 !important;
}

.lottery-table-mobile td {
    padding: 10px 8px;
    border: 1px solid #b3d9ff;
    text-align: center;
    font-size: 13px;
}

.lottery-table-mobile td.prize-label {
    width: 55px;
    min-width: 55px;
    font-weight: 600;
    background: #f0f0f0;
    color: #333;
}

.lottery-table-mobile td.prize-label-rowspan {
    vertical-align: middle;
}

.lottery-number-mobile {
    font-weight: 600;
    color: #333;
}

.lottery-number-mobile.dac-biet {
    color: #e74c3c;
    font-size: 15px;
}

.lottery-number-mobile.nhat {
    font-size: 14px;
}
.bg-white {
    background-color: white !important;
}

/* Tần suất ra số 2 số cuối */
.lottery-frequency {
    background: var(--bg-primary, white);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color, #e0e0e0);
}

.lottery-frequency h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary, #333);
    margin-bottom: 12px;
}

.lottery-frequency-content {
    margin-top: 24px;
}

.lottery-frequency-section {
    margin-bottom: 40px;
}

.lottery-frequency-section:last-child {
    margin-bottom: 0;
}

.lottery-frequency-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary, #333);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color, #f58b1f);
}

.lottery-frequency-toggle {
    text-align: center;
    margin-top: 20px;
}

.lottery-frequency-toggle-btn {
    background: linear-gradient(135deg, var(--primary-color, #f58b1f) 0%, var(--primary-hover, #e67e22) 100%);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(245, 139, 31, 0.3);
}

.lottery-frequency-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(245, 139, 31, 0.4);
}

.lottery-frequency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.lottery-frequency-item {
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid var(--border-color, #e0e0e0);
    transition: all 0.3s ease;
}

.lottery-frequency-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lottery-frequency-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color, #f58b1f);
    text-align: center;
    margin-bottom: 8px;
}

.lottery-frequency-count {
    font-size: 13px;
    color: var(--text-secondary, #666);
    text-align: center;
    margin-bottom: 8px;
}

.lottery-frequency-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-secondary, #e0e0e0);
    border-radius: 3px;
    overflow: hidden;
}

.lottery-frequency-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.lottery-frequency-table-wrapper {
    position: relative;
}

.lottery-frequency-table-collapsed {
    max-height: 280px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0;
}

.lottery-frequency-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), white);
    pointer-events: none;
}

.lottery-frequency-table-expanded {
    display: none;
}

.lottery-frequency-full-table {
    overflow-x: auto;
    margin-top: 16px;
}

.lottery-frequency-full-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.lottery-frequency-full-table thead {
    background: var(--primary-color, #f58b1f);
    color: white;
}

.lottery-frequency-full-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
}

.lottery-frequency-full-table tbody tr {
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    transition: background 0.2s ease;
}

.lottery-frequency-full-table tbody tr:hover {
    background: var(--bg-secondary, #f8f9fa);
}

.lottery-frequency-full-table tbody td {
    padding: 10px 12px;
    color: var(--text-primary, #333);
}

.lottery-frequency-full-table tbody td:first-child {
    font-weight: 600;
    color: var(--primary-color, #f58b1f);
    width: 60px;
}

.lottery-frequency-bar-inline {
    width: 100%;
    height: 20px;
    background: var(--bg-secondary, #e0e0e0);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.lottery-frequency-bar-inline .lottery-frequency-bar-fill {
    height: 100%;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .lottery-frequency {
        padding: 16px;
    }

    .lottery-frequency h2 {
        font-size: 20px;
    }

    .lottery-frequency-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }

    .lottery-frequency-item {
        padding: 8px;
    }

    .lottery-frequency-number {
        font-size: 18px;
    }

    .lottery-frequency-full-table {
        font-size: 12px;
    }

    .lottery-frequency-full-table th,
    .lottery-frequency-full-table td {
        padding: 8px;
    }
}

/* Internal Links - 5 ngày gần nhất */
.lottery-internal-links {
    background: var(--bg-primary, white);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color, #e0e0e0);
}

.lottery-internal-links h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary, #333);
    margin-bottom: 20px;
    text-align: center;
}

.lottery-internal-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.lottery-internal-link-item {
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color, #e0e0e0);
}

.lottery-internal-link-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color, #f58b1f);
}

.lottery-internal-link {
    display: block;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: all 0.3s ease;
}

.lottery-internal-link:hover {
    color: inherit;
}

.lottery-internal-link-date {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color, #f58b1f);
    margin-bottom: 8px;
    text-align: center;
}

.lottery-internal-link-day {
    font-size: 14px;
    color: var(--text-secondary, #666);
    margin-bottom: 12px;
    text-align: center;
    text-transform: capitalize;
}

.lottery-internal-link-special {
    background: linear-gradient(135deg, rgba(245, 139, 31, 0.1) 0%, rgba(230, 126, 34, 0.1) 100%);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
    text-align: center;
}

.lottery-internal-link-label {
    font-size: 12px;
    color: var(--text-secondary, #666);
    display: block;
    margin-bottom: 4px;
}

.lottery-internal-link-number {
    font-size: 20px;
    font-weight: 700;
    color: #e74c3c;
    display: block;
}

.lottery-internal-link-arrow {
    font-size: 13px;
    color: var(--primary-color, #f58b1f);
    text-align: center;
    font-weight: 600;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.lottery-internal-link-item:hover .lottery-internal-link-arrow {
    transform: translateX(4px);
    color: var(--primary-color, #f58b1f);
}

@media (max-width: 768px) {
    .lottery-internal-links {
        padding: 16px;
    }

    .lottery-internal-links h2 {
        font-size: 20px;
    }

    .lottery-internal-links-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .lottery-internal-link {
        padding: 14px;
    }

    .lottery-internal-link-date {
        font-size: 16px;
    }

    .lottery-internal-link-number {
        font-size: 18px;
    }
}

/* Internal Links List - Trang chi tiết */
.lottery-internal-links-list {
    background: var(--bg-primary, white);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color, #e0e0e0);
}

.lottery-internal-links-list h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary, #333);
    margin-bottom: 20px;
}

.lottery-internal-links-ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lottery-internal-links-ul li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.lottery-internal-links-ul li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.lottery-internal-link-item-list {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-primary, #333);
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 8px;
    border: 1px solid var(--border-color, #e0e0e0);
    transition: all 0.3s ease;
    font-size: 15px;
    line-height: 1.6;
}

.lottery-internal-link-item-list:hover {
    background: linear-gradient(135deg, rgba(245, 139, 31, 0.1) 0%, rgba(230, 126, 34, 0.1) 100%);
    border-color: var(--primary-color, #f58b1f);
    color: var(--primary-color, #f58b1f);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(245, 139, 31, 0.15);
}

.lottery-internal-link-item-list strong {
    color: #e74c3c;
    font-weight: 700;
}

@media (max-width: 768px) {
    .lottery-internal-links-list {
        padding: 16px;
    }

    .lottery-internal-links-list h2 {
        font-size: 20px;
    }

    .lottery-internal-link-item-list {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* AI Prediction Page */
.lottery-ai-warning {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border: 1px solid #ffc107;
    border-left: 4px solid #ff9800;
    border-radius: 10px;
    padding: 20px;
    margin: 24px 0;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.1);
}

.lottery-ai-warning-icon {
    font-size: 28px;
    color: #ff9800;
    flex-shrink: 0;
    background: rgba(255, 152, 0, 0.1);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.lottery-ai-warning-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: #856404;
    margin: 0 0 12px 0;
    letter-spacing: -0.2px;
}

.lottery-ai-warning-content p {
    color: #856404;
    margin: 0;
    line-height: 1.7;
    font-size: 14px;
}

.lottery-ai-prediction {
    background: var(--bg-primary, white);
    border-radius: 12px;
    padding: 32px;
    margin: 24px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color, #e0e0e0);
}

.lottery-ai-prediction-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.prediction-header-icon {
    font-size: 32px;
    color: #f58b1f;
    background: linear-gradient(135deg, rgba(245, 139, 31, 0.1) 0%, rgba(230, 126, 34, 0.1) 100%);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.lottery-ai-prediction h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary, #333);
    margin: 0 0 8px 0;
    letter-spacing: -0.3px;
}

.lottery-ai-prediction-info {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.lottery-ai-prediction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.lottery-ai-prediction-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--border-color, #e0e0e0);
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.lottery-ai-prediction-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #f58b1f 0%, #e67e22 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lottery-ai-prediction-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(245, 139, 31, 0.15);
    border-color: var(--primary-color, #f58b1f);
}

.lottery-ai-prediction-item:hover::before {
    opacity: 1;
}

.prediction-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.lottery-ai-prediction-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color, #f58b1f);
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #f58b1f 0%, #e67e22 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.prediction-rank {
    font-size: 12px;
    font-weight: 600;
    color: #999;
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lottery-ai-prediction-stats {
    margin-bottom: 12px;
}

.lottery-ai-prediction-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    padding: 6px 0;
}

.lottery-ai-prediction-stat .stat-label {
    color: var(--text-secondary, #666);
    display: flex;
    align-items: center;
    gap: 6px;
}

.lottery-ai-prediction-stat .stat-label i {
    font-size: 12px;
    color: #f58b1f;
    opacity: 0.7;
}

.lottery-ai-prediction-stat .stat-value {
    font-weight: 700;
    color: var(--text-primary, #333);
    font-family: 'Courier New', monospace;
}

.lottery-ai-prediction-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary, #e0e0e0);
    border-radius: 4px;
    overflow: hidden;
}

.lottery-ai-prediction-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f58b1f 0%, #e67e22 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.lottery-ai-explanation {
    background: var(--bg-primary, white);
    border-radius: 12px;
    padding: 32px;
    margin: 24px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color, #e0e0e0);
}

.explanation-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.explanation-icon {
    font-size: 32px;
    color: #f58b1f;
    background: linear-gradient(135deg, rgba(245, 139, 31, 0.1) 0%, rgba(230, 126, 34, 0.1) 100%);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.lottery-ai-explanation h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary, #333);
    margin: 0;
    letter-spacing: -0.3px;
}

.method-section {
    margin-bottom: 32px;
    padding: 20px;
    background: #fafafa;
    border-radius: 10px;
    border-left: 4px solid #f58b1f;
}

.method-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary, #333);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.method-section h3 i {
    color: #f58b1f;
    font-size: 18px;
}

.method-steps {
    margin-left: 24px;
    margin-bottom: 16px;
    counter-reset: step-counter;
    list-style: none;
    padding: 0;
}

.method-steps li {
    counter-increment: step-counter;
    margin-bottom: 16px;
    padding-left: 40px;
    position: relative;
    line-height: 1.7;
}

.method-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #f58b1f 0%, #e67e22 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.formula {
    display: inline-block;
    font-family: 'Courier New', monospace;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    margin: 0 4px;
    border: 1px solid #ddd;
}

.lottery-ai-explanation-content {
    line-height: 1.8;
    color: var(--text-primary, #333);
}

.lottery-ai-explanation-content p {
    margin-bottom: 16px;
}

.lottery-ai-explanation-content ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

.lottery-ai-explanation-content li {
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .lottery-ai-warning {
        flex-direction: column;
        padding: 16px;
    }

    .lottery-ai-warning-icon {
        font-size: 24px;
    }

    .lottery-ai-prediction {
        padding: 16px;
    }

    .lottery-ai-prediction h2 {
        font-size: 20px;
    }

    .lottery-ai-prediction-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .lottery-ai-prediction-item {
        padding: 12px;
    }

    .lottery-ai-prediction-number {
        font-size: 24px;
    }

    .lottery-ai-prediction-stat {
        font-size: 11px;
        padding: 4px 0;
    }

    .lottery-ai-prediction-stat .stat-label {
        font-size: 11px;
    }

    .lottery-ai-prediction-stat .stat-value {
        font-size: 12px;
    }

    .lottery-ai-explanation {
        padding: 16px;
    }

    .lottery-ai-explanation h2 {
        font-size: 20px;
    }
}
