/* =====================================================
   PluginVault — Premium Design System
   ===================================================== */

/* --- CSS Custom Properties --- */
:root {
    /* Colors */
    --bg-primary: #08090d;
    --bg-secondary: #0e1017;
    --bg-card: #12141c;
    --bg-card-hover: #181b26;
    --bg-glass: rgba(18, 20, 28, 0.7);
    --bg-glass-light: rgba(255, 255, 255, 0.03);

    --text-primary: #eef0f6;
    --text-secondary: #8b8fa7;
    --text-tertiary: #5c6080;

    --accent-blue: #6366f1;
    --accent-blue-light: #818cf8;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-green-light: #34d399;
    --accent-orange: #f59e0b;
    --accent-orange-light: #fbbf24;
    --accent-pink: #ec4899;
    --accent-purple: #a855f7;

    --gradient-primary: linear-gradient(135deg, #6366f1, #06b6d4);
    --gradient-blue: linear-gradient(135deg, #6366f1, #818cf8);
    --gradient-green: linear-gradient(135deg, #10b981, #06b6d4);
    --gradient-orange: linear-gradient(135deg, #f59e0b, #ec4899);

    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
    --shadow-glow-blue: 0 0 40px rgba(99, 102, 241, 0.15);
    --shadow-glow-green: 0 0 40px rgba(16, 185, 129, 0.15);
    --shadow-glow-orange: 0 0 40px rgba(245, 158, 11, 0.15);

    /* Typography */
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --section-padding: 96px;
    --container-width: 1280px;

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}

html::-webkit-scrollbar {
    width: 6px;
}

html::-webkit-scrollbar-track {
    background: transparent;
}

html::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 3px;
}

body {
    font-family: var(--font-main);
    background: url('assets/images/card_autocad.jpg') no-repeat center center fixed;
    background-size: cover;
    background-color: var(--bg-primary);
    background-blend-mode: overlay;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

button {
    border: none;
    background: none;
    cursor: none;
    font-family: inherit;
    color: inherit;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Custom Cursor --- */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--accent-blue-light);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    mix-blend-mode: difference;
    will-change: transform;
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(99, 102, 241, 0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    will-change: transform;
}

/* --- Blog/Post: dùng con trỏ hệ thống (không ẩn cursor như trang chủ) --- */
.blog-page,
.blog-page button,
.blog-page a,
.blog-page input,
.blog-page textarea,
.blog-page .blog-card {
    cursor: auto;
}
.blog-page a,
.blog-page button,
.blog-page .blog-card {
    cursor: pointer;
}
.blog-page .cursor-dot,
.blog-page .cursor-ring {
    display: none !important;
}

/* --- Particle Canvas --- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.preloader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
}

.preloader-ring {
    width: 320px;
    height: 320px;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 1.5;
}

.ring-progress {
    fill: none;
    stroke: var(--accent-green);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.1s linear;
}

.preloader-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 2px;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.4s var(--ease-out-expo);
}

.navbar.scrolled {
    padding: 10px 0;
    background: rgba(8, 9, 13, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    z-index: 10;
}

.logo-icon {
    width: 36px;
    height: 36px;
}

.nav-logo-title { font-size: 22px; }
.nav-logo-sub {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
}

/* Marquee đầu trang: bù chiều cao navbar fixed (chỉnh theo breakpoint) */
.marquee-top { margin-top: 85px; }

.accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-link {
    position: relative;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.3s var(--ease-out-expo);
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-glass-light);
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link.active {
    color: var(--accent-blue-light);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.donate-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.donate-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-glass-light);
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.donate-btn:hover {
    color: var(--text-primary);
}

.donate-btn:hover::before {
    opacity: 1;
}

.donate-btn span {
    position: relative;
    z-index: 1;
}
.search-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s var(--ease-out-expo);
    background: var(--bg-glass-light);
    border: 1px solid var(--border-color);
}

.search-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    transform: scale(1.05);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--bg-glass-light);
    border: 1px solid var(--border-color);
}

.hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 1px;
    transition: all 0.3s var(--ease-out-expo);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translateY(5px) translateX(5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-5px) translateX(5px);
}

/* Search Overlay */
.search-overlay {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: min(600px, calc(100% - 48px));
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease-out-expo);
    box-shadow: var(--shadow-lg);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(8px);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.search-box svg {
    flex-shrink: 0;
    color: var(--text-tertiary);
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 15px;
}

