:root {
    --green: #10b981;
    --green-hover: #059669;
    --green-soft: rgba(16, 185, 129, 0.1);
    --blue: #2563eb;
    --blue-soft: rgba(37, 99, 235, 0.1);
    --blue-hover: #1d4ed8;
    --purple: #8b5cf6;
    --text: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dimmed: #6b7280;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(16, 185, 129, 0.35);
    --surface: rgba(13, 16, 23, 0.65);
    --surface-hover: rgba(20, 26, 38, 0.85);
    --white: #ffffff;
    --error: #ef4444;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    --font-title: 'Plus Jakarta Sans', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

input,
button,
select,
textarea {
    font-family: inherit;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 0%, rgba(16, 185, 129, 0.08), transparent 30rem),
        radial-gradient(circle at 90% 16%, rgba(37, 99, 235, 0.06), transparent 25rem),
        url("../assets/background.png") center top / cover fixed,
        #07090e;
    color: var(--text);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background 0.4s ease;
}

body.logged-in {
    /* Keep background.png but darken it slightly for high readability of dashboard */
    background:
        radial-gradient(circle at 18% 0%, rgba(16, 185, 129, 0.05), transparent 40rem),
        radial-gradient(circle at 90% 16%, rgba(37, 99, 235, 0.04), transparent 35rem),
        linear-gradient(rgba(7, 9, 14, 0.35), rgba(7, 9, 14, 0.65)),
        url("../assets/background.png") center top / cover fixed,
        #07090e;
}

/* Custom Select Dropdown UI for premium consistency */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select {
    position: relative;
    width: 100%;
}

.select-selected {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background-color: rgba(13, 16, 23, 0.82);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.select-selected:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background-color: rgba(20, 26, 38, 0.92);
}

.custom-select.active {
    z-index: 120;
}

.custom-select.active .select-selected {
    border-color: rgba(16, 185, 129, 0.55);
    background-color: rgba(13, 16, 23, 0.96);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.select-arrow {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    transition: transform 0.25s ease, color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.custom-select.active .select-arrow {
    transform: rotate(180deg);
    color: var(--white);
}

.select-items {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: rgba(13, 16, 23, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 6px;
    box-shadow: var(--shadow-lg), 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 110;
    max-height: 200px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-select.active .select-items {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.select-item {
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.select-item:hover {
    background: rgba(16, 185, 129, 0.08);
    color: var(--green);
}

.select-item.selected {
    background: rgba(16, 185, 129, 0.12);
    color: var(--green);
    font-weight: 700;
}

/* Dynamic Custom Select Brand Themes */
/* Soundify (Orange Theme) */
.product-card[data-product="soundify"] .custom-select.active .select-selected {
    border-color: rgba(255, 101, 0, 0.55);
    box-shadow: 0 0 0 3px rgba(255, 101, 0, 0.12);
}

.product-card[data-product="soundify"] .custom-select.active .select-arrow {
    color: #ff6500 !important;
}

.product-card[data-product="soundify"] .custom-select.active .select-items {
    border-color: rgba(255, 101, 0, 0.35);
    box-shadow: var(--shadow-lg), 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 101, 0, 0.08);
}

.product-card[data-product="soundify"] .select-item:hover {
    background: rgba(255, 101, 0, 0.08);
    color: #ff6500;
}

.product-card[data-product="soundify"] .select-item.selected {
    background: rgba(255, 101, 0, 0.12);
    color: #ff6500;
}

/* VCraft Reborn (Blue Theme) */
.product-card[data-product="vcraftReborn"] .custom-select.active .select-selected {
    border-color: rgba(59, 130, 246, 0.55);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.product-card[data-product="vcraftReborn"] .custom-select.active .select-arrow {
    color: #3b82f6 !important;
}

.product-card[data-product="vcraftReborn"] .custom-select.active .select-items {
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: var(--shadow-lg), 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(59, 130, 246, 0.08);
}

.product-card[data-product="vcraftReborn"] .select-item:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #3b82f6;
}

.product-card[data-product="vcraftReborn"] .select-item.selected {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

/* VCraft (Blue Theme) */
.product-card[data-product="vcraft"] .custom-select.active .select-selected {
    border-color: rgba(59, 130, 246, 0.55);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.product-card[data-product="vcraft"] .custom-select.active .select-arrow {
    color: #3b82f6 !important;
}

.product-card[data-product="vcraft"] .custom-select.active .select-items {
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: var(--shadow-lg), 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(59, 130, 246, 0.08);
}

.product-card[data-product="vcraft"] .select-item:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #3b82f6;
}

.product-card[data-product="vcraft"] .select-item.selected {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

/* GDuck16x (Pack Green Theme) */
.product-card[data-product="gduck16x"] .custom-select.active .select-selected {
    border-color: rgba(143, 205, 102, 0.55);
    box-shadow: 0 0 0 3px rgba(143, 205, 102, 0.12);
}

.product-card[data-product="gduck16x"] .custom-select.active .select-arrow {
    color: #8FCD66 !important;
}

.product-card[data-product="gduck16x"] .custom-select.active .select-items {
    border-color: rgba(143, 205, 102, 0.35);
    box-shadow: var(--shadow-lg), 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(143, 205, 102, 0.08);
}

.product-card[data-product="gduck16x"] .select-item:hover {
    background: rgba(143, 205, 102, 0.08);
    color: #8FCD66;
}

.product-card[data-product="gduck16x"] .select-item.selected {
    background: rgba(143, 205, 102, 0.12);
    color: #8FCD66;
}



/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(7, 9, 14, 0.3);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.4);
    border-radius: 9999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

h1,
h2,
h3 {
    font-family: var(--font-title);
    font-weight: 700;
}

.shell {
    width: 100%;
    margin: 0 auto;
    padding: 0 0 50px;
}

/* Topbar Header */
.topbar {
    width: 100%;
    min-height: 72px;
    padding: 12px clamp(16px, 4vw, 48px);
    background: rgba(7, 9, 14, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 100;
    transition: all 0.3s ease;
}

.topbar::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 32px;
    background: linear-gradient(to bottom, rgba(7, 9, 14, 0.5), rgba(7, 9, 14, 0));
    pointer-events: none;
}


.brand {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    text-decoration: none;
    cursor: default;
}

.brand:hover,
.brand:focus {
    outline: none;
    text-decoration: none;
}

.brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: transparent;
    overflow: hidden;
    flex-shrink: 0;
    pointer-events: none;
}

.brand-title {
    color: var(--text);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.5px;
    font-family: var(--font-title);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link {
    height: 38px;
    display: inline-flex;
    align-items: center;
    border-radius: 10px;
    padding: 0 14px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--green);
}

.profile-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.profile-menu:hover {
    background: rgba(255, 255, 255, 0.05);
}

.profile-icon {
    width: 34px;
    height: 34px;
    object-fit: cover;
    transition: all 0.2s ease;
}

.profile-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    width: 14px;
    height: 14px;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}

.profile-menu:hover .profile-caret,
.profile-menu.active .profile-caret {
    color: var(--green);
}

.profile-menu.active .profile-caret {
    transform: rotate(180deg);
}

/* Glassmorphic Dropdown Menu */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 140px;
    background: rgba(13, 16, 23, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px;
    box-shadow: var(--shadow-lg), 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    cursor: default;
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* User Info on Header (Left of Avatar) */
.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 4px;
    text-align: right;
    pointer-events: none;
    user-select: none;
}

.profile-username {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 13.5px;
    color: var(--white);
    line-height: 1.25;
}

.profile-status {
    font-size: 9.5px;
    color: var(--green);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1px;
}

.dropdown-item {
    width: 100%;
    height: 38px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ff6b6b;
}

.dropdown-item-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, 460px);
    gap: 48px;
    align-items: start;
    width: min(1320px, calc(100% - 32px));
    margin: 60px auto 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.intro {
    display: grid;
    gap: 20px;
}

.intro h1 {
    width: 100%;
}


h1 {
    color: var(--white);
    font-size: 44px;
    font-weight: 770;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.32);
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.527));
}

