/* ==========================================================================
   HLS OBSIDIAN & MOLTEN CRIMSON DESIGN SYSTEM - HUST LOGISTICS CLUB
   Lấy cảm hứng từ khối kiến trúc Obsidian đen mờ & dải ánh sáng Đỏ nóng chảy:
   Nền Void (#050507) · Khối Obsidian (#101016) · Đỏ rực (#DC2626 / #EF4444)
   ========================================================================== */

:root {
    --hls-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --hls-void: #060609;
    --hls-obsidian: #0c0c12;
    --hls-block: #121219;
    --hls-block-hover: #181822;
    --hls-crimson: #ef2b3d;
    --hls-crimson-bright: #ff4252;
    --hls-border: rgba(255, 255, 255, 0.09);
    --hls-border-strong: rgba(255, 255, 255, 0.15);
}

html {
    background-color: var(--hls-void);
    color: #f4f4f5;
    color-scheme: dark;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    background-color: var(--hls-void);
    color: #f4f4f5;
    position: relative;
    overflow-x: hidden;
    overflow-x: clip;
}

/* Thanh cuộn Obsidian tối giản */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #07070a;
}
::-webkit-scrollbar-thumb {
    background: #262630;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #dc2626;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ==========================================================================
   SÂN KHẤU NỀN ĐỘNG XUYÊN SUỐT (AMBIENT CRIMSON RIBBONS + ARCHITECTURAL GRID)
   Đồng bộ thị giác cho toàn bộ các trang trong hệ sinh thái HLS
   ========================================================================== */
.hls-ambient-stage {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(ellipse 78% 52% at 52% -8%, rgba(244, 42, 59, 0.25), transparent 68%),
        radial-gradient(ellipse 62% 48% at 88% 96%, rgba(239, 50, 64, 0.20), transparent 68%),
        radial-gradient(ellipse 50% 42% at 8% 55%, rgba(225, 29, 46, 0.13), transparent 66%),
        #060609;
}

.hls-ribbon-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.94;
}

/* Lưới kiến trúc mảnh gợi liên tưởng khe sáng đỏ giữa các khối hộp đen */
.hls-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 85% 70% at 50% 28%, #000 25%, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 28%, #000 25%, transparent 90%);
}

/* Đảm bảo nội dung trang nằm nổi trên sân khấu nền */
body > nav,
body > header,
body > main,
body > section,
body > div:not(.hls-ambient-stage):not(.hls-reading-bar),
body > footer {
    position: relative;
    z-index: 1;
}

/* Lớp nền ảnh khối Obsidian 3D đỏ-đen cho khu vực Banner / Header các trang */
.hls-obsidian-hero {
    position: relative;
    overflow: hidden;
}
.hls-obsidian-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../assets/bg-obsidian-cubes.jpg");
    background-size: cover;
    background-position: center 40%;
    opacity: 0.44;
    filter: contrast(1.12) saturate(1.28) brightness(1.08);
    transform: scale(1.02);
    pointer-events: none;
    z-index: 0;
}
.hls-obsidian-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 22%, rgba(255, 48, 64, 0.24), transparent 52%),
        radial-gradient(circle at 72% 38%, rgba(255, 48, 64, 0.22), transparent 56%),
        linear-gradient(180deg, rgba(6, 6, 9, 0.40) 0%, rgba(6, 6, 9, 0.72) 76%, rgba(6, 6, 9, 0.96) 100%);
    pointer-events: none;
    z-index: 0;
}
.hls-obsidian-hero > * {
    position: relative;
    z-index: 1;
}