.search-box input::placeholder {
    color: var(--text-tertiary);
}

.search-box kbd {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-tertiary);
}

.search-results {
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-result-item:hover {
    background: var(--bg-glass-light);
}

.search-result-item .result-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.search-result-item .result-info h4 {
    font-size: 14px;
    font-weight: 500;
}

.search-result-item .result-info p {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover::before {
    opacity: 1;
}

/* --- Sections --- */
.section {
    padding: var(--section-padding) 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-blue-light);
    border: 1px solid rgba(99, 102, 241, 0.15);
    margin-bottom: 16px;
}

.tag-blue {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-blue-light);
    border-color: rgba(99, 102, 241, 0.15);
}

.tag-green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green-light);
    border-color: rgba(16, 185, 129, 0.15);
}

.tag-orange {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-orange-light);
    border-color: rgba(245, 158, 11, 0.15);
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

/* 3D Tilt hover on plugin section titles — animated via GSAP in app.js */
.plugins-section .section-title {
    cursor: pointer;
}

.text-blue { color: var(--accent-blue-light); }
.text-green { color: var(--accent-green-light); }
.text-orange { color: var(--accent-orange-light); }

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease-in-out infinite;
    background-size: 200% auto;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50%      { background-position: 100% center; }
}

.section-desc {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

/* --- Plugin Cards Grid --- */
.plugins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.plugin-card {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    overflow: hidden;
    border: 1px solid transparent;
    background-clip: padding-box;
    isolation: isolate;
    transition: transform 0.5s var(--ease-out-expo),
                box-shadow 0.5s var(--ease-out-expo);
}

/* ─── Animated rotating border gradient ─── */
.plugin-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: conic-gradient(
        from var(--card-border-angle, 0deg),
        transparent 40%,
        var(--card-glow, rgba(99,102,241,0.4)) 50%,
        transparent 60%
    );
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: -1;
}

/* ─── Holographic shine sweep ─── */
.plugin-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 30%,
        rgba(255, 255, 255, 0.03) 45%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(255, 255, 255, 0.03) 55%,
        transparent 70%
    );
    z-index: 1;
    pointer-events: none;
    transition: none;
}

/* ─── Hover: Legendary ─── */
.plugin-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 20px 60px -12px rgba(0,0,0,0.4),
        0 0 40px -8px var(--card-glow, rgba(99,102,241,0.15));
    border-color: transparent;
}

.plugin-card:hover::before {
    opacity: 1;
    animation: borderSpin 3s linear infinite;
}

.plugin-card:hover::after {
    animation: holographicSweep 1.2s ease-out forwards;
}

@keyframes borderSpin {
    to { --card-border-angle: 360deg; }
}

@property --card-border-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

@keyframes holographicSweep {
    0%   { left: -100%; opacity: 1; }
    100% { left: 150%;  opacity: 0; }
}

/* ─── Neon glow background pulse ─── */
.plugin-card .card-neon-glow {
    position: absolute;
    inset: -1px;
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: -2;
    filter: blur(20px);
    background: var(--card-glow, rgba(99,102,241,0.15));
}

.plugin-card:hover .card-neon-glow {
    opacity: 1;
    animation: neonPulse 2s ease-in-out infinite alternate;
}

@keyframes neonPulse {
    0%   { opacity: 0.4; filter: blur(20px); }
    100% { opacity: 0.7; filter: blur(35px); }
}

/* ─── Card inner content ─── */
.plugin-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
    position: relative;
    z-index: 2;
}

.plugin-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    transition: transform 0.5s var(--ease-out-expo),
                box-shadow 0.4s;
}

.plugin-card:hover .plugin-card-icon {
    transform: translateY(-4px) scale(1.1) rotateZ(-5deg);
    box-shadow: 0 8px 24px -4px var(--card-glow, rgba(99,102,241,0.2));
}

/* Thumbnail ảnh thay cho emoji (khi plugin có ảnh) */
.plugin-card-icon.has-thumb {
    overflow: hidden;
    padding: 0;
}

.plugin-card-icon.has-thumb .plugin-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.plugin-card-info {
    flex: 1;
    min-width: 0;
}

.plugin-card-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    z-index: 2;
    transition: color 0.3s;
}

