:root {
    --explorer-bg: #0a0a0a;
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #1982c4;
    --primary-rgb: 25, 130, 196;
    --accent-orange: #ff4d00;
    --text-muted: #888;
}

body.portfolio-explorer {
    background: var(--explorer-bg);
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    color: #fff;
    overflow-x: hidden;
}

/* Page Outer Padding */
.explorer-wrapper {
    max-width: 98%;
    margin: 0 auto;
    padding: 100px 20px 120px 20px;
}

/* --- HERO SECTION --- */
.explorer-hero {
    position: relative;
    margin-bottom: 40px;
    border-radius: 24px;
    overflow: hidden;
    background: url('../header/Images/site_icon.png') no-repeat center;
    background-size: cover;
}

.hero-glass-card {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    padding: 40px;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-tag {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 15px;
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    margin: 0 0 15px 0;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 40px rgba(var(--primary-rgb), 0.4);
}

.hero-subtitle {
    color: #ccc;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 25px;
    max-width: 500px;
}

.hero-content-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Ensure items don't stretch to full width */
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
}

.stat-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.stat-pill strong {
    color: #fff;
    font-size: 15px;
    margin-right: 4px;
}

/* Domain Taxonomy List */
.hero-domain-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.domain-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 13px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.domain-tag iconify-icon {
    font-size: 18px;
    color: var(--primary);
}

.domain-tag:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.2);
}

.hero-btn-sponsor {
    display: inline-block;
    background: #ff3300;
    color: white;
    text-decoration: none;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    padding: 12px 25px;
    border-radius: 30px;
    transition: 0.3s;
}

.hero-btn-sponsor:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(255, 51, 0, 0.3);
}

/* Hero Right Viewport */
.hero-featured-viewport {
    background: #000;
    border-radius: 12px;
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.hero-featured-viewport img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.viewport-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 51, 0, 0.9);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 4px;
}

/* --- NAV FILTERS --- */
.explorer-nav {
    margin-bottom: 40px;
    position: sticky;
    top: 80px;
    z-index: 100;
    background: var(--explorer-bg);
    padding: 10px 0;
}

.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-direction: row-reverse;
}

.filter-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
    scrollbar-width: none;
    flex: 1;
}

.filter-track::-webkit-scrollbar {
    display: none;
}

.nav-search {
    flex-shrink: 0;
}

.search-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 200px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.search-box:focus-within {
    width: 300px;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.2);
}

.search-box i {
    color: #666;
    font-size: 18px;
}

.search-box input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 13px;
    outline: none;
    width: 100%;
    font-family: inherit;
}