.intro-copy {
    max-width: 800px;
    color: var(--text-muted);
    font-size: 18px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.678);
}

/* Preview Cards */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 22px;
    padding: 18px 0;
    align-items: stretch;
}

.preview-card {
    --preview-offset: 0px;
    min-height: 128px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 20px 26px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 42%),
        rgba(13, 22, 22, 0.74);
    border-radius: 18px;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: default;
    overflow: hidden;
    --preview-line: linear-gradient(90deg, #ff2d00 0%, #ff6500 50%, #ef2d00 100%);
    transform: translate3d(0, var(--preview-offset), 0);
}

.preview-card:nth-child(1) {
    --preview-offset: -24px;
}

.preview-card:nth-child(2) {
    --preview-offset: 0px;
}

.preview-card:nth-child(3) {
    --preview-offset: 24px;
}

.preview-card:hover {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 44%),
        rgba(16, 27, 27, 0.86);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translate3d(0, calc(var(--preview-offset) - 4px), 0);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34), 0 0 20px rgba(255, 80, 0, 0.07);
}

.preview-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    border-radius: 999px 999px 0 0;
    background: var(--preview-line);
    box-shadow: 0 -1px 10px rgba(255, 75, 0, 0.18);
}

.preview-card:has(.art-vcraft) {
    --preview-line: linear-gradient(90deg, #3b82f6 0%, #22d3ee 50%, #1d4ed8 100%);
}

.preview-card:has(.art-vcraft):hover {
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34), 0 0 20px rgba(59, 130, 246, 0.12);
}

.preview-card:has(.art-pack) {
    --preview-line: linear-gradient(90deg, #5fa83e 0%, #8FCD66 52%, #6fb84b 100%);
}

.preview-card:has(.art-pack):hover {
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34), 0 0 20px rgba(143, 205, 102, 0.14);
}

.product-art {
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    font-size: 20px;
    font-weight: 800;
    overflow: hidden;
    flex: 0 0 auto;
    background: transparent;
    transition: transform 0.3s ease;
}

.preview-card:hover .product-art {
    transform: scale(1.1);
}

.product-art img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.art-soundify {
    background: transparent;
}

.art-vcraft {
    background: transparent;
}

.art-pack {
    background: transparent;
}

.preview-card h3 {
    font-size: 22px;
    color: var(--text);
    margin: 0 0 8px;
    font-weight: 800;
    line-height: 1.1;
}

.preview-card p {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    margin: 0;
}