.plugin-card:hover .plugin-card-name {
    color: var(--text-primary);
}

.plugin-card-version {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    transition: background 0.3s, color 0.3s;
}

.plugin-card:hover .plugin-card-version {
    background: var(--card-glow, rgba(99,102,241,0.12));
    color: var(--accent-blue-light);
}

.plugin-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.plugin-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.plugin-card-size {
    font-size: 12px;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}

/* ─── Download Button: Legendary ─── */
.plugin-card-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--ease-out-expo);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Animated shine on button */
.plugin-card-download::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: none;
}

.plugin-card:hover .plugin-card-download::before {
    animation: btnShine 1s 0.3s ease-out forwards;
}

@keyframes btnShine {
    to { left: 200%; }
}

.plugin-card-download svg {
    width: 14px;
    height: 14px;
    transition: transform 0.4s var(--ease-out-expo);
}

.plugin-card:hover .plugin-card-download svg {
    animation: downloadBounce 0.6s 0.4s ease-out;
}

@keyframes downloadBounce {
    0%   { transform: translateY(0); }
    30%  { transform: translateY(-6px); }
    50%  { transform: translateY(0); }
    70%  { transform: translateY(-3px); }
    100% { transform: translateY(0); }
}

.plugin-card:hover .plugin-card-download {
    transform: scale(1.05);
    box-shadow: 0 4px 16px -2px var(--card-glow, rgba(99,102,241,0.25));
}

/* ─── Ripple effect ─── */
.plugin-card .ripple {
    position: absolute;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--card-glow, rgba(99,102,241,0.15));
    transform: translate(-50%, -50%);
    animation: rippleExpand 0.6s ease-out;
    pointer-events: none;
    z-index: 1;
}

@keyframes rippleExpand {
    to {
        width: 500px;
        height: 500px;
        opacity: 0;
    }
}

/* ─── Color variants ─── */
.plugin-card[data-category="autocad"] {
    --card-glow: rgba(16, 185, 129, 0.35);
}

.plugin-card[data-category="autocad"] .plugin-card-icon {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.12);
}

.plugin-card[data-category="autocad"] .plugin-card-download {
    background: rgba(16, 185, 129, 0.08);
    color: var(--accent-green-light);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.plugin-card[data-category="autocad"]:hover .plugin-card-download {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.35);
}

.plugin-card[data-category="excel"] {
    --card-glow: rgba(245, 158, 11, 0.35);
}

.plugin-card[data-category="excel"] .plugin-card-icon {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.12);
}

.plugin-card[data-category="excel"] .plugin-card-download {
    background: rgba(245, 158, 11, 0.08);
    color: var(--accent-orange-light);
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.plugin-card[data-category="excel"]:hover .plugin-card-download {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.35);
}

/* Paid card golden accent */
.plugin-card[data-price="paid"]::before {
    background: conic-gradient(
        from var(--card-border-angle, 0deg),
        transparent 35%,
        rgba(245, 158, 11, 0.5) 50%,
        transparent 65%
    );
}

/* --- Features Grid --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    text-align: center;
    padding: 40px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.4s;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
}

.feature-card:hover::before {
    opacity: 0.03;
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue-light);
    transition: all 0.4s var(--ease-out-expo);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotateZ(-5deg);
    background: rgba(99, 102, 241, 0.15);
}

.feature-icon svg {
    width: 26px;
    height: 26px;
}

.feature-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    position: relative;
}

/* --- Footer --- */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-color);
    padding: 72px 0 0;
    background: var(--bg-secondary);
    overflow: hidden;
}

