/**
 * Phần mềm — đồng bộ frontend-gizadatav2/phanmem.html (compact search + bento modal).
 * Toàn bộ scope #view-phanmem để không đụng Tailwind/Lucide trang khác.
 */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;800;900&display=swap");

@keyframes pm-fadeUp {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes pm-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
@keyframes pm-spin {
    to { transform: rotate(360deg); }
}

/* Khi mở modal: nâng section trên .vps-header (z-index 50).
   Không dùng .animate-fade-up trên <section id="view-phanmem"> — transform trên section
   khiến position:fixed của .modal bám theo section thay vì viewport, backdrop không phủ hết màn. */
#view-phanmem.phanmem-modal-open {
    position: relative;
    z-index: 120;
}

#view-phanmem {
    --bg-color: #020617;
    --surface-color: rgba(15, 23, 42, 0.3);
    --surface-solid: #0f172a;
    --text-main: #cbd5e1;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    --cyan-400: #22d3ee;
    --cyan-500: #06b6d4;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --purple-400: #c084fc;
    --purple-500: #a855f7;
    --purple-600: #9333ea;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --border-light: rgba(255, 255, 255, 0.05);
    --border-hover: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#view-phanmem *,
#view-phanmem *::before,
#view-phanmem *::after {
    box-sizing: border-box;
}

#view-phanmem .phanmem-surface {
    position: relative;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    color: var(--text-main);
    line-height: 1.5;
    /* min-height: 65vh; */
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

#view-phanmem .phanmem-surface h1,
#view-phanmem .phanmem-surface h2,
#view-phanmem .phanmem-surface h3,
#view-phanmem .phanmem-surface h4 {
    color: var(--text-white);
    font-weight: 800;
}

#view-phanmem .pm-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#view-phanmem .pm-hidden {
    display: none !important;
}

#view-phanmem .phanmem-error-msg {
    text-align: center;
    color: #f87171;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

#view-phanmem .phanmem-loading-wrap {
    display: none;
    justify-content: center;
    padding: 4rem 0;
}
#view-phanmem .phanmem-loading-wrap.is-visible {
    display: flex;
}
#view-phanmem .phanmem-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid rgba(34, 211, 238, 0.2);
    border-top-color: var(--cyan-400);
    border-radius: 50%;
    animation: pm-spin 0.8s linear infinite;
}

#view-phanmem .font-black { font-weight: 900; }
#view-phanmem .font-bold { font-weight: 700; }
#view-phanmem .font-medium { font-weight: 600; }

#view-phanmem .container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 10;
}
#view-phanmem .py-16 { padding-top: 4rem; padding-bottom: 4rem; }
#view-phanmem .mb-16 { margin-bottom: 4rem; }
#view-phanmem .text-center { text-align: center; }

#view-phanmem .ambient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* min-height: 70vh; */
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
#view-phanmem .glow-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
}
#view-phanmem .glow-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: rgba(147, 51, 234, 0.1); }
#view-phanmem .glow-2 { top: 20%; right: -10%; width: 40vw; height: 40vw; background: rgba(6, 182, 212, 0.1); }
#view-phanmem .glow-3 { bottom: -20%; left: 20%; width: 60vw; height: 60vw; background: rgba(37, 99, 235, 0.1); filter: blur(150px); }

#view-phanmem .text-glow-white { text-shadow: 0 0 30px rgba(255, 255, 255, 0.2); }
#view-phanmem .tracking-tighter { letter-spacing: -0.05em; }
#view-phanmem .hero-title { font-size: 3rem; line-height: 1.1; margin-bottom: 1.5rem; }

#view-phanmem .glass-card {
    background: var(--surface-color);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-light);
    border-radius: 40px;
}

#view-phanmem .flex { display: flex; }
#view-phanmem .flex-col { flex-direction: column; }
#view-phanmem .items-center { align-items: center; }
#view-phanmem .justify-center { justify-content: center; }
#view-phanmem .justify-end { justify-content: flex-end; }
#view-phanmem .justify-between { justify-content: space-between; }
#view-phanmem .gap-2 { gap: 0.5rem; }
#view-phanmem .gap-3 { gap: 0.75rem; }
#view-phanmem .gap-4 { gap: 1rem; }
#view-phanmem .flex-wrap { flex-wrap: wrap; }