/* Login Panel Card */
.login-panel {
    padding: 36px;
    background: rgba(13, 16, 23, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.5),
        0 0 50px rgba(16, 185, 129, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.login-panel:hover {
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow:
        0 35px 70px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(16, 185, 129, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.login-panel h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.5px;
    margin-bottom: 12px;
    text-align: center;
}

.panel-note {
    margin-bottom: 24px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.field {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}

label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    transition: color 0.2s ease;
}

.field:focus-within label {
    color: var(--green);
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-group input {
    width: 100%;
    height: 50px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px 16px 8px 46px;
    outline: none;
    color: var(--text);
    background: rgba(7, 9, 14, 0.6);
    font-size: 15px;
    font-family: var(--font-body);
    font-weight: 500;
    line-height: 24px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-group:has(.password-toggle) input {
    padding-right: 46px;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.input-group input:focus {
    background: rgba(7, 9, 14, 0.9);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow:
        0 0 0 3px rgba(16, 185, 129, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.2);
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-dimmed);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: color 0.2s ease;
    width: 18px;
    height: 18px;
}

.input-icon svg {
    width: 100%;
    height: 100%;
}

.input-group:focus-within .input-icon {
    color: var(--green);
}

.password-toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text-dimmed);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    transition: all 0.2s ease;
}

.password-toggle:hover {
    color: var(--white);
    transform: scale(1.1);
}

.password-toggle svg {
    width: 100%;
    height: 100%;
}

/* Buttons & Actions */
.btn {
    min-height: 46px;
    border: none;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 24px;
    cursor: pointer;
    font-family: var(--font-title);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
    width: 100%;
    height: 50px;
    border-radius: 12px;
    color: #042f1a;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4), 0 0 12px rgba(16, 185, 129, 0.2);
    transform: translateY(-1.5px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0.5px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-primary.is-loading {
    color: #052e1b !important;
    background: #facc15 !important;
    animation: none;
    cursor: wait;
    box-shadow: 0 8px 24px rgba(250, 204, 21, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

.btn-primary.is-loading::before {
    content: none;
}

.btn-primary.is-loading::after {
    content: none;
}

.btn-primary.is-loading span,
.btn-primary.is-loading .spinner {
    position: relative;
    z-index: 1;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.btn-secondary:active {
    background: rgba(255, 255, 255, 0.03);
    transform: translateY(0.5px);
}

.btn-download {
    color: #042f1a;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.15);
}

.btn-download:hover {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.btn-expand {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    color: var(--text);
    background: transparent;
    border: 0;
    font-weight: 700;
    box-shadow: none;
}

.btn-expand:hover {
    color: var(--green);
    background: transparent;
    box-shadow: none;
    transform: translateY(-1px);
}

/* Custom Expand Caret Hover Colors by Brand Theme */
.product-card[data-product="soundify"] .btn-expand:hover {
    color: #ff6500;
}

.product-card[data-product="vcraftReborn"] .btn-expand:hover,
.product-card[data-product="vcraft"] .btn-expand:hover {
    color: #3b82f6;
}

.product-card[data-product="gduck16x"] .btn-expand:hover {
    color: #8FCD66;
}

.btn:disabled {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-dimmed) !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

.btn-primary.is-loading:disabled {
    color: #042f1a !important;
    background: #facc15 !important;
    border: 0;
    box-shadow: 0 8px 24px rgba(250, 204, 21, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

.spinner {
    animation: spin 0.72s linear infinite;
    width: 18px;
    height: 18px;
    transform-origin: center;
    flex: 0 0 auto;
    display: block;
    overflow: visible;
}

.spinner-track,
.spinner-arc {
    fill: none;
    stroke-width: 3;
}

.spinner-track {
    stroke: rgba(4, 47, 26, 0.18);
}

.spinner-arc {
    stroke: currentColor;
    stroke-linecap: round;
    stroke-dasharray: 32 58;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

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

@keyframes loginGoldGradient {
    0% {
        transform: translateX(-54%);
    }

    100% {
        transform: translateX(0%);
    }
}

/* Status alerts */
.status {
    min-height: 0;
    margin-top: 14px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.45;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    opacity: 0;
    transform: translateY(-8px);
    display: none;
}

.status.show {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    max-height: 74px;
    overflow-y: auto;
    opacity: 1;
    transform: translateY(0);
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ff6b6b;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.05);
}

.status-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--error);
}

/* Dashboard */
.dashboard {
    display: block;
    /* Always block as the page is library.html */
    margin-top: 32px;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.dashboard-panel {
    padding: 0;
    background: transparent;
}

body.logged-in .dashboard {
    min-height: calc(100vh - 72px);
    margin-top: 0;
    padding: 24px clamp(16px, 4vw, 48px) 48px;
}

body.logged-in .dashboard-panel {
    width: min(1320px, 100%);
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 8px;
    margin-bottom: 28px;
}

.dashboard-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.5px;
}

.store-dashboard-nav {
    display: flex;
    justify-content: flex-start;
    margin: 0 0 24px;
}

/* Tab Switcher Pills */
.dark-tabs {
    display: flex;
    gap: 6px;
    padding: 5px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.dark-tab {
    height: 36px;
    border: 0;
    border-radius: 9px;
    padding: 0 18px;
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    font-weight: 700;
    font-size: 13.5px;
    font-family: var(--font-title);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dark-tab:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.03);
}

.dark-tab.active {
    color: #ffffff;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* Store Layout */
.store-layout {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Sidebar Filters */
.store-sidebar {
    display: block;
    position: sticky;
    top: 24px;
    align-self: start;
    min-height: 400px;
    border-radius: 20px;
    background: rgba(13, 16, 23, 0.5);
    border: 1px solid var(--border);
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.store-sidebar.collapsed {
    min-height: auto;
}

.store-sidebar-content {
    transition: max-height 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease, margin 0.3s ease;
    max-height: 500px;
    opacity: 1;
    overflow: hidden;
}

.store-sidebar.collapsed .store-sidebar-content {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    pointer-events: none;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--white);
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 18px;
    font-family: var(--font-title);
    cursor: pointer;
    user-select: none;
    transition: margin 0.3s ease;
}

.store-sidebar.collapsed .filter-header {
    margin-bottom: 0;
}

.filter-header .arrow {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    color: var(--text-muted);
}

.store-sidebar.collapsed .filter-header .arrow {
    transform: rotate(180deg);
}

.filter-search,
.library-search {
    width: 100%;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    background: rgba(7, 9, 14, 0.5);
    padding: 0 16px;
    font-size: 14px;
    font-family: var(--font-body);
    outline: none;
    transition: all 0.25s ease;
}

.filter-search {
    height: 40px;
    margin-bottom: 16px;
    font-size: 13.5px;
}

.filter-search:focus,
.library-search:focus {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(7, 9, 14, 0.8);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.version-list {
    display: grid;
    gap: 8px;
    color: var(--text-muted);
    font-weight: 500;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 13.5px;
}

.fake-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: rgba(7, 9, 14, 0.5);
    position: relative;
    transition: all 0.2s ease;
}

.show-versions:hover .fake-checkbox {
    border-color: rgba(16, 185, 129, 0.5);
}

/* Library Main */
.library-main {
    flex: 1;
    max-width: 800px;
    min-width: 0;
}

.library-search-wrap {
    display: block;
    margin-bottom: 24px;
}

.muted {
    color: var(--text-muted);
    font-size: 14.5px;
    margin-top: 4px;
}

/* Product Cards & Grid */
.product-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Product card as list-row */
.product-card {
    background: rgba(13, 16, 23, 0.5);
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 20px;
    row-gap: 0;
    padding: 18px 24px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
    cursor: pointer;
}

.product-card.expanded {
    row-gap: 14px;
    overflow: visible;
    z-index: 10;
}

.product-card.expanded::after {
    display: none;
    /* Prevent the shine sweep effect from bleeding outside the expanded card */
}

.product-card:hover {
    border-color: var(--border-hover);
    background: var(--surface-hover);
    box-shadow: var(--shadow-md), 0 0 20px rgba(16, 185, 129, 0.04);
}

/* Product icon */
.product-card .product-art {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    flex-shrink: 0;
    font-size: 24px;
    border: none;
    margin-top: 0;
    overflow: hidden;
}

.product-card .product-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Product info block */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.product-card h3 {
    font-size: 16px;
    color: var(--white);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-byline {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-byline-prefix {
    color: var(--text-dimmed);
    font-size: 12px;
    font-weight: 400;
}

/* Right-side actions */
.product-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.download-toggle {
    border: 0;
    cursor: pointer;
}

.download-caret {
    width: 14px;
    height: 14px;
    transition: transform 0.25s ease;
}

.product-card.expanded .download-caret {
    transform: rotate(180deg);
}

.download-panel {
    flex: 0 0 100%;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-6px);
    transition:
        max-height 0.32s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.22s ease,
        transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
        margin-top 0.32s ease;
    cursor: default;
}

.product-card.expanded .download-panel {
    max-height: 180px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 2px;
    overflow: visible;
}

.download-panel-inner {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto;
    align-items: end;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(3, 7, 18, 0.36);
}

.download-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.download-field span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.45px;
}

.download-field select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
        linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 17px,
        calc(100% - 12px) 17px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background-color: rgba(13, 16, 23, 0.82);
    color: var(--white);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 0 34px 0 12px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.download-field select:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background-color: rgba(20, 26, 38, 0.92);
}

.download-field select:focus {
    border-color: rgba(16, 185, 129, 0.55);
    background-color: rgba(13, 16, 23, 0.96);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.download-field select option {
    background-color: #090d14;
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 12px;
}

.download-field select option:checked {
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(5, 150, 105, 0.28)),
        #0d1017;
    box-shadow: 0 0 0 999px rgba(16, 185, 129, 0.22) inset;
    color: #042f1a;
}

.download-field select option:hover,
.download-field select option:focus {
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(5, 150, 105, 0.22)),
        #111827;
    color: var(--white);
}

.btn-confirm-download {
    min-height: 40px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    color: #042f1a;
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-confirm-download.is-loading {
    background: #facc15 !important;
    color: #052e1b !important;
    box-shadow: 0 4px 12px rgba(250, 204, 21, 0.25) !important;
    cursor: wait;
}

.btn-confirm-download.is-loading .spinner-track {
    stroke: rgba(5, 46, 27, 0.15) !important;
}

.btn-confirm-download.is-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
    cursor: default;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-owned {
    background: rgba(16, 185, 129, 0.12);
    color: var(--green);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.download-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}


.empty {
    display: none;
    padding: 32px;
    border-radius: 20px;
    background: var(--surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
    font-size: 15px;
    text-align: center;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .preview-card {
        padding-inline: 16px;
        gap: 13px;
    }

    .preview-card .product-art {
        width: 62px;
        height: 62px;
    }

    .preview-card h3 {
        font-size: 19px;
    }

    .preview-card p {
        font-size: 14px;
    }
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 32px;
        margin-top: 36px;
    }

    .preview-grid {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .preview-card,
    .preview-card:nth-child(1),
    .preview-card:nth-child(2),
    .preview-card:nth-child(3) {
        --preview-offset: 0px;
    }

    body.logged-in .product-grid {
        grid-template-columns: 1fr;
    }

    .intro {
        text-align: center;
    }

    .intro-copy {
        margin: 0 auto;
    }

    .preview-card {
        min-height: auto;
        flex-direction: row;
        gap: 16px;
        align-items: center;
        text-align: left;
    }

    .preview-card h3 {
        margin: 0 0 4px;
    }
}

@media (max-width: 560px) {
    .topbar {
        padding: 12px 16px;
    }

    .brand-title {
        font-size: 18px;
    }

    .topbar,
    .dashboard-header,
    .download-row {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    body.logged-in .topbar {
        align-items: center;
        flex-direction: row;
    }

    .nav-actions {
        width: 100%;
        justify-content: space-between;
    }

    h1 {
        font-size: 32px;
        line-height: 1.2;
    }

    .dark-tabs {
        width: 100%;
        overflow-x: auto;
    }

    .dark-tab {
        flex: 1;
        justify-content: center;
        padding: 0 8px;
        white-space: nowrap;
    }

    .btn-download,
    .btn-secondary,
    .btn-confirm-download {
        width: 100%;
    }

    .download-panel-inner {
        grid-template-columns: 1fr;
        align-items: stretch;
        padding: 14px;
    }

    .product-card.expanded .download-panel {
        max-height: 280px;
    }
}

/* PREMIUM CUSTOM SHINE & GLOW ANIMATIONS */
@keyframes borderGlowPulse {

    0%,
    100% {
        border-color: rgba(16, 185, 129, 0.15);
        box-shadow:
            0 30px 60px rgba(0, 0, 0, 0.5),
            0 0 40px rgba(16, 185, 129, 0.01),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }

    50% {
        border-color: rgba(16, 185, 129, 0.35);
        box-shadow:
            0 30px 60px rgba(0, 0, 0, 0.55),
            0 0 50px rgba(16, 185, 129, 0.05),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }
}

@keyframes pulseGlowBtn {

    0%,
    100% {
        box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    50% {
        box-shadow: 0 4px 22px rgba(16, 185, 129, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

@keyframes shakeError {

    0%,
    100% {
        transform: translateY(0);
    }

    15%,
    45%,
    75% {
        transform: translateX(-6px);
    }

    30%,
    60%,
    90% {
        transform: translateX(6px);
    }
}

.login-panel {
    animation: borderGlowPulse 6s infinite ease-in-out;
}

.login-panel:hover {
    animation-play-state: paused;
    border-color: rgba(16, 185, 129, 0.4) !important;
    box-shadow:
        0 35px 70px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(16, 185, 129, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}

.btn-primary {
    animation: pulseGlowBtn 3s infinite ease-in-out;
}

.btn-primary.is-loading {
    animation: none;
}

.btn-primary:hover:not(:disabled) {
    animation-play-state: paused;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5), 0 0 15px rgba(16, 185, 129, 0.25) !important;
}

.status.show {
    animation: shakeError 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* CARD SWEEP SHINE TRANSITION */
.product-card,
.preview-card {
    position: relative;
    overflow: hidden;
    /* Fix rounded corner overflow/mask clipping bugs on Safari/Chrome/Firefox */
    isolation: isolate;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.product-card {
    transform: translate3d(0, 0, 0);
}

.preview-card {
    transform: translate3d(0, var(--preview-offset), 0);
}

.product-card::after,
.preview-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: translateX(-150%) skewX(-25deg);
    transition: transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
    z-index: 2;
}

.product-card:hover::after,
.preview-card:hover::after {
    transform: translateX(150%) skewX(-25deg);
}

/* DYNAMIC DISTINCT BRAND THEMES */
body.logged-in .product-card[data-product="soundify"]:hover {
    border-color: rgba(255, 101, 0, 0.45) !important;
    box-shadow: var(--shadow-lg), 0 0 35px rgba(255, 101, 0, 0.08) !important;
}

body.logged-in .product-card[data-product="vcraftReborn"]:hover {
    border-color: rgba(59, 130, 246, 0.45) !important;
    box-shadow: var(--shadow-lg), 0 0 35px rgba(59, 130, 246, 0.08) !important;
}

body.logged-in .product-card[data-product="vcraft"]:hover {
    border-color: rgba(59, 130, 246, 0.45) !important;
    box-shadow: var(--shadow-lg), 0 0 35px rgba(59, 130, 246, 0.08) !important;
}

body.logged-in .product-card[data-product="gduck16x"]:hover {
    border-color: rgba(143, 205, 102, 0.45) !important;
    box-shadow: var(--shadow-lg), 0 0 35px rgba(143, 205, 102, 0.08) !important;
}

body.logged-in .product-card[data-product="soundify"] .badge {
    color: #ff6500 !important;
    background: rgba(255, 101, 0, 0.08) !important;
    border: 1px solid rgba(255, 101, 0, 0.2) !important;
}

body.logged-in .product-card[data-product="vcraftReborn"] .badge {
    color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.08) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
}

body.logged-in .product-card[data-product="vcraft"] .badge {
    color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.08) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
}

body.logged-in .product-card[data-product="gduck16x"] .badge {
    color: #8FCD66 !important;
    background: rgba(143, 205, 102, 0.08) !important;
    border: 1px solid rgba(143, 205, 102, 0.2) !important;
}

body.logged-in .product-card[data-product="soundify"] .btn-download {
    color: #0c0500 !important;
    background: linear-gradient(135deg, #ff6500 0%, #d43f00 100%) !important;
}

body.logged-in .product-card[data-product="soundify"] .btn-download:hover {
    background: linear-gradient(135deg, #ff8533 0%, #d43f00 100%) !important;
    box-shadow: 0 6px 15px rgba(255, 101, 0, 0.35) !important;
}

body.logged-in .product-card[data-product="vcraftReborn"] .btn-download {
    color: #ffffff !important;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
}

body.logged-in .product-card[data-product="vcraftReborn"] .btn-download:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #1d4ed8 100%) !important;
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.35) !important;
}

body.logged-in .product-card[data-product="vcraft"] .btn-download {
    color: #ffffff !important;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
}

body.logged-in .product-card[data-product="vcraft"] .btn-download:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #1d4ed8 100%) !important;
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.35) !important;
}

body.logged-in .product-card[data-product="gduck16x"] .btn-download {
    color: #102108 !important;
    background: linear-gradient(135deg, #8FCD66 0%, #5fa83e 100%) !important;
}

body.logged-in .product-card[data-product="gduck16x"] .btn-download:hover {
    background: linear-gradient(135deg, #a7dc82 0%, #5fa83e 100%) !important;
    box-shadow: 0 6px 15px rgba(143, 205, 102, 0.35) !important;
}


.profile-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}

.profile-menu:hover .profile-caret {
    transform: rotate(180deg);
}

/* INTERACTIVE SIDEBAR VERSION SELECTOR */
.version-list li {
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 3px solid transparent;
}

.version-list li:hover {
    background: rgba(16, 185, 129, 0.05) !important;
    color: var(--green) !important;
    border-left-color: var(--green) !important;
    padding-left: 16px !important;
}

.version-list li.active {
    background: rgba(16, 185, 129, 0.1) !important;
    color: var(--green) !important;
    border-left-color: var(--green) !important;
    font-weight: 600;
    padding-left: 16px !important;
}

.show-versions {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.show-versions:hover {
    color: var(--green);
}

.show-versions input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.show-versions input[type="checkbox"]:checked~.fake-checkbox {
    background: var(--green) !important;
    border-color: var(--green) !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.show-versions input[type="checkbox"]:checked~.fake-checkbox::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: solid #042f1a;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

/* GLOBAL LUCIDE AND SEARCH DECORATORS */
.lucide {
    stroke-width: 2.2px;
    /* cyber thick strokes */
}

.btn [data-lucide] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.filter-header .arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input-wrap .search-input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-dimmed);
    width: 16px;
    height: 16px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.search-input-wrap:focus-within .search-input-icon {
    color: var(--green);
}

.search-input-wrap .filter-search {
    padding-left: 38px;
    margin-bottom: 0;
}

.search-input-wrap .library-search {
    padding-left: 42px;
}

/* Library cards use the same green accent language as the login panel. */
body.logged-in .product-card {
    border-color: rgba(255, 255, 255, 0.08);
}

body.logged-in .product-card:hover {
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(13, 16, 23, 0.5) 42%),
        rgba(13, 16, 23, 0.5) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    box-shadow:
        0 35px 70px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(16, 185, 129, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}

body.logged-in .product-card[data-product="soundify"]:hover {
    background:
        linear-gradient(135deg, rgba(255, 101, 0, 0.08), rgba(13, 16, 23, 0.5) 42%),
        rgba(13, 16, 23, 0.5) !important;
    border-color: rgba(255, 101, 0, 0.4) !important;
    box-shadow:
        0 35px 70px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(255, 101, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}

body.logged-in .product-card[data-product="vcraftReborn"]:hover,
body.logged-in .product-card[data-product="vcraft"]:hover {
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(13, 16, 23, 0.5) 42%),
        rgba(13, 16, 23, 0.5) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    box-shadow:
        0 35px 70px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(59, 130, 246, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}

body.logged-in .product-card .btn-confirm-download {
    color: #042f1a !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

body.logged-in .product-card .btn-confirm-download:hover {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%) !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5), 0 0 15px rgba(16, 185, 129, 0.25) !important;
}

body.logged-in .product-card[data-product="soundify"] .btn-confirm-download {
    color: #0c0500 !important;
    background: linear-gradient(135deg, #ff6500 0%, #d43f00 100%) !important;
    box-shadow: 0 4px 14px rgba(255, 101, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

body.logged-in .product-card[data-product="soundify"] .btn-confirm-download:hover {
    background: linear-gradient(135deg, #ff8533 0%, #d43f00 100%) !important;
    box-shadow: 0 6px 20px rgba(255, 101, 0, 0.45), 0 0 15px rgba(255, 101, 0, 0.22) !important;
}

body.logged-in .product-card[data-product="vcraftReborn"] .btn-confirm-download,
body.logged-in .product-card[data-product="vcraft"] .btn-confirm-download {
    color: #ffffff !important;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

body.logged-in .product-card[data-product="vcraftReborn"] .btn-confirm-download:hover,
body.logged-in .product-card[data-product="vcraft"] .btn-confirm-download:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #1d4ed8 100%) !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45), 0 0 15px rgba(59, 130, 246, 0.22) !important;
}

body.logged-in .product-card[data-product="gduck16x"]:hover {
    background:
        linear-gradient(135deg, rgba(143, 205, 102, 0.08), rgba(13, 16, 23, 0.5) 42%),
        rgba(13, 16, 23, 0.5) !important;
    border-color: rgba(143, 205, 102, 0.4) !important;
    box-shadow:
        0 35px 70px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(143, 205, 102, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}

body.logged-in .product-card[data-product="gduck16x"] .btn-confirm-download {
    color: #102108 !important;
    background: linear-gradient(135deg, #8FCD66 0%, #5fa83e 100%) !important;
    box-shadow: 0 4px 14px rgba(143, 205, 102, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

body.logged-in .product-card[data-product="gduck16x"] .btn-confirm-download:hover {
    background: linear-gradient(135deg, #a7dc82 0%, #5fa83e 100%) !important;
    box-shadow: 0 6px 20px rgba(143, 205, 102, 0.45), 0 0 15px rgba(143, 205, 102, 0.22) !important;
}

/* Social Links in Login Screen */
.social-links {
    position: fixed;
    bottom: 24px;
    left: 24px;
    display: flex;
    gap: 20px;
    z-index: 999;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    cursor: pointer;
}

.social-link svg,
.social-link i {
    font-size: 26px;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

/* Hover effects with brand specific styling */
.social-link.discord:hover {
    color: #5865F2;
    transform: translateY(-5px);
    filter: drop-shadow(0 2px 10px rgba(88, 101, 242, 0.6));
}

.social-link.tiktok:hover {
    color: #25F4EE;
    transform: translateY(-5px);
    filter: drop-shadow(0 2px 10px rgba(37, 244, 238, 0.6));
}

.social-link.youtube:hover {
    color: #FF0000;
    transform: translateY(-5px);
    filter: drop-shadow(0 2px 10px rgba(255, 0, 0, 0.6));
}

.social-link:hover svg,
.social-link:hover i {
    transform: scale(1.25);
}

/* Responsiveness: Adjust on mobile to avoid overlap */
@media (max-width: 768px) {
    .social-links {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 32px;
        justify-content: center;
        width: 100%;
        padding-bottom: 24px;
    }
}

/* ==========================================================================
   PRODUCT PREVIEW MODAL
   ========================================================================== */
.preview-card[data-product="soundify"],
.preview-card[data-product="vcraft"],
.preview-card[data-product="gduck16x"] {
    cursor: pointer;
}

.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-modal.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.preview-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 5, 8, 0);
    transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-modal.active .preview-modal-overlay {
    background: rgba(4, 5, 8, 0.15);
}

.preview-modal-content {
    position: relative;
    width: 90%;
    max-width: 680px;
    background: linear-gradient(135deg, rgba(20, 26, 38, 0.8), rgba(10, 14, 23, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 
        0 24px 48px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(255, 255, 255, 0.02);
    z-index: 10001;
    overflow: hidden;
    transform: scale(0.94);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

.preview-modal.active .preview-modal-content {
    transform: scale(1);
    opacity: 1;
}

.preview-video-container {
    position: relative;
    width: 100%;
    background: transparent;
    overflow: hidden;
}

.preview-video-player {
    width: 100%;
    height: auto;
    display: block;
}

.preview-modal-info {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.preview-modal-brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.preview-modal-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.preview-modal-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.preview-modal-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-modal-details h3 {
    margin: 0;
    font-family: var(--font-title);
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
}

.preview-modal-details p {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 400;
    color: var(--text-dimmed);
    line-height: 1.5;
}

/* Dynamic Brand theme overlays */
.preview-modal[data-active-product="soundify"] .preview-modal-content {
    border-color: rgba(255, 101, 0, 0.25);
    box-shadow: 
        0 24px 48px rgba(0, 0, 0, 0.5), 
        0 0 35px rgba(255, 101, 0, 0.06);
}

.preview-modal[data-active-product="vcraft"] .preview-modal-content {
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: 
        0 24px 48px rgba(0, 0, 0, 0.5), 
        0 0 35px rgba(59, 130, 246, 0.06);
}

.preview-modal[data-active-product="gduck16x"] .preview-modal-content {
    border-color: rgba(143, 205, 102, 0.25);
    box-shadow: 
        0 24px 48px rgba(0, 0, 0, 0.5), 
        0 0 35px rgba(143, 205, 102, 0.06);
}

/* Image and Video Preview Toggles */
.preview-image-player {
    width: 100%;
    height: auto;
    display: none;
}

.preview-modal[data-preview-type="image"] .preview-image-player {
    display: block;
}

.preview-modal[data-preview-type="image"] .preview-video-player {
    display: none;
}

.preview-modal[data-preview-type="video"] .preview-image-player {
    display: none;
}

.preview-modal[data-preview-type="video"] .preview-video-player {
    display: block;
}

.preview-modal[data-preview-type="image"] .video-center-play-btn,
.preview-modal[data-preview-type="image"] .video-custom-controls {
    display: none !important;
}

/* Premium Custom Video Controls */
.video-custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: transparent;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
}

.preview-video-container:hover .video-custom-controls,
.video-custom-controls:focus-within {
    opacity: 1;
    transform: translateY(0);
}

.video-center-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 60px;
    height: 60px;
    background: rgba(4, 5, 8, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 15;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-video-container.video-paused .video-center-play-btn {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.video-center-play-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%) scale(1.08);
}

.video-center-play-btn:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.video-center-play-btn svg {
    width: 26px;
    height: 26px;
    stroke-width: 2.5px;
}

.video-center-play-btn svg.lucide-play {
    transform: translateX(1px);
}

.video-timeline-container {
    position: relative;
    flex-grow: 1;
    height: 6px;
    background: rgba(4, 5, 8, 0.5);
    border-radius: 99px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: height 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.video-timeline-container:hover {
    height: 8px;
}

.video-timeline {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    margin: 0;
    z-index: 2;
}

.video-timeline-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--green);
    border-radius: 99px;
    width: 0%;
    z-index: 1;
    transition: background-color 0.3s ease;
}

/* Theme adaptation for timeline */
.preview-modal[data-active-product="soundify"] .video-timeline-progress {
    background: #ff6500;
}

.preview-modal[data-active-product="vcraft"] .video-timeline-progress {
    background: #3b82f6;
}

/* Premium slider handle indicator */
.video-timeline-container::after {
    content: "";
    position: absolute;
    left: var(--progress-percent, 0%);
    width: 12px;
    height: 12px;
    background: var(--white);
    border-radius: 50%;
    transform: translateX(-50%) scale(1);
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 3;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.preview-modal[data-active-product="soundify"] .video-timeline-container::after {
    background: #ff8533;
}

.preview-modal[data-active-product="vcraft"] .video-timeline-container::after {
    background: #60a5fa;
}

.video-timeline-container:hover::after,
.video-timeline-container:focus-within::after {
    transform: translateX(-50%) scale(1.3);
}

/* Card Call-To-Action (CTA) preview badges */
.preview-card {
    position: relative; /* Guarantee anchor context */
}

.preview-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.85;
    z-index: 5;
    pointer-events: none; /* Make sure click goes through card */
}

.preview-badge-icon {
    width: 10px;
    height: 10px;
    fill: currentColor;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.preview-card[data-product="gduck16x"] .preview-badge-icon {
    fill: none;
}

/* Pulsing subtle glow anim in idle state to invite user clicks */
.preview-card[data-product="soundify"] .preview-badge {
    animation: soundifyBadgePulse 2.5s infinite alternate;
}

.preview-card[data-product="vcraft"] .preview-badge {
    animation: vcraftBadgePulse 2.5s infinite alternate;
}

.preview-card[data-product="gduck16x"] .preview-badge {
    animation: gduckBadgePulse 2.5s infinite alternate;
}

@keyframes soundifyBadgePulse {
    0% {
        box-shadow: 0 0 0 rgba(255, 101, 0, 0);
        border-color: rgba(255, 101, 0, 0.15);
        background: rgba(255, 101, 0, 0.02);
    }
    100% {
        box-shadow: 0 0 12px rgba(255, 101, 0, 0.18);
        border-color: rgba(255, 101, 0, 0.4);
        background: rgba(255, 101, 0, 0.08);
    }
}

@keyframes vcraftBadgePulse {
    0% {
        box-shadow: 0 0 0 rgba(59, 130, 246, 0);
        border-color: rgba(59, 130, 246, 0.15);
        background: rgba(59, 130, 246, 0.02);
    }
    100% {
        box-shadow: 0 0 12px rgba(59, 130, 246, 0.18);
        border-color: rgba(59, 130, 246, 0.4);
        background: rgba(59, 130, 246, 0.08);
    }
}

@keyframes gduckBadgePulse {
    0% {
        box-shadow: 0 0 0 rgba(143, 205, 102, 0);
        border-color: rgba(143, 205, 102, 0.15);
        background: rgba(143, 205, 102, 0.02);
    }
    100% {
        box-shadow: 0 0 12px rgba(143, 205, 102, 0.18);
        border-color: rgba(143, 205, 102, 0.4);
        background: rgba(143, 205, 102, 0.08);
    }
}

/* Hover effects to make badges POP and feel incredibly interactive */
.preview-card:hover .preview-badge {
    opacity: 1;
    transform: scale(1.08);
    color: var(--white);
}

.preview-card[data-product="soundify"]:hover .preview-badge {
    background: rgba(255, 101, 0, 0.25);
    border-color: rgba(255, 101, 0, 0.7);
    box-shadow: 0 0 20px rgba(255, 101, 0, 0.4);
}

.preview-card[data-product="vcraft"]:hover .preview-badge {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.7);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.preview-card[data-product="gduck16x"]:hover .preview-badge {
    background: rgba(143, 205, 102, 0.25);
    border-color: rgba(143, 205, 102, 0.7);
    box-shadow: 0 0 20px rgba(143, 205, 102, 0.4);
}

.preview-card:hover .preview-badge-icon {
    transform: scale(1.3) rotate(15deg);
}

/* Video Playlist Navigation & Indicator */
.video-playlist-indicator {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(4, 5, 8, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10;
    user-select: none;
    pointer-events: none;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.preview-video-container:hover .video-playlist-indicator {
    opacity: 1;
}

.video-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    width: 44px;
    height: 44px;
    background: rgba(4, 5, 8, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.05);
}

.video-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.video-nav-btn.prev {
    left: 16px;
}

.video-nav-btn.next {
    right: 16px;
}

.preview-video-container:hover .video-nav-btn {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.video-nav-btn svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.5px;
}

/* Theme adaptation for playlist navigation & controls hover glows */
.preview-modal[data-active-product="soundify"] .video-nav-btn:hover,
.preview-modal[data-active-product="soundify"] .video-center-play-btn:hover {
    border-color: rgba(255, 101, 0, 0.5);
    box-shadow: 0 0 15px rgba(255, 101, 0, 0.3);
}

.preview-modal[data-active-product="vcraft"] .video-nav-btn:hover,
.preview-modal[data-active-product="vcraft"] .video-center-play-btn:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.preview-modal[data-active-product="gduck16x"] .video-nav-btn:hover,
.preview-modal[data-active-product="gduck16x"] .video-center-play-btn:hover {
    border-color: rgba(143, 205, 102, 0.5);
    box-shadow: 0 0 15px rgba(143, 205, 102, 0.3);
}