/* Glow trang trí phía trên footer */
.footer-glow {
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: min(900px, 90%);
    height: 240px;
    background: radial-gradient(ellipse at center, rgba(99,102,241,0.12), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.footer .container { position: relative; z-index: 1; }

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.4fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 320px;
}

/* Nút mạng xã hội dạng tròn */
.footer-socials {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: var(--bg-glass-light);
    border: 1px solid var(--border-color);
    transition: all 0.3s var(--ease-out-expo);
}

.social-btn:hover {
    color: #fff;
    border-color: transparent;
    background: var(--gradient-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px -6px rgba(99,102,241,0.5);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links h4 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.3s, transform 0.3s;
    width: fit-content;
}

.footer-links a:hover {
    color: var(--accent-blue-light);
    transform: translateX(4px);
}

/* Liên hệ có icon */
.footer-contact a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.footer-contact a svg {
    flex-shrink: 0;
    color: var(--accent-blue-light);
    transition: transform 0.3s var(--ease-out-expo);
}

.footer-contact a:hover svg {
    transform: scale(1.15);
}

.footer-bottom {
    padding: 22px 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-tertiary);
    margin: 0;
}

.footer-admin-link {
    font-size: 12px;
    color: var(--text-tertiary);
    opacity: 0.6;
    transition: opacity 0.3s, color 0.3s;
}

.footer-admin-link:hover {
    opacity: 1;
    color: var(--accent-blue-light);
}

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s var(--ease-out-expo);
    box-shadow: var(--shadow-sm);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
    transform: translateY(-4px);
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease-out-expo);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    width: min(500px, calc(100% - 48px));
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: all 0.5s var(--ease-out-expo);
    position: relative;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    border-radius: 10px;
    transition: all 0.3s;
    z-index: 2;
}

.modal-close:hover {
    background: var(--bg-glass-light);
    color: var(--text-primary);
}

.modal-header {
    padding: 32px 32px 24px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-category {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-body {
    padding: 24px 32px;
}

.modal-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}

.modal-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.info-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.info-label {
    display: block;
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-footer {
    padding: 0 32px 32px;
}

.btn-download {
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 16px;
    border-radius: 14px;
}

/* --- Price Badge on Plugin Cards --- */
.price-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    z-index: 3;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.price-free {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-green-light);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.price-paid {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-orange-light);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* --- Modal Price --- */
.modal-price-free {
    color: var(--accent-green-light) !important;
    font-weight: 700;
}

.modal-price-paid {
    color: var(--accent-orange-light) !important;
    font-weight: 700;
}

/* --- Paid Button Variant --- */
.btn-paid {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #0a0b0e;
    font-weight: 700;
    border: none;
    text-decoration: none;
    cursor: pointer;
}

.btn-paid:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.3);
}

/* Paid card accent stripe */
/* Magnetic hover effect on buttons */
.btn {
    will-change: transform;
}

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    transform: scale(0);
    animation: rippleAnim 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleAnim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* --- Premium Cyberpunk Payment Modal --- */
.payment-cyber-modal {
    background: #050508 !important;
    border: 1px solid rgba(56, 189, 248, 0.4) !important;
    box-shadow: 0 0 50px rgba(8, 145, 178, 0.3), inset 0 0 30px rgba(56, 189, 248, 0.1) !important;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px 0;
}