#view-phanmem .grid { display: grid; }
#view-phanmem .card-grid { grid-template-columns: 1fr; gap: 1.5rem; }

@media (min-width: 768px) {
    #view-phanmem .hero-title { font-size: 3.5rem; }
    #view-phanmem .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    #view-phanmem .hero-title { font-size: 4rem; }
    #view-phanmem .card-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}

#view-phanmem svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
#view-phanmem .icon-lg { width: 2rem; height: 2rem; }
#view-phanmem .icon-sm { width: 1rem; height: 1rem; }
#view-phanmem .icon-xs { width: 0.875rem; height: 0.875rem; }

/* Compact search */
#view-phanmem .search-container {
    max-width: 42rem;
    margin: 0 auto 4rem;
    padding: 0 1rem;
    position: relative;
    z-index: 20;
}
#view-phanmem .search-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 0.375rem;
    transition: var(--transition);
    border-radius: 20px;
}
#view-phanmem .search-wrapper:focus-within {
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.1);
}
#view-phanmem .input-group { position: relative; flex: 1; }
#view-phanmem .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
#view-phanmem .search-input,
#view-phanmem .search-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-white);
    border: none;
    border-radius: 16px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}
#view-phanmem .search-input::placeholder { color: var(--text-muted); }
#view-phanmem .search-input { padding: 0.875rem 1rem 0.875rem 2.75rem; }
#view-phanmem .search-select {
    appearance: none;
    padding: 0.875rem 2.5rem 0.875rem 1.25rem;
    cursor: pointer;
}
#view-phanmem .select-wrapper { position: relative; width: 100%; }
#view-phanmem .select-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
#view-phanmem .search-divider { display: none; }

@media (min-width: 640px) {
    #view-phanmem .search-wrapper {
        flex-direction: row;
        border-radius: 999px;
        gap: 0;
        align-items: center;
    }
    #view-phanmem .search-input,
    #view-phanmem .search-select {
        background: transparent;
        border-radius: 999px;
    }
    #view-phanmem .search-input:hover,
    #view-phanmem .search-select:hover {
        background: rgba(255, 255, 255, 0.02);
    }
    #view-phanmem .select-wrapper { width: 16rem; flex-shrink: 0; }
    #view-phanmem .search-divider {
        display: block;
        width: 1px;
        height: 1.5rem;
        background: var(--border-light);
        margin: 0 0.25rem;
    }
}

/* Cards */
#view-phanmem .software-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition-slow);
}
#view-phanmem .software-card:hover {
    transform: translateY(-8px);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 20px 40px -15px rgba(34, 211, 238, 0.15);
}
#view-phanmem .software-card--paid:hover {
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 20px 40px -15px rgba(245, 158, 11, 0.12);
}

#view-phanmem .card-header {
    height: 12rem;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), transparent);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 1.5rem 1.5rem 0;
}
#view-phanmem .card-tags {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
    z-index: 10;
}
#view-phanmem .tag {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 999px;
    backdrop-filter: blur(12px);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
#view-phanmem .tag-active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--emerald-400);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
#view-phanmem .tag-free {
    background: rgba(6, 182, 212, 0.2);
    color: var(--cyan-400);
    border: 1px solid rgba(6, 182, 212, 0.2);
}
#view-phanmem .tag-paid {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.25);
}
#view-phanmem .tag-app {
    background: rgba(59, 130, 246, 0.2);
    color: var(--blue-400);
    border: 1px solid rgba(59, 130, 246, 0.2);
}
#view-phanmem .dot-pulse {
    width: 6px;
    height: 6px;
    background-color: var(--emerald-400);
    border-radius: 50%;
    animation: pm-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

#view-phanmem .mock-ui {
    width: 80%;
    height: 100%;
    background: var(--slate-800);
    border-radius: 20px 20px 0 0;
    border: 1px solid var(--border-light);
    border-bottom: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.5s ease;
}
#view-phanmem .software-card:hover .mock-ui { transform: scale(1.05); }