/* Tab/Mob specific search adjustment */
@media (max-width: 900px) {
    .nav-container {
        flex-direction: row-reverse;
        /* Keep search on right/left as requested */
        justify-content: space-between;
        gap: 10px;
        position: relative;
    }

    .nav-search {
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 10;
    }

    .search-box {
        width: 40px;
        /* Icon only width */
        padding: 8px 10px;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.05);
    }

    .search-box input {
        opacity: 0;
        width: 0;
        transition: 0.3s;
    }

    /* When the search box has focus or is active */
    .nav-search.active {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
    }

    .nav-search.active .search-box {
        width: 100% !important;
        background: var(--explorer-bg);
        border-color: var(--primary);
    }

    .nav-search.active .search-box input {
        opacity: 1;
        width: 100%;
        padding-left: 5px;
    }

    /* Hide filter track when search is active on mobile */
    .nav-container:has(.nav-search.active) .filter-track {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

.filter-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: #888;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn i {
    font-size: 16px;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.filter-btn.active {
    background: #1982c4;
    color: #fff;
    border-color: #1982c4;
}

/* --- RESPONSIVE GRID MODES --- */
.portfolio-grid {
    display: grid;
    gap: 15px;
    transition: all 0.3s ease;
}

/* Default Desktop (>1024px) */
.grid-mode-a {
    grid-template-columns: repeat(5, 1fr);
}

.grid-mode-b {
    grid-template-columns: repeat(6, 1fr);
}

.grid-mode-c {
    grid-template-columns: repeat(7, 1fr);
}

/* Tablet (768px to 1024px) */
@media (max-width: 1024px) {
    .grid-mode-a {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-mode-b {
        grid-template-columns: repeat(4, 1fr);
    }

    .grid-mode-c {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Mobile (<768px) */
@media (max-width: 768px) {
    .grid-mode-a {
        grid-template-columns: repeat(1, 1fr);
    }

    .grid-mode-b {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-mode-c {
        grid-template-columns: repeat(2, 1fr);
    }
}

.explorer-card {
    text-decoration: none;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.explorer-card:hover {
    transform: translateY(-5px);
    border-color: rgba(var(--primary-rgb), 0.3);
    z-index: 10;
}

.aspect-square {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
}

.aspect-square img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.33, 1, 0.68, 1), filter 0.4s ease;
}

.explorer-card.show {
    animation: cardAppear 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.explorer-card:hover .aspect-square img {
    transform: scale(1.1);
    filter: blur(5px) brightness(0.4);
}

/* Domain Chip */
.card-chip {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.8px;
    pointer-events: none;
    transition: 0.3s cubic-bezier(0.33, 1, 0.68, 1);
}

.explorer-card:hover .card-chip {
    opacity: 0;
    transform: translateX(-10px);
}

/* Card Overlay Enhancement */
.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 15px 15px 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.33, 1, 0.68, 1);
}

.explorer-card:hover .card-overlay {
    opacity: 1;
    transform: translateY(0);
}

.card-info-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 8px;
}

/* Author Info */
.card-author {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--primary);
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: none !important;
    /* Force clear avatar even if parent has filters */
}

.explorer-card:hover .author-avatar {
    transform: scale(1.15) rotate(5deg);
    border-color: #fff;
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.5);
}

.author-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.author-name {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 4px;
}

.verified-tick {
    color: #1a82c4;
    font-size: 10px;
}