/* Background Animated Grid */
.cyber-grid-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: 
        linear-gradient(rgba(56, 189, 248, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.3;
    animation: grid-move 10s linear infinite;
    mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
}

@keyframes grid-move {
    0% { transform: translateY(0); }
    100% { transform: translateY(20px); }
}

/* Background Glowing Orb */
.cyber-glow-orb {
    position: absolute;
    width: 250px;
    height: 250px;
    background: rgba(8, 145, 178, 0.4);
    filter: blur(80px);
    border-radius: 50%;
    top: -50px;
    left: -50px;
    z-index: 0;
    animation: orb-pulse 4s infinite alternate;
}

@keyframes orb-pulse {
    0% { transform: scale(1) translate(0, 0); opacity: 0.4; }
    100% { transform: scale(1.5) translate(30px, 30px); opacity: 0.7; }
}

.payment-header, .payment-body, .payment-footer {
    position: relative;
    z-index: 2;
}

.payment-close-btn {
    z-index: 50 !important;
    background: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
}

.payment-close-btn:hover {
    background: rgba(56, 189, 248, 0.2) !important;
    color: #fff !important;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

/* Cyber Title */
.cyber-title-wrapper {
    position: relative;
    display: inline-block;
}

.cyber-title {
    font-size: 24px !important;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #fff;
    margin: 0;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.cyber-title span {
    color: var(--accent-blue);
}

.cyber-title-bar {
    height: 2px;
    background: linear-gradient(90deg, transparent, #38bdf8, transparent);
    width: 150%;
    margin-left: -25%;
    margin-top: 10px;
}

/* QR HUD Borders */
.qr-hud-wrapper {
    position: relative;
    max-width: 270px;
    margin: 0 auto;
    padding: 15px;
}

.hud-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: #38bdf8;
    border-style: solid;
    z-index: 5;
    animation: hud-flicker 3s infinite;
}

@keyframes hud-flicker {
    0%, 98%, 100% { opacity: 1; }
    99% { opacity: 0.2; }
}

.hud-corner.top-left { top: 0; left: 0; border-width: 2px 0 0 2px; }
.hud-corner.top-right { top: 0; right: 0; border-width: 2px 2px 0 0; }
.hud-corner.bottom-left { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.hud-corner.bottom-right { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

.cyber-qr {
    border-radius: 12px;
    padding: 4px;
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.5);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.2) inset, 0 0 20px rgba(56, 189, 248, 0.1);
}

.cyber-scanner {
    position: absolute;
    top: 0;
    left: 4px; 
    width: calc(100% - 8px); 
    height: 3px;
    background: #fff;
    box-shadow: 0 0 15px 5px #38bdf8, 0 0 30px 8px #1e40af;
    animation: cyber-scan-vertical 2.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    z-index: 10;
}

@keyframes cyber-scan-vertical {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; height: 3px; }
    50% { height: 1px; box-shadow: 0 0 25px 10px #38bdf8; }
    90% { opacity: 1; height: 3px; }
    100% { top: calc(100% - 14px); opacity: 0; }
}

/* Info Rows */
.cyber-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 6px;
}

.cyber-text-glow {
    text-shadow: 0 0 10px rgba(129, 140, 248, 0.7);
    font-size: 15px;
    text-transform: uppercase;
}

.cyber-price-glow {
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.7);
    font-size: 17px;
    letter-spacing: 1px;
}

/* Syntax Code Wrapper */
.syntax-code-wrapper {
    position: relative;
    margin-top: 8px;
    background: #020617;
    border: 1px solid #10b981;
    border-radius: 8px;
    padding: 12px;
    overflow: hidden;
}

.cyber-code {
    position: relative;
    z-index: 2;
    font-size: 18px;
    color: #34d399;
    letter-spacing: 2px;
    text-shadow: 0 0 8px #10b981;
}

.syntax-bg-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.3), transparent);
    animation: scan-glitch 2.5s infinite linear;
}

@keyframes scan-glitch {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Note */
.cyber-note {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 3px solid #f59e0b;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    margin-top: 24px;
}

.cyber-note svg {
    color: #f59e0b;
    flex-shrink: 0;
    margin-top: 2px;
}

.cyber-note span {
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.5;
}

/* Button Shimmer */
.cyber-btn {
    position: relative;
    width: 100%;
    justify-content: center;
    background: linear-gradient(90deg, #1d4ed8, #3b82f6) !important;
    border: 1px solid #60a5fa !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4) !important;
    overflow: hidden;
    padding: 16px;
    font-size: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: bold;
    color: white;
    z-index: 1;
}

.cyber-btn-shimmer {
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-20deg);
    animation: btn-shimmer 3s infinite;
    z-index: -1;
}

@keyframes btn-shimmer {
    0% { left: -100%; }
    50%, 100% { left: 200%; }
}

/* Nút gửi bill qua Zalo — xanh Zalo */
.cyber-btn-zalo {
    background: linear-gradient(90deg, #0068ff, #00a2ff) !important;
    border: 1px solid #4db8ff !important;
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.45) !important;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    :root {
        --section-padding: 72px;
    }

    .container,
    .nav-container {
        padding: 0 20px;
    }

    /* Thẻ tự co 2–3 cột theo bề ngang */
    .plugins-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 52px;
    }

    body {
        cursor: auto;
    }

    .cursor-dot,
    .cursor-ring {
        display: none !important;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(300px, 80vw);
        height: 100vh;
        background: var(--bg-card);
        border-left: 1px solid var(--border-color);
        flex-direction: column;
        padding: 80px 24px 24px;
        gap: 4px;
        transition: right 0.4s var(--ease-out-expo);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-link {
        padding: 12px 16px;
        font-size: 16px;
    }

    .nav-link.active::after {
        left: 16px;
        transform: none;
        bottom: 8px;
    }

    .section-header {
        margin-bottom: 32px;
    }

    .marquee-top { margin-top: 76px; }

    /* 2 cột thẻ nhỏ gọn trên điện thoại */
    .plugins-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .plugin-card {
        padding: 16px;
    }

    .plugin-card-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .plugin-card-name {
        font-size: 14px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .modal-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 40px;
    }

    .container,
    .nav-container {
        padding: 0 16px;
    }

    .nav-logo-title {
        font-size: 19px;
    }

    .nav-logo-sub {
        font-size: 12px;
    }

    .plugins-grid {
        gap: 12px;
    }

    .plugin-card {
        padding: 13px;
    }

    .plugin-card-desc {
        font-size: 12px;
    }

    .feature-card {
        padding: 28px 18px;
    }

    /* Modal rộng gần hết màn hình nhỏ */
    .modal {
        width: calc(100% - 24px);
    }
}

/* =====================================================
   Skeleton Loader — thẻ giả hiển thị tức thì khi tải
   ===================================================== */
.skeleton-card {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    pointer-events: none;
}

.skeleton-card::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05) 50%,
        transparent
    );
    animation: skeletonShimmer 1.4s ease-in-out infinite;
}