#view-phanmem .card-icon-img {
    max-height: 140px;
    width: auto;
    max-width: 80%;
    object-fit: contain;
    border-radius: 12px;
}

#view-phanmem .card-body { padding: 2rem; display: flex; flex-direction: column; flex: 1; }
#view-phanmem .card-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    transition: var(--transition);
    letter-spacing: -0.025em;
    color: var(--text-white);
}
#view-phanmem .software-card:hover .card-title { color: var(--cyan-400); }
#view-phanmem .card-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#view-phanmem .card-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-top: 1px solid var(--border-light);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}
#view-phanmem .version-badge {
    padding: 0.25rem 0.625rem;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

#view-phanmem .btn-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: auto;
}
#view-phanmem .btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 1rem;
}
#view-phanmem .btn:disabled { opacity: 0.5; cursor: not-allowed; }
#view-phanmem .btn-secondary {
    background: var(--slate-800);
    color: var(--text-white);
    border-color: var(--border-light);
}
#view-phanmem .btn-secondary:hover {
    background: var(--slate-700);
    border-color: rgba(255, 255, 255, 0.1);
}
#view-phanmem .btn-secondary:hover svg { color: var(--cyan-400); }

#view-phanmem .btn-primary {
    background: rgba(16, 185, 129, 0.1);
    color: var(--emerald-400);
    border-color: rgba(16, 185, 129, 0.2);
}
#view-phanmem .btn-primary:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

#view-phanmem .btn-amber {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.3);
}
#view-phanmem .btn-amber:hover { background: rgba(245, 158, 11, 0.25); }

#view-phanmem .btn-cyan {
    background: rgba(6, 182, 212, 0.12);
    color: var(--cyan-400);
    border-color: rgba(6, 182, 212, 0.3);
}
#view-phanmem .btn-cyan:hover { background: rgba(6, 182, 212, 0.2); }

/* Licensed download (card) — giữ logic màu theo ngày */
#view-phanmem .btn-dl-lifetime {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}
#view-phanmem .btn-dl-lifetime:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.6);
}
#view-phanmem .btn-dl-ok {
    background: rgba(16, 185, 129, 0.15);
    color: var(--emerald-400);
    border-color: rgba(16, 185, 129, 0.35);
}
#view-phanmem .btn-dl-ok:hover { background: rgba(16, 185, 129, 0.25); }
#view-phanmem .btn-dl-warn {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.45);
}
#view-phanmem .btn-dl-warn:hover { background: rgba(245, 158, 11, 0.3); }
#view-phanmem .btn-dl-danger {
    background: rgba(248, 113, 113, 0.15);
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.4);
}
#view-phanmem .btn-dl-danger:hover { background: rgba(248, 113, 113, 0.25); }

#view-phanmem .dl-badge {
    margin-left: 0.35rem;
    padding: 0.15rem 0.45rem;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 999px;
    white-space: nowrap;
}
#view-phanmem .dl-badge--muted {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
#view-phanmem .dl-badge--warn {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.25);
}
#view-phanmem .dl-badge--danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
#view-phanmem .dl-badge--ok {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

#view-phanmem .price-teaser {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
#view-phanmem .price-teaser strong {
    display: block;
    font-size: 1rem;
    color: var(--cyan-400);
    font-weight: 800;
    margin-top: 0.15rem;
}

#view-phanmem .card-empty {
    border: 1px dashed rgba(255, 255, 255, 0.1);
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0.5;
    cursor: default;
}
#view-phanmem .card-empty:hover {
    opacity: 1;
    transform: none;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.2);
}
#view-phanmem .empty-icon {
    width: 4rem;
    height: 4rem;
    background: var(--slate-800);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

#view-phanmem .animate-fade-up {
    opacity: 0;
    animation: pm-fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
#view-phanmem .delay-100 { animation-delay: 100ms; }
#view-phanmem .delay-200 { animation-delay: 200ms; }
#view-phanmem .delay-300 { animation-delay: 300ms; }