/* Biến thể dịu hơn cho đầu trang con */
.hls-subpage-header {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.hls-subpage-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../assets/bg-obsidian-cubes.jpg");
    background-size: cover;
    background-position: center 40%;
    opacity: 0.36;
    filter: contrast(1.10) saturate(1.26) brightness(1.07);
    pointer-events: none;
    z-index: 0;
}
.hls-subpage-header::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 24% 24%, rgba(255, 48, 64, 0.24), transparent 56%),
        linear-gradient(180deg, rgba(6, 6, 9, 0.44) 0%, rgba(6, 6, 9, 0.84) 100%);
    pointer-events: none;
    z-index: 0;
}
.hls-subpage-header > * {
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   THANH ĐIỀU HƯỚNG KÍNH ĐEN (OBSIDIAN GLASS NAVBAR)
   ========================================================================== */
.hls-nav {
    background-color: rgba(6, 6, 9, 0.74);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    transition: background-color 0.28s var(--hls-ease),
                box-shadow 0.28s var(--hls-ease),
                border-color 0.28s var(--hls-ease);
}
.hls-nav.is-scrolled {
    background-color: rgba(7, 7, 11, 0.92);
    border-bottom-color: rgba(220, 38, 38, 0.32);
    box-shadow: 0 14px 36px -14px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(239, 68, 68, 0.14);
}

/* Gạch chân đỏ nóng chảy chạy mượt từ trái sang phải */
.hls-nav-link {
    position: relative;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.hls-nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #ef4444, #991b1b);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.3s var(--hls-ease);
}
.hls-nav-link:hover::after,
.hls-nav-link.is-active::after {
    transform: scaleX(1);
    transform-origin: left center;
}

/* ==========================================================================
   KHỐI THẺ OBSIDIAN & HIỆU ỨNG KHE SÁNG ĐỎ THEO CON TRỎ (.hls-card)
   ========================================================================== */
.hls-card {
    position: relative;
    background: linear-gradient(180deg, rgba(24, 23, 31, 0.90) 0%, rgba(13, 13, 18, 0.94) 100%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 16px 36px -20px rgba(0, 0, 0, 0.85);
    transition: border-color 0.28s var(--hls-ease),
                transform 0.32s var(--hls-ease),
                box-shadow 0.32s var(--hls-ease);
}
.hls-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        420px circle at var(--mx, 50%) var(--my, 0%),
        rgba(255, 58, 72, 0.17),
        transparent 62%
    );
    opacity: 0;
    transition: opacity 0.3s var(--hls-ease);
    pointer-events: none;
    z-index: 0;
}
.hls-card > * {
    position: relative;
    z-index: 1;
}
.hls-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 66, 82, 0.56);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.11),
        0 24px 48px -18px rgba(244, 42, 59, 0.36),
        0 0 26px -10px rgba(255, 66, 82, 0.30);
}
.hls-card:hover::before {
    opacity: 1;
}

/* Khung bề mặt tĩnh đồng bộ */
.hls-surface {
    background: linear-gradient(180deg, rgba(21, 20, 28, 0.88) 0%, rgba(12, 12, 17, 0.93) 100%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   NÚT BẤM ĐỎ NÓNG CHẢY & NÚT KÍNH ĐEN
   ========================================================================== */
.hls-btn-crimson {
    background: linear-gradient(135deg, #ff3344 0%, #e11d2e 55%, #b91c1c 100%);
    color: #ffffff;
    border: 1px solid rgba(254, 202, 202, 0.30);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 10px 28px -8px rgba(244, 42, 59, 0.62);
    transition: transform 0.22s var(--hls-ease),
                box-shadow 0.25s var(--hls-ease),
                filter 0.25s var(--hls-ease);
}
.hls-btn-crimson:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 14px 34px -6px rgba(255, 56, 72, 0.75);
}

.hls-btn-obsidian {
    background: rgba(20, 20, 27, 0.88);
    color: #f4f4f5;
    border: 1px solid rgba(255, 255, 255, 0.14);
    transition: border-color 0.24s var(--hls-ease),
                background-color 0.24s var(--hls-ease),
                color 0.24s var(--hls-ease),
                transform 0.22s var(--hls-ease);
}
.hls-btn-obsidian:hover {
    background: rgba(28, 28, 38, 0.96);
    border-color: rgba(239, 68, 68, 0.55);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Ô nhập liệu chuẩn Dark Studio (dùng chung cho bộ lọc & trang Admin) */
.hls-input,
.adm-input {
    width: 100%;
    background-color: #0c0c11;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #f4f4f5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.hls-input::placeholder,
.adm-input::placeholder {
    color: #71717a;
}
.hls-input:focus,
.adm-input:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}

/* ==========================================================================
   VI CHUYỂN ĐỘNG & REVEAL MƯỢT XUYÊN SUỐT
   ========================================================================== */
.hls-arrow {
    display: inline-block;
    transition: transform 0.25s var(--hls-ease);
}
.group:hover .hls-arrow,
a:hover > .hls-arrow,
button:hover > .hls-arrow {
    transform: translateX(4px);
}
.hls-arrow-diag {
    display: inline-block;
    transition: transform 0.25s var(--hls-ease);
}
.group:hover .hls-arrow-diag,
a:hover > .hls-arrow-diag {
    transform: translate(2.5px, -2.5px);
}

.hls-reveal {
    opacity: 0;
    transform: translateY(18px) scale(0.99);
    transition: opacity 0.65s var(--hls-ease),
                transform 0.65s var(--hls-ease);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}
.hls-reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@keyframes hlsContentFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.hls-fade-swap {
    animation: hlsContentFade 0.3s var(--hls-ease) both;
}

/* Khe sáng laser đỏ trên đỉnh trang & tiến độ cuộn (hiển thị xuyên suốt mọi trang) */
.hls-reading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2.5px;
    width: 16%;
    background: linear-gradient(90deg, #b91c1c 0%, #ff3344 68%, #fb7185 100%);
    box-shadow:
        0 0 14px rgba(255, 51, 68, 0.9),
        0 2px 20px rgba(239, 43, 61, 0.55);
    z-index: 60;
    pointer-events: none;
    transition: width 0.1s linear;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .hls-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