.card-title {
    font-size: 13px;
    font-weight: 600;
    color: white;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Actions Row - Top Right */
.card-actions-row {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 20;
    opacity: 0.1;
    transition: 0.3s cubic-bezier(0.33, 1, 0.68, 1);
}

.explorer-card:hover .card-actions-row {
    opacity: 1;
}

/* Like Button */
.like-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.like-btn i {
    font-size: 16px;
    position: absolute;
}

.like-btn .heart-solid {
    opacity: 0;
    transform: scale(0);
    color: #ff4757;
}

.like-btn:hover {
    background: rgba(255, 71, 87, 0.2);
    transform: scale(1.1);
}

.like-btn.active {
    background: rgba(255, 71, 87, 0.15);
}

.like-btn.active .heart-hollow {
    opacity: 0;
    transform: scale(0);
}

.like-btn.active .heart-solid {
    opacity: 1;
    transform: scale(1);
}

/* 3 Dots Stats */
.card-stats-wrapper {
    position: relative;
    pointer-events: all;
}

.stats-trigger {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.stats-trigger:hover {
    background: var(--primary);
}

.stats-popup {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 12px;
    width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.card-stats-wrapper.active .stats-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.stat-item {
    font-size: 11px;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-item i {
    color: var(--primary);
    font-size: 14px;
}

.card-title {
    font-size: 12px;
    color: #fff;
    font-weight: 600;
    display: block;
}

/* --- FOOTER CONTROLS --- */
.explorer-footer {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 800px;
}

.footer-glass {
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 12px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}


.footer-left,
.footer-right {
    display: flex;
    gap: 10px;
}

.layout-toggle {
    background: transparent;
    border: none;
    color: #666;
    width: 38px;
    height: 38px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.layout-toggle:hover {
    color: #aaa;
}

.layout-toggle.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

/* Mobile Layout Toggle Speed-Dial Effect */
@media (max-width: 768px) {
    .footer-left {
        position: relative;
        width: 40px;
        height: 40px;
        z-index: 2000;
        display: flex;
        align-items: flex-end;
        justify-content: center;
    }

    /* Stack Container */
    .footer-left::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .layout-toggle {
        position: absolute;
        bottom: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px) scale(0.8);
        transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        background: #1a1a1a;
        width: 40px;
        height: 40px;
        border-radius: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--glass-border);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
        color: rgba(255, 255, 255, 0.4);
        z-index: 1;
    }

    /* Active button always visible at base */
    .layout-toggle.active {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) scale(1) !important;
        z-index: 10;
        background: var(--primary);
        color: white;
        border-color: rgba(255, 255, 255, 0.2);
    }

    /* Spread on Hover */
    .footer-left:hover .layout-toggle {
        opacity: 1;
        visibility: visible;
        transform: scale(1);
    }

    /* Optimized Stack Order (Consistent 10px Gap) */
    .layout-toggle[data-grid="c"] {
        display: none !important;
    }

    /* If A is at top, B at bottom (0) */
    .footer-left:hover .layout-toggle[data-grid="a"] {
        transform: translateY(-50px);
    }

    .footer-left:hover .layout-toggle[data-grid="b"] {
        transform: translateY(0);
    }

    /* Force active one to bottom visual layer but stay at 0 */
    .layout-toggle.active {
        transform: translateY(0) scale(1) !important;
    }

    /* Adjust the hovered transforms based on WHICH ONE is active */

    /* If 'b' is active, it stays at 0. 'a' moves to -50px */
    .footer-left:has(.layout-toggle.active[data-grid="b"]):hover .layout-toggle[data-grid="a"] {
        transform: translateY(-50px);
    }

    /* If 'a' is active, it stays at 0. 'b' move to -50. */
    .footer-left:has(.layout-toggle.active[data-grid="a"]):hover .layout-toggle[data-grid="b"] {
        transform: translateY(-50px);
    }
}

.domain-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 50px;
}

.tab-indicator {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 4px;
    background: var(--primary);
    border-radius: 100px;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 1;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.4);
}

.domain-btn {
    background: transparent;
    border: none;
    color: #888;
    padding: 8px 18px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.domain-btn iconify-icon,
.domain-btn i {
    font-size: 16px;
    opacity: 0.7;
    transition: 0.3s;
}

.domain-btn:hover {
    color: #bbb;
    background: rgba(255, 255, 255, 0.03);
}

.domain-btn.active {
    background: #1982c4;
    color: #fff;
}

/* Mobile Domain Tabs (Modal Trigger) */
@media (max-width: 900px) {
    .domain-tabs {
        display: flex;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--glass-border);
        border-radius: 50px;
        padding: 0;
        cursor: pointer;
        gap: 5px;
        overflow: hidden;
        max-width: 150px;
        /* Limit width */
    }

    .domain-btn {
        display: none !important;
    }

    .domain-btn.active {
        display: flex !important;
        opacity: 1;
        visibility: visible;
        height: 40px;
        padding: 8px 12px;
        background: var(--primary);
        color: white;
        border-radius: 50px;
        font-size: 13px;
        white-space: nowrap;
    }

    /* If multiple are active, hide labels for the rest to save space */
    .domain-btn.active~.domain-btn.active {
        padding: 8px;
    }

    .domain-btn.active~.domain-btn.active span {
        display: none;
    }
}

.software-trigger,
.explorer-close {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}

.software-trigger:hover {
    background: rgba(25, 130, 196, 0.3);
    transform: rotate(45deg);
}

