/* --- 1. CSS Variables (Biến CSS) --- */
:root {
    --primary-color: #06b6d4; /* Màu Cyan chính (cyan-500) */
    --primary-dark: #0891b2; /* Màu Cyan đậm (cyan-600) */
    --primary-light: #cff4fc; /* Màu Cyan nền (cyan-200) */
    --background-light: #f3f4f6; /* Màu nền xám nhẹ (gray-e6) */
    --text-dark: #333;
    --card-bg: #ffffff;
    --border-color: #06b6d4; /* Dùng màu Cyan làm màu viền chính */
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* --- 2. Global Styles --- */
body {
    background-color: var(--background-light);
    color: var(--text-dark);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 60px; 
}

/* --- 3. Header & Navigation Styling --- */
.main-nav {
    /* Mô phỏng gradient từ-cyan-400 to-cyan-600 */
    background: linear-gradient(to right, #22d3ee, #0891b2) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: #ffffff !important;
}
.navbar-brand i {
    margin-right: 8px;
}

/* --- 4. Main Content Container & Title --- */
.main-content-container {
    max-width: 1140px; /* Tăng max-width theo giao diện mẫu */
    margin-top: 20px;
    padding-bottom: 50px;
}

.main-title {
    background-color: var(--primary-dark);
    font-weight: 600;
    padding: 10px;
    margin-bottom: 20px;
}

/* --- 5. Card/Data Block Styling (Mô phỏng giao diện mẫu) --- */
.data-card {
    border: 1px solid var(--border-color); /* Viền màu Cyan */
    border-radius: 8px; /* Bo góc nhẹ */
    box-shadow: none; /* Bỏ shadow mặc định */
    overflow: hidden;
    transition: transform 0.3s ease-in-out;
}

.card-header {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 10px 15px;
    /* Dùng màu Cyan làm background header */
    background-color: var(--primary-color) !important; 
    color: white !important;
    border-bottom: none; 
}

/* Điều chỉnh màu sắc cho các card */
.history-card .card-header {
    background-color: var(--primary-color) !important;
}
.ranking-card .card-header {
    background-color: var(--primary-color) !important;
}
.leaderboard-card .card-header {
    background-color: var(--primary-dark) !important; /* Dùng màu đậm hơn cho BXH chính */
}

/* Card body cho BXH để căn chỉnh flex */
.ranking-card .card-body, .leaderboard-card .card-body {
    display: flex;
    flex-direction: column;
}


/* --- 6. Table Styling --- */
.custom-table {
    margin-bottom: 0;
    border-collapse: collapse;
}

.custom-table thead tr {
    background-color: var(--primary-color); /* Màu Cyan cho header table */
    color: white;
}

.custom-table thead th {
    font-weight: 600;
    border-right: 1px solid rgba(255, 255, 255, 0.2); /* Viền ngăn cách cột */
    padding: 8px 10px;
    text-align: center;
    font-size: 0.85rem;
}

.custom-table tbody tr:nth-child(odd) {
    background-color: #f8f8f8; /* Màu nền xen kẽ nhẹ */
}

.custom-table tbody tr:hover {
    background-color: #e0f7fa; /* Highlight màu xanh ngọc khi hover */
}

.custom-table td {
    vertical-align: middle;
    font-size: 0.9rem;
    padding: 8px 10px;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
}
.custom-table td:last-child {
    border-right: none;
}

/* Tùy chỉnh cột tổng Coin Win */
.leaderboard-card .custom-table td:last-child {
    color: #dc3545; /* Giữ màu đỏ cho giá trị cao */
    font-weight: bold;
}

/* --- 7. Status Badge Styling --- */
.status-badge {
    padding: 5px 10px;
    border-radius: 50rem; 
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

/* --- 8. Pagination Styling (Cập nhật màu Cyan) --- */
.pagination .page-item .page-link {
    color: var(--primary-dark);
    border: 1px solid #ccc;
    margin: 0 2px;
}
.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    font-weight: bold;
}
.pagination .page-item.disabled .page-link {
    color: #ccc;
    background-color: #f8f8f8;
}

/* --- 9. Footer Styling --- */
.footer-style {
    background-color: #0e7490; /* Màu Cyan đậm hơn (Cyan-800) */
    color: #f8f9fa; 
    font-size: 0.85rem;
}

/* --- 10. Responsive adjustments --- */
@media (max-width: 992px) {
    .main-content-container {
        padding: 10px;
    }
    .custom-table td, .custom-table thead th {
        font-size: 0.75rem;
        padding: 6px 5px;
    }
}
/* --- Bổ sung cho Thông báo và Marquee --- */

/* Marquee Container and Text Styling */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding: 0;
    margin: 0;
    line-height: 1; /* Căn chỉnh chữ */
    color: #cff4fc; /* text-cyan-100 */
    font-size: 1.25rem; /* text-xl */
    font-weight: bold;
}

.marquee {
    display: inline-block;
    padding-right: 100%; /* Đảm bảo khoảng cách giữa các lần lặp */
    animation: marquee-anim 16s linear infinite;
}

/* Ẩn Marquee trên màn hình nhỏ */
@media (max-width: 767px) {
    .marquee-container {
        display: none !important;
    }
}

@keyframes marquee-anim {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Styling cho khối THÔNG BÁO */
.notification-block {
    border: 1px solid var(--primary-color); /* border-cyan-500 */
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1rem;
    margin-bottom: 1.5rem; /* Thêm margin dưới cho đẹp */
}

.notification-header {
    background-color: var(--primary-light); /* bg-cyan-200 */
    padding: 0.75rem 1rem;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.notification-content {
    background-color: var(--card-bg); /* bg-white */
    border-top: 1px solid var(--primary-color); /* border-cyan-500 */
    padding: 1rem;
}

.notification-content p {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.notification-content a {
    color: var(--primary-dark);
    font-weight: 600;
}