/* Modal — căn giữa màn hình (ngang + dọc). Padding 20px + safe-area ⇒ luôn cách top/bottom 20px.
   Nội dung dài: .modal-content giới hạn max-height, cuộn trong .modal-body.
   Không đặt min-height: 0 ở đây — sẽ ghi đè min-height 100vh/svh và làm overlay thấp hơn viewport. */
#view-phanmem .modal {
    --pm-modal-edge: 20px;
    --pm-modal-pad-x: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    z-index: 100;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: calc(var(--pm-modal-edge) + env(safe-area-inset-top, 0px)) max(var(--pm-modal-pad-x), env(safe-area-inset-right, 0px)) calc(var(--pm-modal-edge) + env(safe-area-inset-bottom, 0px)) max(var(--pm-modal-pad-x), env(safe-area-inset-left, 0px));
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s;
}
@supports (height: 100dvh) {
    #view-phanmem .modal {
        min-height: 100dvh;
    }
}
#view-phanmem .modal.active {
    visibility: visible;
    opacity: 1;
}
#view-phanmem .modal-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    cursor: pointer;
}
#view-phanmem .modal-content {
    --pm-modal-max-h: calc(100vh - (2 * var(--pm-modal-edge)) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(32px);
    border: 1px solid var(--border-light);
    border-radius: 32px;
    width: 100%;
    max-width: 64rem;
    flex: 0 1 auto;
    min-height: 0;
    max-height: var(--pm-modal-max-h);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}
@supports (height: 100dvh) {
    #view-phanmem .modal-content {
        --pm-modal-max-h: calc(100dvh - (2 * var(--pm-modal-edge)) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    }
}
#view-phanmem .modal.active .modal-content { transform: scale(1); }

#view-phanmem .btn-close {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--slate-800);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    margin-left: auto;
}
#view-phanmem .btn-close:hover {
    background: var(--slate-700);
    color: var(--text-white);
    border-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

#view-phanmem .btn-close--phanmem-corner {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    z-index: 10;
    width: 1.75rem;
    height: 1.75rem;
    margin: 0;
    flex-shrink: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
#view-phanmem .btn-close--phanmem-corner:hover {
    transform: rotate(90deg) scale(1.05);
}

#view-phanmem .modal-body--phanmem {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#view-phanmem .modal-body__scroll {
    flex: 1 1 auto;
    min-height: 0;
    padding: 1.5rem;
    padding-top: 2rem;
    padding-right: 2.25rem;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--slate-700) var(--slate-900);
}

@media (min-width: 768px) {
    #view-phanmem .modal-body__scroll {
        display: grid;
        grid-template-columns: 1.5fr 1fr;
        gap: 1.25rem;
        align-items: start;
        padding: 1.75rem 2rem 2rem 2rem;
        padding-right: 2.25rem;
    }
    #view-phanmem .bento-left {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }
    #view-phanmem .bento-right {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
        position: sticky;
        top: 0;
    }
}

#view-phanmem .bento-box {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 1.5rem;
    transition: var(--transition);
}
#view-phanmem .bento-box:hover { border-color: rgba(255, 255, 255, 0.1); }

#view-phanmem .app-hero {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    margin-bottom: 1rem;
}
#view-phanmem .app-icon-compact {
    width: 4.5rem;
    height: 4.5rem;
    background: var(--slate-800);
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}
#view-phanmem .app-icon-compact::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top right, rgba(6, 182, 212, 0.2), rgba(168, 85, 247, 0.2));
    filter: blur(4px);
}
#view-phanmem .app-icon-compact-inner {
    position: relative;
    width: 70%;
    height: 70%;
    background: var(--slate-900);
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    padding: 0.25rem;
    z-index: 1;
}
#view-phanmem .app-icon-compact img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0.35rem;
}

#view-phanmem .app-title-compact {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
    color: var(--text-white);
}
#view-phanmem .app-desc-compact {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

#view-phanmem .img-preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--slate-900);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
#view-phanmem .img-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#view-phanmem .btn-download-main {
    width: 100%;
    padding: 1rem 2rem;
    border-radius: 20px;
    background: var(--blue-600);
    color: white;
    border: none;
    font-size: 1.125rem;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 0 25px rgba(37, 99, 235, 0.3);
    transition: var(--transition);
    margin-bottom: 1.25rem;
    font-family: inherit;
}
#view-phanmem .btn-download-main:hover {
    background: var(--blue-500);
    box-shadow: 0 0 35px rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}