@media (max-width: 900px) {
    .explorer-wrapper {
        padding-top: 80px;
    }

    .hero-glass-card {
        grid-template-columns: 1fr;
        padding: 30px 20px;
        gap: 25px;
        text-align: center;
    }

    .hero-content-left {
        align-items: center;
    }

    .hero-title {
        font-size: 28px;
        margin-bottom: 10px;
    }

    /* Hide non-essential elements for cleaner UI on mobile */
    .hero-subtitle,
    .hero-stats,
    .hero-btn-sponsor {
        display: none !important;
    }

    .hero-content-right {
        display: block;
        /* Show the featured image */
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .hero-featured-viewport {
        border-radius: 16px;
    }

    .grid-mode-a {
        grid-template-columns: repeat(1, 1fr);
    }

    .grid-mode-b {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-mode-c {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* MODAL STYLES */
.software-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.software-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.software-selector-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    width: 90%;
    max-width: 500px;
    background: #111;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.software-selector-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%);
}

/* Mobile Bottom Sheet & Refined UI */
@media (max-width: 768px) {
    .software-selector-modal {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(100%);
        width: 100%;
        max-width: none;
        border-radius: 24px 24px 0 0;
        padding: 25px 20px 40px 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    .software-selector-modal.active {
        transform: translateY(0);
    }

    /* Add a "handle" icon at the top of bottom sheet */
    .software-selector-modal::before {
        content: "";
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: #555;
    font-size: 28px;
    cursor: pointer;
}

.modal-close-btn:hover {
    color: #fff;
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-height: 350px;
    overflow-y: auto;
    padding: 5px;
}

.software-item {
    background: #1a1a1a;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 5px 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.2s;
    position: relative;
    justify-content: flex-start;
}

.software-item:hover {
    background: #222;
    border-color: rgba(255, 255, 255, 0.2);
}

.software-item.selected {
    border-color: #1982c4;
    background: rgba(25, 130, 196, 0.1);
}

.software-item iconify-icon {
    font-size: 20px;
}

.sw-name {
    font-size: 12px;
    font-weight: 600;
    color: #eee;
    text-align: left;
}

.sw-check {
    position: absolute;
    top: 5px;
    right: 8px;
    color: #1982c4;
    font-size: 14px;
    opacity: 0;
}

.software-item.selected .sw-check {
    opacity: 1;
}

.modal-footer {
    margin-top: 30px;
    text-align: center;
}

.apply-filters-btn {
    background: #1982c4;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.apply-filters-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(25, 130, 196, 0.4);
}

/* RESPONSIVE LAYOUTS */
@media (max-width: 900px) {
    .hero-featured-viewport {
        display: block;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        border-radius: 16px;
    }
}

/* MODAL STYLES */
.software-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.software-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.software-selector-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    width: 90%;
    max-width: 500px;
    background: #111;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.software-selector-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%);
}

/* Mobile Bottom Sheet & Refined UI */
@media (max-width: 768px) {
    .software-selector-modal {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(100%);
        width: 100%;
        max-width: none;
        border-radius: 24px 24px 0 0;
        padding: 25px 20px 40px 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    .software-selector-modal.active {
        transform: translateY(0);
    }

    /* Add a "handle" icon at the top of bottom sheet */
    .software-selector-modal::before {
        content: "";
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: #555;
    font-size: 28px;
    cursor: pointer;
}

.modal-close-btn:hover {
    color: #fff;
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-height: 350px;
    overflow-y: auto;
    padding: 5px;
}

.software-item {
    background: #1a1a1a;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 5px 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.2s;
    position: relative;
    justify-content: flex-start;
}

.software-item:hover {
    background: #222;
    border-color: rgba(255, 255, 255, 0.2);
}

.software-item.selected {
    border-color: #1982c4;
    background: rgba(25, 130, 196, 0.1);
}

.software-item iconify-icon {
    font-size: 20px;
}

.sw-name {
    font-size: 12px;
    font-weight: 600;
    color: #eee;
    text-align: left;
}

.sw-check {
    position: absolute;
    top: 5px;
    right: 8px;
    color: #1982c4;
    font-size: 14px;
    opacity: 0;
}

.software-item.selected .sw-check {
    opacity: 1;
}

.modal-footer {
    margin-top: 30px;
    text-align: center;
}

.apply-filters-btn {
    background: #1982c4;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.apply-filters-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(25, 130, 196, 0.4);
}

/* --- TEMPLATE CARD STYLES --- */
.card-market-content,
.card-blog-content,
.card-course-content {
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #111;
}

.explorer-card .card-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.explorer-card.type-market .card-img-wrapper {
    aspect-ratio: 16/9;
}

.explorer-card .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.explorer-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

/* MARKET */
.card-market-title {
    font-size: 12px;
    font-weight: 700;
    color: #bebebe;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-market-cat {
    color: #888;
    font-weight: 400;
}

.card-market-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: #aaa;
}

.card-market-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.card-market-meta i {
    font-size: 12px;
}

.card-market-rating {
    background: #1982c4;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 2px 6px;
    border-radius: 5px;
    font-weight: 700;
}

.card-market-free-chip {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgb(7 39 19);
    color: #22c55e;
    border: 1px solid #22c55e;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    z-index: 10;
}

.card-new-chip {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgb(127 49 49 / 71%);
    color: #ffffff;
    border: 1px solid rgb(255 0 0);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    z-index: 12;
    backdrop-filter: blur(6px);
    pointer-events: none;
}

.explorer-card.is-new .card-actions-row {
    top: 42px;
}

.explorer-card.is-new .card-course-level-badge {
    top: 34px;
}

.card-market-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-market-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #ccc;
}

.card-market-author img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

.card-market-price {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

.card-market-view-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -30%);
    background: #1982c4;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: 0.3s;
    z-index: 20;
    border: none;
    cursor: pointer;
}

.explorer-card:hover .card-market-view-btn {
    opacity: 1;
    transform: translate(-50%, -50%);
}

/* BLOG */
.card-blog-meta {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #aaa;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.card-blog-title {
    font-size: 10px;
    font-weight: 700;
    color: #bebebe;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-blog-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #ccc;
}

.card-blog-author img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

.pro-badge {
    background: #1982c4;
    color: #fff;
    font-size: 8px;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: 700;
}

.card-blog-stats {
    display: flex;
    gap: 15px;
    font-size: 11px;
    color: #666;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: auto;
}

.card-blog-stats div {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-blog-stats i {
    font-size: 13px;
}

/* COURSE */
.card-course-chip-row {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
    flex-wrap: wrap;
}

.card-course-chip-row .card-course-domain {
    position: static;
    top: auto;
    left: auto;
}

.card-course-type-badge {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.card-course-domain {
    position: absolute;
    top: 10px;
    left: 10px;
    border: 1px solid #ddd;
    color: #000;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-course-level-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    z-index: 10;
}

.card-course-softwares {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: -5px;
    z-index: 10;
    background: rgb(19 19 19 / 80%);
    padding: 4px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-course-softwares iconify-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    padding: 2px;
    border: 1.5px solid #131313;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-course-title {
    font-size: 10px;
    font-weight: 700;
    color: #bebebe;
    margin-bottom: 8px;
    line-height: 1.4;
}

.card-course-footer {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: #888;
    gap: 8px;
}

.card-course-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-course-author img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.card-course-author-name {
    color: #fff;
    font-weight: 500;
    opacity: 0.8;
}

.card-course-footer .dot {
    width: 3px;
    height: 3px;
    background: #555;
    border-radius: 50%;
}

.card-course-duration {
    color: var(--text-muted);
}

.card-image-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;

}

/* Locked Card Styles */
.explorer-card.is-locked .aspect-square img,
.explorer-card.is-locked .card-img-wrapper img {
    filter: blur(15px) brightness(0.6);
    pointer-events: none;
}

.explorer-card.is-locked:hover .aspect-square img {
    filter: blur(20px) brightness(0.4);
}

.card-lock-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    text-align: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.explorer-card.is-locked:hover .card-lock-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.4);
}

.lock-icon-wrap {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: #fff;
    font-size: 1.2rem;
}

.lock-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lock-login-btn {
    background: var(--as-primary, #007aff);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lock-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 122, 255, 0.3);
    background: #0088ff;
}
