:root {
    --vh-txt-focus: 235 51 73;
    --vh-txt-primary: 236 242 255;
    --vh-txt-secondary: 173 187 214;
    --vh-txt-tertiary: 117 130 156;
    --vh-txt-inverse: 9 14 24;
    --vh-bd-default: 39 54 79;
    --vh-bgc-layer3: 22 34 53;
    --vh-bgc-layer2: 13 22 36;
    --vh-bgc-layer1: 7 13 23;
    --vh-lav-500: 235 51 73;
    --vh-lav-600: 240 100 115;
    --site-header-height: 58px;
}

body {
    background-color: #070d17;
    color: #ecf2ff;
    font-family: "Inter Tight", ui-sans-serif, system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
}

/* Reserve space on the right for the fixed side rail on desktop so it NEVER covers header buttons or content */
@media (min-width: 1024px) {
    body {
        padding-right: 54px;
    }
}

.vm-container {
    width: 100%;
    max-width: 1360px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

@media (min-width: 640px) {
    .vm-container {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* Header */
.vm-header {
    position: sticky;
    top: 0;
    z-index: 45;
    height: var(--site-header-height);
    background: rgba(7, 13, 23, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vm-header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Fixed Right Side Menu Rail */
.side-menu-rail {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 54px;
    z-index: 50;
    background: rgba(7, 13, 23, 0.96);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

/* HERO SPOTLIGHT (TIÊU ĐIỂM) */
.vm-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #070d17;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vm-hero-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.vm-hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    filter: blur(22px) brightness(0.28) saturate(1.2);
    transform: scale(1.15);
}

.vm-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 13, 23, 0.95) 0%, rgba(7, 13, 23, 0.82) 55%, rgba(7, 13, 23, 0.72) 100%),
        linear-gradient(180deg, rgba(7, 13, 23, 0.45) 0%, rgba(7, 13, 23, 0.75) 65%, #070d17 100%);
}

.vm-hero-body {
    position: relative;
    z-index: 2;
    padding-top: 24px;
    padding-bottom: 26px;
}

@media (min-width: 768px) {
    .vm-hero-body {
        padding-top: 32px;
        padding-bottom: 34px;
    }
}

.vm-hero-grid {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

@media (min-width: 640px) {
    .vm-hero-grid {
        grid-template-columns: 160px minmax(0, 1fr);
        gap: 24px;
    }
}

@media (min-width: 1024px) {
    .vm-hero-grid {
        grid-template-columns: 200px minmax(0, 1fr);
        gap: 32px;
        align-items: stretch;
    }
}

.vm-hero-cover {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65);
    background: #0d1624;
}

.vm-hero-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.vm-hero-cover:hover img {
    transform: scale(1.04);
}

.vm-hero-title {
    color: #ffffff;
    font-weight: 800;
    font-size: 1.35rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 640px) {
    .vm-hero-title {
        font-size: 1.85rem;
    }
}

@media (min-width: 1024px) {
    .vm-hero-title {
        font-size: 2.35rem;
    }
}

.vm-hero-desc {
    color: #dbe6ff;
    font-size: 0.92rem;
    line-height: 1.6;
    max-width: 720px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .vm-hero-desc {
        font-size: 0.98rem;
        -webkit-line-clamp: 4;
    }
}

/* STORY GRID & CARDS (MỚI CẬP NHẬT / DANH SÁCH) */
.vm-story-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

@media (min-width: 640px) {
    .vm-story-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (min-width: 768px) {
    .vm-story-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .vm-story-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (min-width: 1280px) {
    .vm-story-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.vm-card-cover {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    overflow: hidden;
    background: #0d1624;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.vm-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.vm-card:hover .vm-card-cover img {
    transform: scale(1.05);
}

/* STORY DETAIL PAGE LAYOUT & COMPACT COVER */
.vm-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}

@media (min-width: 1024px) {
    .vm-detail-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 28px;
        align-items: start;
    }
}

.vm-detail-top {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 640px) {
    .vm-detail-top {
        flex-direction: row;
        align-items: flex-start;
        gap: 24px;
    }
}

.vm-detail-cover {
    width: 160px;
    height: 230px;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: auto;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
    background: #0d1624;
}

@media (min-width: 640px) {
    .vm-detail-cover {
        width: 185px;
        height: 268px;
        margin-left: 0;
        margin-right: 0;
    }
}

.vm-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* HOME COMMUNITY 2-COLUMN GRID */
.vm-community-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}

@media (min-width: 1024px) {
    .vm-community-grid {
        grid-template-columns: 7fr 5fr;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #070d17;
}
::-webkit-scrollbar-thumb {
    background: #1e2d45;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #eb3349;
}


/* Rich HTML Content from TinyMCE GPL Editor */
.vm-prose h1, .vm-prose h2, .vm-prose h3, .vm-prose h4 {
    color: #ffffff;
    font-weight: 800;
    margin-top: 1.1em;
    margin-bottom: 0.45em;
    line-height: 1.3;
}
.vm-prose h2 { font-size: 1.25rem; }
.vm-prose h3 { font-size: 1.1rem; }
.vm-prose p { margin-bottom: 0.8em; }
.vm-prose ul, .vm-prose ol {
    padding-left: 1.35rem;
    margin-bottom: 0.85em;
}
.vm-prose ul { list-style-type: disc; }
.vm-prose ol { list-style-type: decimal; }
.vm-prose li { margin-bottom: 0.35em; }
.vm-prose a { color: #eb3349; text-decoration: underline; }
.vm-prose strong { color: #ffffff; }
.vm-prose code {
    background: rgba(235, 51, 73, 0.16);
    color: #ff8a98;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 0.88em;
}

/* Missing Tailwind Fractional Spacing Utilities & Detail Components */
.p-1\.5 { padding: 0.375rem; }
.p-2\.5 { padding: 0.625rem; }
.p-3\.5 { padding: 0.875rem; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3\.5 { padding-left: 0.875rem; padding-right: 0.875rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3\.5 { gap: 0.875rem; }
.mt-2\.5 { margin-top: 0.625rem; }

.vm-chapter-item {
    padding: 11px 16px !important;
}

.vm-comment-item {
    padding: 14px 16px !important;
}

/* Comment Form Textarea & Input Focus Placeholder Behavior */
.vm-comment-textarea {
    padding: 14px 16px !important;
    line-height: 1.6;
}

.vm-comment-textarea:focus::placeholder,
textarea:focus::placeholder,
input:focus::placeholder {
    color: transparent !important;
    opacity: 0 !important;
}