@keyframes skeletonShimmer {
    100% { transform: translateX(100%); }
}

.sk-line {
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
}

.sk-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.sk-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
}

.sk-head-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sk-title { height: 14px; width: 70%; }
.sk-badge { height: 11px; width: 40%; }
.sk-desc { height: 11px; margin-bottom: 8px; }
.sk-desc.short { width: 60%; }

.sk-foot {
    display: flex;
    justify-content: space-between;
    margin-top: 22px;
}

.sk-foot .sk-line { height: 11px; }
.sk-foot .sk-line:first-child { width: 30%; }
.sk-foot .sk-line:last-child { width: 35%; }

@media (prefers-reduced-motion: reduce) {
    .skeleton-card::after { animation: none; }
}

@media (max-width: 768px) {
    .skeleton-card { padding: 16px; }
    .sk-icon { width: 40px; height: 40px; }
}

/* =====================================================
   Blog — danh sách bài (blog.php) + trang đọc (post.php)
   ===================================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.4s var(--ease-out-expo),
                box-shadow 0.4s var(--ease-out-expo),
                border-color 0.4s;
}

.blog-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: 0 20px 50px -16px rgba(0,0,0,0.5), 0 0 30px -12px var(--accent-green);
}

.blog-card-cover {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-secondary);
}

.blog-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-expo);
}

.blog-card:hover .blog-card-cover img {
    transform: scale(1.06);
}

.blog-card-cover-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(99,102,241,0.12));
}

.blog-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    flex: 1;
}

.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.blog-tag {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-green-light);
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.2);
    padding: 3px 9px;
    border-radius: 999px;
}

.blog-card-title {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-primary);
}

.blog-card-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-meta {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-tertiary);
}

.blog-card-readmore {
    color: var(--accent-green-light);
    font-weight: 600;
    transition: transform 0.3s var(--ease-out-expo);
}

.blog-card:hover .blog-card-readmore {
    transform: translateX(4px);
}

/* ─── Trang đọc bài (post.php) ─── */
.post-article {
    padding: 140px 0 80px;
}

.post-container {
    max-width: 760px;
}

.post-back {
    display: inline-block;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.post-back:hover { color: var(--accent-green-light); }

.post-head {
    margin-bottom: 28px;
}

.post-title {
    font-size: clamp(28px, 5vw, 46px);
    font-weight: 800;
    line-height: 1.2;
    margin: 14px 0 16px;
    color: var(--text-primary);
}

.post-meta {
    font-size: 14px;
    color: var(--text-tertiary);
}

.post-cover {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 36px;
    border: 1px solid var(--border-color);
}

.post-cover img {
    width: 100%;
    height: auto;
    display: block;
}

/* ─── Nội dung bài (HTML đã sanitize) — kiểu chữ hiện đại, thoáng ─── */
.post-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.post-content > *:first-child { margin-top: 0; }

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.3;
    margin: 1.8em 0 0.6em;
}

.post-content h1 { font-size: 30px; }
.post-content h2 { font-size: 25px; }
.post-content h3 { font-size: 21px; }
.post-content h4 { font-size: 18px; }

.post-content p { margin: 0 0 1.2em; }

.post-content a {
    color: var(--accent-green-light);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-content strong { color: var(--text-primary); font-weight: 700; }

.post-content ul,
.post-content ol {
    margin: 0 0 1.2em;
    padding-left: 1.5em;
}

.post-content li { margin-bottom: 0.5em; }

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5em 0;
    border: 1px solid var(--border-color);
}