#view-phanmem .btn-download-main.dl-lic-lifetime {
    background: var(--emerald-500);
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.35);
}
#view-phanmem .btn-download-main.dl-lic-lifetime:hover { background: var(--emerald-400); }
#view-phanmem .btn-download-main.dl-lic-warn {
    background: #d97706;
    box-shadow: 0 0 20px rgba(217, 119, 6, 0.35);
}
#view-phanmem .btn-download-main.dl-lic-warn:hover { background: #ea580c; }
#view-phanmem .btn-download-main.dl-lic-danger {
    background: #b91c1c;
    box-shadow: 0 0 20px rgba(185, 28, 28, 0.35);
}
#view-phanmem .btn-download-main.dl-lic-danger:hover { background: #dc2626; }

#view-phanmem .stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
#view-phanmem .stat-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.75rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.02);
}
#view-phanmem .stat-value {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text-white);
}
#view-phanmem .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-top: 0.25rem;
}

#view-phanmem .stat-value--stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
}
#view-phanmem .stat-value__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan-400);
}
#view-phanmem .stat-platform-name {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.3;
    text-align: center;
    word-break: break-word;
    max-width: 100%;
    text-transform: capitalize;
    letter-spacing: normal;
}
#view-phanmem .stat-item--platform .stat-label {
    margin-top: 0.35rem;
}

#view-phanmem .v-meta-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 0.25rem;
}
#view-phanmem .v-meta-stat {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    min-width: 0;
    flex: 1 1 auto;
}
#view-phanmem .v-meta-stat__icon {
    flex-shrink: 0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    margin-top: 0.1rem;
}
#view-phanmem .v-meta-stat__body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
#view-phanmem .v-meta-stat__label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
#view-phanmem .v-meta-stat__value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-white);
}

#view-phanmem .btn-download-main .dl-badge {
    display: inline-flex;
    margin-top: 0.35rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
}

#view-phanmem .bento-left .img-preview {
    max-height: min(48vh, 380px);
}
#view-phanmem .bento-left .img-preview img {
    object-fit: contain;
}

#view-phanmem .section-title {
    font-size: 1.125rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-white);
}
#view-phanmem .v-list { display: flex; flex-direction: column; gap: 0.75rem; }
#view-phanmem .v-item {
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
#view-phanmem .v-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}
#view-phanmem .v-item.latest {
    border-color: rgba(6, 182, 212, 0.3);
    background: rgba(6, 182, 212, 0.05);
}
#view-phanmem .v-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
#view-phanmem .v-name { font-weight: 800; font-size: 1rem; color: var(--text-white); }
#view-phanmem .v-desc { font-size: 0.875rem; color: var(--text-muted); }

#view-phanmem .btn-view-all {
    width: 100%;
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.5rem;
}
#view-phanmem .btn-view-all:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
    border-style: solid;
}

/* Giá (trả phí) trong modal */
#view-phanmem .pricing-compact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
#view-phanmem .price-mini {
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    background: rgba(0, 0, 0, 0.15);
}
#view-phanmem .price-mini--cyan { border-color: rgba(6, 182, 212, 0.3); }
#view-phanmem .price-mini--emerald { border-color: rgba(16, 185, 129, 0.3); }
#view-phanmem .price-mini select {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    background: var(--slate-900);
    color: var(--text-white);
    border: 1px solid var(--border-light);
    font-family: inherit;
    font-size: 0.875rem;
}
#view-phanmem .price-mini .btn-purchase {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: inherit;
    background: var(--cyan-500);
    color: #fff;
}
#view-phanmem .price-mini .btn-purchase--life {
    background: var(--emerald-500);
}

#view-phanmem .v-dl-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    background: var(--blue-600);
    color: #fff;
    white-space: nowrap;
}
#view-phanmem .v-dl-btn:hover { background: var(--blue-500); }
