/* Nuoi De Scraper - Frontend Styles */

.nuoi-de-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin-bottom: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.nuoi-de-table-wrap {
    margin-bottom: 16px;
}

.nuoi-de-table-wrap:last-child {
    margin-bottom: 0;
}

.nuoi-de-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.nuoi-de-header h3 {
    margin: 0;
    color: #e74c3c;
    font-size: 1.2em;
    font-weight: 700;
}

.nuoi-de-date {
    background: #f0f0f0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    color: #666;
}

/* Table */
.nuoi-de-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.nuoi-de-table thead th {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    padding: 12px 14px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nuoi-de-table thead th:first-child {
    border-radius: 8px 0 0 0;
}

.nuoi-de-table thead th:last-child {
    border-radius: 0 8px 0 0;
}

.nuoi-de-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.nuoi-de-table tbody tr:hover {
    background: #fafafa;
}

.nuoi-de-table tbody td {
    padding: 10px 14px;
    text-align: center;
    vertical-align: middle;
}

.nuoi-de-col-ngay {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.nuoi-de-col-dan {
    font-weight: 600;
    color: #2c3e50;
}

/* Result badges */
.nuoi-de-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.88em;
    font-weight: 600;
    white-space: nowrap;
}

.nuoi-de-badge.nuoi-de-win {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.nuoi-de-badge.nuoi-de-lose {
    background: #ffeaea;
    color: #c0392b;
    border: 1px solid #ef9a9a;
}

.nuoi-de-badge.nuoi-de-pending {
    background: #fff8e1;
    color: #f57f17;
    border: 1px solid #ffe082;
}

/* Row highlight for pending */
tr.nuoi-de-pending {
    background: #fffde7 !important;
}

/* Tab navigation for [nuoi_de_all] */
.nuoi-de-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 12px;
}

.nuoi-de-tab {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 0.88em;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
    outline: none;
}

.nuoi-de-tab:hover {
    background: #e8e8e8;
    color: #333;
}

.nuoi-de-tab.active {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}

.nuoi-de-panel {
    display: none;
}

.nuoi-de-panel.active {
    display: block;
}

/* Error state */
.nuoi-de-error {
    text-align: center;
    padding: 40px;
    color: #999;
}

.nuoi-de-error p {
    margin: 0;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .nuoi-de-wrapper {
        padding: 12px;
    }

    .nuoi-de-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .nuoi-de-header h3 {
        font-size: 1em;
    }

    .nuoi-de-table {
        font-size: 0.85em;
    }

    .nuoi-de-table thead th {
        padding: 8px 6px;
        font-size: 0.8em;
    }

    .nuoi-de-table tbody td {
        padding: 8px 6px;
    }

    .nuoi-de-badge {
        padding: 3px 8px;
        font-size: 0.82em;
    }

    .nuoi-de-tabs {
        gap: 4px;
    }

    .nuoi-de-tab {
        padding: 6px 10px;
        font-size: 0.78em;
    }

    .nuoi-de-col-ngay {
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .nuoi-de-table thead th,
    .nuoi-de-table tbody td {
        padding: 6px 4px;
    }

    .nuoi-de-tab {
        padding: 5px 8px;
        font-size: 0.72em;
    }
}