.post-content blockquote {
    margin: 1.5em 0;
    padding: 12px 20px;
    border-left: 3px solid var(--accent-green);
    background: rgba(16,185,129,0.06);
    border-radius: 0 8px 8px 0;
    color: var(--text-secondary);
    font-style: italic;
}

.post-content code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: rgba(255,255,255,0.08);
    padding: 2px 6px;
    border-radius: 5px;
    color: var(--accent-orange-light);
}

.post-content pre {
    margin: 1.5em 0;
    padding: 18px 20px;
    background: #0b0d14;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow-x: auto;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2em 0;
}

.post-footer {
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--border-color);
}

/* =====================================================
   Blog/Post page — con trỏ hệ thống (không dùng custom cursor)
   body{cursor:none} toàn cục ẩn con trỏ thật; blog-page trả lại.
   ===================================================== */
.blog-page,
.blog-page button,
.blog-page a,
/* Con trỏ hệ thống cho trang blog (ghi đè body{cursor:none} toàn cục — cursor kế thừa) */
.blog-page { cursor: auto; }
.blog-page input,
.blog-page textarea,
.blog-page select {
    cursor: auto;
}
.blog-page a,
.blog-page button,
.blog-page .blog-card,
.blog-page .back-to-top {
    cursor: pointer;
}
.blog-page input,
.blog-page textarea {
    cursor: text;
}

/* Tăng tương phản chữ cho trang blog (nền ảnh sáng) */
.blog-page .section-desc { color: var(--text-secondary); }

/* =====================================================
   Nội dung bài viết — nâng cấp: bảng, căn lề, video, nút tải
   ===================================================== */
/* Body chữ sáng hơn để tương phản tốt với nền */
.post-content { color: #c7cbe0; }
.post-content p { color: #c7cbe0; }
.post-content li { color: #c7cbe0; }

/* Căn lề (Quill xuất class ql-align-*) + style inline text-align */
.post-content .ql-align-center,
.post-content [style*="text-align: center"] { text-align: center; }
.post-content .ql-align-right,
.post-content [style*="text-align: right"] { text-align: right; }
.post-content .ql-align-justify,
.post-content [style*="text-align: justify"] { text-align: justify; }

/* Quill indent (ql-indent-1..8) */
.post-content .ql-indent-1 { padding-left: 3em; }
.post-content .ql-indent-2 { padding-left: 6em; }
.post-content .ql-indent-3 { padding-left: 9em; }
.post-content .ql-indent-4 { padding-left: 12em; }

/* Bảng — viền rõ, header nổi bật, cuộn ngang trên mobile */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 15px;
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
    overflow: hidden;
}
.post-content th,
.post-content td {
    border: 1px solid var(--border-hover);
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
    color: #c7cbe0;
}
.post-content th {
    background: rgba(99,102,241,0.16);
    color: var(--text-primary);
    font-weight: 700;
}
.post-content tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

/* Video nhúng (iframe youtube/vimeo) — responsive 16:9 */
.post-content .video-embed,
.post-content iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin: 1.5em 0;
    display: block;
}

/* Nút tải về — link có class .btn-download-file */
.post-content a.btn-download-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    margin: 0.5em 0;
    background: var(--gradient-blue);
    color: #fff;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 8px 24px -8px rgba(99,102,241,0.6);
    transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s;
}
.post-content a.btn-download-file::before {
    content: '⬇';
    font-size: 1.1em;
}
.post-content a.btn-download-file:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -8px rgba(99,102,241,0.7);
}

/* Quill xuất size/font theo class — map sang giá trị thực */
.post-content .ql-size-small { font-size: 0.8em; }
.post-content .ql-size-large { font-size: 1.5em; }
.post-content .ql-size-huge { font-size: 2.2em; }
.post-content .ql-font-monospace { font-family: var(--font-mono); }
.post-content .ql-font-serif { font-family: Georgia, 'Times New Roman', serif; }

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .post-article { padding: 120px 0 60px; }
    .post-content { font-size: 16px; }
    /* Bảng cuộn ngang khi hẹp */
    .post-content table { display: block; overflow-x: auto; white-space: nowrap; }
}
