/* General Body Styles */
body {
    background-color: #0a0a1a; /* Màu nền xanh đen đậm */
    color: #f0f0f0;
    font-family: 'Roboto', sans-serif;
     overflow-x: hidden;
}

/* Helper Class */
.section-title {
    color: #e0a836;
    font-weight: bold;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    padding-bottom: 5px;
}

.section-title::before {
    content: '♦';
    margin-right: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #e0a836, transparent);
}


/* Top Navbar */
.top-navbar {
    background-color: #121221;
    border-bottom: 1px solid #333;
}

.search-container .form-control {
    background-color: #0a0a1a;
    border-color: #444;
    color: #fff;
    border-radius: 0;
}

.search-container .form-control::placeholder {
    color: #888;
}

.search-container .input-group-text {
    background-color: #0a0a1a;
    border-color: #444;
    color: #888;
    border-radius: 0;
}

.btn-write {
    background-color: #e0a836;
    border-color: #e0a836;
    color: #111;
    font-weight: bold;
}
.btn-login {
    border-color: #e0a836;
    color: #e0a836;
}
.btn-login:hover {
    background-color: #e0a836;
    color: #111;
}

/* Left Sidebar */
.left-sidebar {
    background-color: #121221;
    padding-top: 20px;
    height: calc(100vh - 70px); /* 70px là chiều cao ước tính của navbar */
    position: sticky;
    top: 70px; /* Phải bằng chiều cao navbar */
}

.sidebar-nav .nav-link {
    color: #aaa;
    text-align: center;
    margin-bottom: 15px;
    padding: 10px 0;
}
.sidebar-nav .nav-link i {
    font-size: 2rem;
    display: block;
}
.sidebar-nav .nav-link span {
    font-size: 0.75rem;
}

.sidebar-nav .nav-link:hover, .sidebar-nav .nav-link.active {
    color: #e0a836;
    background-color: #252535;
    border-radius: 5px;
}

/* Main Content */
.main-content {
    padding: 20px;
}

/* Featured Card */
/* Thẻ cha chứa tất cả */
.featured-card {
    background-image: linear-gradient(to right, rgba(0,0,0,0.8) 40%, rgba(0,0,0,0.2) 70%, transparent 100%), url('https://i.imgur.com/uIYXJb1.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    padding: 20px;
    position: relative; /* Quan trọng: để định vị thẻ con */
    min-height: 400px;
    display: flex;
    align-items: center;
    overflow: hidden;   /* QUAN TRỌNG: Thêm dòng này để ẩn phần bị tràn */
}
/* Container cho toàn bộ slider */
.featured-carousel-container {
    /* Thêm một chút padding để ảnh không bị cắt khi tràn ra */
    padding-right: 30px;
    padding-bottom: 30px;
}

/* Tùy chỉnh mỗi slide */
.featured-carousel .carousel-item {
    min-height: 400px; /* Chiều cao tối thiểu cho slide */
    position: relative;
    /* Rất quan trọng: KHÔNG dùng overflow: hidden để cho phép ảnh tràn ra ngoài */
}

/* CSS cho ảnh tướng để tạo hiệu ứng tràn (GIỮ NGUYÊN) */
.featured-hero-img {
    position: absolute;
    right: -20px;   /* Đẩy ảnh sang phải, ra khỏi khung */
    bottom: -20px;  /* Đẩy ảnh xuống dưới, ra khỏi khung */
    height: 115%;   /* Cho ảnh cao hơn khung */
    object-fit: contain;
    pointer-events: none;
    z-index: 1; /* Nằm trên slide nhưng dưới các nút control */
}
/* Đảm bảo nội dung text nằm trên ảnh */
.featured-content {
    position: relative;
    z-index: 2; /* Luôn nằm trên ảnh */
}

/* Tùy chỉnh nút điều khiển của Carousel */
.featured-carousel .carousel-control-prev,
.featured-carousel .carousel-control-next {
    z-index: 3; /* Nằm trên tất cả */
    width: 5%;
}
.featured-carousel .carousel-control-prev-icon,
.featured-carousel .carousel-control-next-icon {
    background-color: rgba(0,0,0,0.3);
    border-radius: 50%;
    padding: 20px;
}
.featured-carousel .carousel-indicators {
    z-index: 3; /* Nằm trên tất cả */
}
.featured-carousel .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid #333;
    margin: 0 5px;
}
.featured-carousel .carousel-indicators .active {
    background-color: #e0a836;
}

.featured-content {
    position: relative;
    z-index: 2;
    width: 60%; /* Giới hạn chiều rộng của nội dung text */
}

.featured-header h2 {
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 5px #000;
}

.build-box {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 5px;
    border-left: 3px solid #e0a836;
}
.build-box h6 {
    color: #e0a836;
    font-size: 0.9rem;
}
.build-box .items img {
    width: 48px;
    height: 48px;
    border-radius: 5px;
    margin-right: 5px;
    border: 1px solid #444;
}

/* Trending Posts */
.trending-post-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    text-decoration: none;
    color: #f0f0f0;
    transition: background-color 0.2s;
    padding: 5px;
    border-radius: 5px;
}
.trending-post-item:hover {
    background-color: #1a1a2a;
}
.trending-post-item img {
    width: 120px;
    height: 70px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
}
.post-info h6 {
    margin-bottom: 5px;
    font-size: 0.9rem;
    font-weight: 500;
}
.post-info small {
    color: #999;
    display: block;
    margin-bottom: 5px;
}
.post-stats {
    font-size: 0.8rem;
    color: #bbb;
}
.post-stats span {
    margin-right: 10px;
}
.post-stats .bi-star-fill {
    color: #e0a836;
}

/* Featured Authors */
.author-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid #333;
    transition: transform 0.2s, border-color 0.2s;
    cursor: pointer;
}
.author-avatar:hover {
    transform: scale(1.1);
    border-color: #e0a836;
}
/* =================================== */
/* === STYLES FOR NEWS & EVENTS   === */
/* =================================== */
.news-card {
    display: block;
    background-color: #1a1a2a;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    height: 100%;
    border: 1px solid #2a2a3a;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.news-card-thumbnail {
    position: relative;
    aspect-ratio: 16 / 9;
}
.news-card-thumbnail img {
    width: 100%; height: 100%; object-fit: cover;
}
.news-card-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: rgba(224, 168, 54, 0.9);
    color: #111;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.news-card-body {
    padding: 1rem 1.25rem;
}
.news-card-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}
.news-card-date {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 0;
}
/* CSS cho Video Nổi Bật (nếu chưa có) */
.video-post-card {
    background-color: #1a1a2a;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    transition: transform 0.2s ease;
}
.video-post-card:hover {
    transform: translateY(-5px);
}
.video-embed-wrapper {
    background-color: #000;
}
.video-post-details {
    padding: 1rem;
    display: flex;
    gap: 1rem;
}
.post-author-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.post-title {
    color: #fff;
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.post-meta {
    font-size: 0.8rem;
    color: #aaa;
}
.post-author-name {
    color: #ccc;
    font-weight: 500;
}
.kol-badge {
    background-color: #6f42c1;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    vertical-align: middle;
}
.view-all-link {
    color: #aaa;
    text-decoration: none;
}
/* =================================== */
/* === STYLES FOR HALL OF FAME    === */
/* =================================== */
.fame-card {
    background-color: #1a1a2a;
    border-radius: 8px;
    overflow: hidden;
}
.fame-card-header {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
}
.fame-card-header i {
    font-size: 2rem;
}
.fame-card-header h5 {
    margin: 0;
    font-weight: 500;
}
/* Custom Colors */
.author-header { background: linear-gradient(135deg, #e0a836, #b8860b); }
.collector-header { background: linear-gradient(135deg, #d63384, #a31f61); }
.sentinel-header { background: linear-gradient(135deg, #0dcaf0, #0a94b0); }

.fame-list {
    list-style: none;
    padding: 1rem;
}
.fame-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #2a2a3a;
}
.fame-list li:last-child {
    border-bottom: none;
}
.fame-list img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.fame-list span {
    color: #ccc;
    flex-grow: 1;
}
.fame-list .fame-metric {
    color: #fff;
    font-weight: bold;
}
/* =================================== */
/* === STYLES FOR ANNOUNCEMENT MODAL === */
/* =================================== */
.announcement-modal-content {
    background-color: #1a1a2a;
    border: 1px solid #e0a836;
    color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
}

.announcement-modal-content .modal-header {
    border-bottom-color: #333;
}

.announcement-modal-content .modal-header .modal-title {
    color: #e0a836;
    font-weight: bold;
}

.announcement-modal-content .modal-body h4 {
    font-weight: 500;
}

.announcement-modal-content .modal-body p {
    color: #ccc;
}

.announcement-modal-content .modal-footer {
    border-top-color: #333;
}

.announcement-modal-content .btn-primary {
    background-color: #e0a836;
    border-color: #e0a836;
    color: #111;
    font-weight: bold;
}
.announcement-modal-content .btn-primary:hover {
    background-color: #ffdc99;
    border-color: #ffdc99;
}
/* =================================== */
/* === STYLES FOR MOBILE BOTTOM NAV === */
/* =================================== */

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1a1a2a;
    border-top: 1px solid #333;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    z-index: 1000; /* Đảm bảo menu luôn nằm trên cùng */
    padding: 0.5rem 0;
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #888;
    flex-grow: 1; /* Chia đều không gian */
}

.mobile-bottom-nav .nav-item i {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.mobile-bottom-nav .nav-item span {
    font-size: 0.7rem;
}

/* Kiểu cho nút đang được chọn (active) */
.mobile-bottom-nav .nav-item.active {
    color: #e0a836;
}

/* Kiểu riêng cho nút Đăng bài ở giữa */
.nav-item-create {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #e0a836, #ffc966);
    color: #111 !important;
    border-radius: 50%;
    border: 3px solid #121221;
    margin-top: -30px; /* Đẩy nút lên trên một chút */
    box-shadow: 0 0 15px rgba(224, 168, 54, 0.5);
    transition: transform 0.2s ease;
}
.nav-item-create:hover {
    transform: scale(1.1);
}

.nav-item-create i {
    font-size: 2rem;
    margin: 0; /* Bỏ margin-bottom của icon */
    font-weight: bold;
}
