/* ═══════════════════════════════════════════
   Design Tokens — 2025 Premium Dark
═══════════════════════════════════════════ */
:root {
    --bg: #09090f;
    --text: rgba(255, 255, 255, 0.90);
    --text-muted: rgba(255, 255, 255, 0.48);
    --card-bg: rgba(14, 14, 22, 0.72);
    --card-bg-hover: rgba(18, 18, 30, 0.82);
    --primary: #a78bfa;
    --primary-strong: #7c3aed;
    --primary-glow: rgba(124, 58, 237, 0.35);
    --accent: #e879f9;
    --accent-glow: rgba(232, 121, 249, 0.3);
    --green: #34d399;
    --yellow: #fbbf24;
    --red: #f87171;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    --shadow-card: 0 0 0 1px rgba(167, 139, 250, 0.08), 0 24px 64px rgba(0, 0, 0, 0.6);
    --radius: 20px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --surface-border: rgba(167, 139, 250, 0.12);
    --surface-border-hover: rgba(167, 139, 250, 0.28);
    --header-h: 86px;
    --font: "Space Grotesk", "Inter", system-ui, sans-serif;
    --font-mono: "Space Mono", monospace;
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

body.light-theme {
    --bg: #f8f8fc;
    --text: #1a1a2e;
    --text-muted: rgba(26, 26, 46, 0.52);
    --card-bg: rgba(255, 255, 255, 0.82);
    --card-bg-hover: rgba(255, 255, 255, 0.95);
    --primary: #7c3aed;
    --primary-strong: #5b21b6;
    --primary-glow: rgba(124, 58, 237, 0.2);
    --accent: #c026d3;
    --accent-glow: rgba(192, 38, 211, 0.18);
    --shadow: 0 8px 30px rgba(124, 58, 237, 0.15);
    --shadow-card: 0 0 0 1px rgba(124, 58, 237, 0.1), 0 16px 48px rgba(0, 0, 0, 0.12);
    --surface-border: rgba(124, 58, 237, 0.15);
    --surface-border-hover: rgba(124, 58, 237, 0.35);
}

#bgCanvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
}

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

body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--font);
    line-height: 1.6;
    background-color: var(--bg);
    color: var(--text);
    user-select: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out);
    opacity: 0;
    animation: fadeIn 0.6s var(--ease-out) forwards;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.has-site-header {
    padding-top: var(--header-h);
}

body::before { display: none; }

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Светлая тема управляется токенами выше */

.container {
    width: 100%;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 16px;
    box-sizing: border-box;
}

body.has-site-header .container {
    padding: 32px 16px 32px;
}

.page-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.side-rail {
    position: fixed;
    left: 24px;
    top: calc(var(--header-h) + 40px);
    width: 240px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 5;
    animation: cardAppear 0.6s var(--ease-out) 0.2s forwards;
    transform: translateY(20px);
    opacity: 0;
}

.dev-servers {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
}

.dev-servers__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 4px 4px;
}

.dev-server {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s var(--ease-out), transform 0.2s var(--ease-out);
    border: 1px solid transparent;
}

.dev-server:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: var(--surface-border-hover);
    transform: translateX(2px);
}

.dev-server__icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.4), rgba(232, 121, 249, 0.3));
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.dev-server__icon.has-image {
    background: transparent;
}

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

.dev-server__icon.icon-contain {
    background: #fff;
    padding: 6px;
}

.dev-server__icon.icon-contain img {
    object-fit: contain;
}

.dev-server__icon.icon-brand {
    background: #0a0a0a;
    color: #f5f5f5;
    font-family: var(--font);
    font-weight: 600;
    font-size: 20px;
    letter-spacing: -0.02em;
    padding: 8px;
}

.dev-server__icon.icon-brand img {
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.dev-server__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dev-server__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dev-server__role {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

@media (max-width: 1100px) {
    .side-rail {
        position: static;
        width: auto;
        max-width: 480px;
        max-height: none;
        overflow: visible;
        margin: 24px auto 0;
        align-self: center;
    }
}


.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    background: rgba(9, 9, 15, 0.65);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(167,139,250,0.25) 30%, rgba(232,121,249,0.2) 70%, transparent 100%);
}

.site-header__inner {
    height: 56px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-weight: 800;
    letter-spacing: -0.04em;
    text-decoration: none;
    font-size: 17px;
    font-family: var(--font-mono);
    background: linear-gradient(135deg, #fff 0%, var(--primary) 60%, var(--accent) 100%);
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 6s linear infinite;
    transition: filter 0.2s;
}

.brand:hover {
    filter: brightness(1.15);
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-button {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.01em;
    padding: 6px 14px;
    border-radius: var(--radius-xs);
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s var(--ease-out);
}

.header-button:hover {
    background: rgba(167, 139, 250, 0.1);
    border-color: rgba(167, 139, 250, 0.2);
    color: #fff;
}

.marquee {
    height: 30px;
    overflow: hidden;
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(167, 139, 250, 0.08);
    background: rgba(124, 58, 237, 0.03);
}

.marquee__track {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-family: var(--font-mono);
    font-size: 9px;
    color: rgba(167, 139, 250, 0.35);
    animation: marqueeScroll 32s linear infinite;
}

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

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

:where(a, button, input, textarea, select).focus-visible,
:where(a, button, input, textarea, select):focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: var(--radius-xs);
}

.nft,
.card {
    max-width: 480px;
    width: min(480px, calc(100vw - 32px));
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-card);
    border-radius: var(--radius);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    transition: box-shadow 0.35s var(--ease-out), border-color 0.35s var(--ease-out), background 0.4s var(--ease-out);
    animation: cardAppear 0.7s var(--ease-out) forwards;
    transform: translateY(28px);
    opacity: 0;
    position: relative;
    overflow: hidden;
}


.card-bare {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.card-bare::before { display: none; }

.card-bare:hover {
    box-shadow: none;
    border-color: transparent;
    background: transparent;
}

.card::before,
.nft::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: linear-gradient(135deg,
        rgba(167, 139, 250, 0.04) 0%,
        transparent 50%,
        rgba(232, 121, 249, 0.03) 100%
    );
    pointer-events: none;
}

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

.card-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--surface-border), transparent);
    margin: 20px 0;
}

/* ── Discord-style Profile ── */

.dc-profile {
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.dc-banner {
    height: 100px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.5) 0%, rgba(99, 102, 241, 0.4) 50%, rgba(232, 121, 249, 0.35) 100%);
    position: relative;
}

.dc-profile-body {
    padding: 0 16px 0;
    position: relative;
}

.dc-avatar-area {
    margin-top: -48px;
    margin-bottom: 12px;
}

.avatar-wrap {
    position: relative;
    flex-shrink: 0;
    width: fit-content;
}

.avatar-decoration {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    object-fit: contain;
    scale: 1.18;
    z-index: 3;
}

.discord-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 8px;
}

.discord-badge {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.guild-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px 2px 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.guild-tag img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

body.light-theme .guild-tag {
    background: rgba(0, 0, 0, 0.06);
}

.avatar-status {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 28px;
    height: 28px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    box-shadow: none;
}

.avatar-status svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 0 0 var(--bg)) drop-shadow(0 0 1px rgba(0,0,0,0.5));
}

.dc-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}


.card-name {
    margin: 0 0 4px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.card-role {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.01em;
}

.card-bio {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.55;
}

.discord-activity {
    display: none;
    margin-top: 10px;
    background: transparent;
    border: none;
    padding: 0;
    max-width: 320px;
    animation: fadeIn 0.3s var(--ease-out);
}

.da-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.da-body {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.da-images {
    position: relative;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
}

.da-large {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-xs);
    object-fit: cover;
}

.da-small {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--bg);
    object-fit: cover;
}

.da-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.da-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.da-details,
.da-state {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
}

.da-time {
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    opacity: 0.7;
    margin-top: 2px;
}

body.light-theme .da-small {
    border-color: var(--bg);
}

.da-custom {
    align-items: center;
    gap: 8px;
}

.da-emoji {
    font-size: 18px;
    line-height: 1;
}

.da-custom-text {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stack-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--primary);
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: var(--radius-xs);
    padding: 4px 10px;
    transition: all 0.2s var(--ease-out);
}

.stack-tag:hover {
    background: rgba(167, 139, 250, 0.18);
    border-color: var(--surface-border-hover);
    color: #fff;
}

.card-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.social-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius-xs);
    background: rgba(167, 139, 250, 0.06);
    border: 1px solid var(--surface-border);
    transition: all 0.22s var(--ease-out);
}

.social-pill img {
    width: 16px;
    height: 16px;
    filter: invert(1) brightness(0.7);
    transition: filter 0.2s;
}

body.light-theme .social-pill img {
    filter: none;
}

.social-pill:hover {
    background: rgba(167, 139, 250, 0.15);
    border-color: var(--surface-border-hover);
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.social-pill:hover img {
    filter: invert(1) brightness(1);
}

body.light-theme .social-pill:hover img {
    filter: none;
}

.card-cta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.01em;
    padding: 11px 22px;
    border-radius: var(--radius-xs);
    background: linear-gradient(135deg, var(--primary-strong), var(--primary));
    color: #fff;
    border: none;
    transition: all 0.22s var(--ease-out);
    box-shadow: 0 4px 20px var(--primary-glow);
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.5);
    filter: brightness(1.08);
}

.cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.01em;
    padding: 11px 22px;
    border-radius: var(--radius-xs);
    background: rgba(167, 139, 250, 0.08);
    color: var(--primary);
    border: 1px solid var(--surface-border);
    cursor: pointer;
    transition: all 0.22s var(--ease-out);
}

.cta-secondary:hover {
    background: rgba(167, 139, 250, 0.16);
    border-color: var(--surface-border-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--primary-glow);
}

/* ── Portfolio full-page layout ── */

.pf-main {
    min-height: 100vh;
    padding: calc(var(--header-h) + 40px) 40px 60px;
    box-sizing: border-box;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.pf-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--surface-border);
    padding-bottom: 32px;
}

.pf-hero-text {
    flex: 1;
    min-width: 0;
}

.pf-eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    margin: 0 0 10px;
    opacity: 0.8;
}

.pf-title {
    margin: 0 0 10px;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.0;
    letter-spacing: -0.04em;
}

.pf-sub {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
    max-width: 480px;
    line-height: 1.6;
}

.pf-hero-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.pf-contact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: var(--radius-xs);
    background: rgba(167, 139, 250, 0.06);
    border: 1px solid var(--surface-border);
    transition: all 0.22s var(--ease-out);
    white-space: nowrap;
}

.pf-contact img {
    width: 15px;
    height: 15px;
    filter: invert(1) brightness(0.7);
}

body.light-theme .pf-contact img { filter: none; }

.pf-contact:hover {
    background: rgba(167, 139, 250, 0.15);
    border-color: var(--surface-border-hover);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.cta-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: var(--radius-xs);
    background: transparent;
    border: 1px solid var(--surface-border);
    transition: all 0.22s var(--ease-out);
}

.cta-back:hover {
    color: var(--text);
    border-color: var(--surface-border-hover);
    background: rgba(167, 139, 250, 0.06);
}

/* ── Workspace (sidebar + content) ── */

.pf-workspace {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
    align-items: start;
}

/* ── Sidebar ── */

.pf-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pf-sidebar-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 4px;
    opacity: 0.6;
}

.project-bar {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-pill {
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    border-radius: var(--radius-xs);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s var(--ease-out);
    line-height: 1.3;
}

.project-pill:hover {
    background: rgba(167, 139, 250, 0.08);
    color: var(--text);
    border-color: var(--surface-border);
}

.project-pill.active {
    background: rgba(167, 139, 250, 0.12);
    border-color: rgba(167, 139, 250, 0.3);
    color: #fff;
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--primary);
}

.pf-sidebar-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--surface-border);
}

.pf-order-btn {
    width: 100%;
    justify-content: center;
    font-size: 13px;
    padding: 10px 16px;
}

/* ── Content pane ── */

.pf-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.pf-project-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pf-project-title {
    margin: 0;
    font-size: clamp(20px, 3vw, 30px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.pf-project-desc {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 600px;
}

/* ── Gallery ── */

.pf-gallery {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gallery-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}

.pf-gallery .gallery-viewport {
    flex: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #000;
    border: 1px solid var(--surface-border);
    position: relative;
    aspect-ratio: 16/9;
}

.pf-gallery .screenshots {
    position: absolute;
    inset: 0;
}

.pf-gallery .screenshot-card {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease-out);
    cursor: zoom-in;
}

.pf-gallery .screenshot-card.active {
    opacity: 1;
    pointer-events: auto;
}

.pf-gallery .gallery-nav {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(9, 9, 15, 0.6);
    border: 1px solid var(--surface-border);
    backdrop-filter: blur(8px);
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease-out);
    line-height: 1;
    margin: 0 6px;
}

.pf-gallery .gallery-nav:hover {
    background: rgba(167, 139, 250, 0.2);
    border-color: var(--surface-border-hover);
    box-shadow: 0 4px 20px var(--primary-glow);
}

.pf-gallery .gallery-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.pf-gallery .gallery-dot {
    width: 8px !important;
    height: 8px !important;
    min-width: 0;
    min-height: 0;
    max-width: 8px;
    max-height: 8px;
    border-radius: 50% !important;
    border: 1px solid rgba(167, 139, 250, 0.3);
    background: transparent;
    cursor: pointer;
    padding: 0 !important;
    margin: 0;
    transition: background 0.25s var(--ease-out), border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
    flex-shrink: 0;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.pf-gallery .gallery-dot.active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 10px var(--primary-glow);
    width: 8px !important;
    height: 8px !important;
}

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

.gallery-swipe-hint { display: none; }

.tokenImage {
    width: 116px;
    height: 116px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--surface-border);
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.12), 0 12px 40px rgba(0, 0, 0, 0.5);
    animation: avatarAppear 0.8s var(--ease-out) 0.1s forwards;
    opacity: 0;
    transform: scale(0.85);
    transition: box-shadow 0.3s var(--ease-out);
}

.tokenImage:hover {
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.3), 0 12px 40px var(--primary-glow);
}

body.light-theme .tokenImage {
    border: 2px solid rgba(124, 58, 237, 0.3);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.08), 0 12px 30px rgba(0, 0, 0, 0.15);
}

@keyframes avatarAppear {
    to {
        opacity: 1;
        transform: scale(1);
    }
}


.theme-toggle {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
    padding: 0;
    transition: all 0.22s var(--ease-out);
    opacity: 0;
    animation: fadeIn 0.4s var(--ease-out) 0.6s forwards;
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
    display: block;
}

.theme-toggle:hover {
    background: rgba(167, 139, 250, 0.15);
    border-color: rgba(167, 139, 250, 0.3);
    box-shadow: 0 0 20px var(--primary-glow);
    transform: rotate(15deg);
}




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

.tag {
    padding: 3px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.15), rgba(232, 121, 249, 0.1));
    border: 1px solid var(--surface-border);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--primary);
    font-family: var(--font-mono);
}

.screenshot-placeholder {
    background: radial-gradient(circle at 30% 30%, rgba(167, 139, 250, 0.2), rgba(232, 121, 249, 0.1));
    color: var(--primary);
    font-weight: 600;
    text-align: center;
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 13px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screenshot-label {
    display: none;
}

body.light-theme .nft:hover,
body.light-theme .card:hover {
    box-shadow: 0 0 0 1px var(--surface-border-hover), 0 20px 60px rgba(124, 58, 237, 0.15);
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 9998;
    animation: none;
}

.lightbox.open {
    display: flex;
    animation: fadeIn 0.2s var(--ease-out) forwards;
}

.lightbox img {
    max-width: min(92vw, 1200px);
    max-height: 88vh;
    border-radius: var(--radius-sm);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(167, 139, 250, 0.15);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease-out);
    backdrop-filter: blur(8px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}


body.light-theme .site-header {
    background: rgba(248, 248, 252, 0.75);
}

body.light-theme .header-button {
    color: rgba(26, 26, 46, 0.55);
}

body.light-theme .header-button:hover {
    color: var(--text);
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.18);
}

body.light-theme .marquee {
    background: rgba(124, 58, 237, 0.02);
    border-top-color: rgba(124, 58, 237, 0.08);
}

body.light-theme .marquee__track {
    color: rgba(124, 58, 237, 0.3);
}

body.light-theme .theme-toggle {
    background: rgba(124, 58, 237, 0.06);
    border-color: rgba(124, 58, 237, 0.15);
    color: var(--text);
}

body.light-theme .theme-toggle:hover {
    background: rgba(124, 58, 237, 0.12);
    border-color: rgba(124, 58, 237, 0.3);
}

body.light-theme .network-status {
    background: rgba(248, 248, 252, 0.9);
}

body.light-theme .pf-gallery .gallery-nav {
    color: var(--text);
    background: rgba(255, 255, 255, 0.8);
}

body.light-theme .project-pill { color: var(--text-muted); }
body.light-theme .project-pill.active { color: var(--primary-strong); }

.glowing-text {
    background: linear-gradient(135deg, #fff 20%, var(--primary) 60%, var(--accent));
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 5s linear infinite;
    font-weight: 700;
    letter-spacing: -0.02em;
}

body.light-theme .glowing-text {
    background: linear-gradient(135deg, var(--text) 10%, var(--primary) 55%, var(--accent));
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 5s linear infinite;
}

@keyframes textShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-strong), var(--accent));
    z-index: 9999;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.55s cubic-bezier(0.76, 0, 0.24, 1);
    pointer-events: none;
}

.page-transition-overlay.active {
    transform: scaleY(1);
}

body.page-transitioning {
    overflow: hidden;
}

.animate-on-load {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.animate-on-load.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-from-left {
    transform: translateX(-24px);
    opacity: 0;
    transition: transform 0.5s var(--ease-out), opacity 0.5s var(--ease-out);
}

.slide-from-right {
    transform: translateX(24px);
    opacity: 0;
    transition: transform 0.5s var(--ease-out), opacity 0.5s var(--ease-out);
}

body.page-loaded .slide-from-left,
body.page-loaded .slide-from-right {
    transform: translateX(0);
    opacity: 1;
}


h1, h2, h3 {
    font-family: var(--font);
    letter-spacing: -0.02em;
}

h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
}

.project-meta {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--primary);
    opacity: 1;
    margin: 0 0 4px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.network-status {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    padding: 5px 14px 5px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 11px;
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    background: rgba(9, 9, 15, 0.85);
    color: var(--text);
    backdrop-filter: blur(16px);
    border: 1px solid var(--surface-border);
    transition: opacity 0.3s, transform 0.3s;
    opacity: 0;
    z-index: 1100;
    white-space: nowrap;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 7px;
}

.network-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.network-status.online  {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    color: var(--green);
    border-color: rgba(52, 211, 153, 0.3);
}
.network-status.online::before  { background: var(--green); box-shadow: 0 0 6px var(--green); }

.network-status.offline {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    color: var(--red);
    border-color: rgba(248, 113, 113, 0.3);
}
.network-status.offline::before { background: var(--red); box-shadow: 0 0 6px var(--red); }



hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--surface-border), transparent);
    margin: 20px 0;
}

body.light-theme .description {
    color: var(--text-muted);
}

.description {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
}


.ticket-form {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 340px;
    background: rgba(12, 12, 20, 0.88);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(167, 139, 250, 0.05);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    z-index: 1000;
    opacity: 0;
    transform: translateY(12px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
    overflow: hidden;
    display: none;
}

body.light-theme .ticket-form {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 60px rgba(124, 58, 237, 0.15);
}

.ticket-form.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    display: block;
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.15), rgba(232, 121, 249, 0.08));
    border-bottom: 1px solid var(--surface-border);
}

body.light-theme .ticket-header {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(192, 38, 211, 0.05));
}

.ticket-header h3 {
    margin: 0;
    font-weight: 600;
    font-size: 15px;
    background: linear-gradient(135deg, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-theme .ticket-header h3 {
    background: linear-gradient(135deg, var(--text), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-ticket {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}

.close-ticket:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: var(--surface-border-hover);
    color: var(--text);
}

.ticket-body {
    padding: 18px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-xs);
    background: rgba(167, 139, 250, 0.05);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}

body.light-theme .form-group input,
body.light-theme .form-group textarea {
    background: rgba(124, 58, 237, 0.04);
    color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(167, 139, 250, 0.08);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.submit-ticket {
    display: block;
    width: 100%;
    padding: 11px;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.2), rgba(232, 121, 249, 0.14));
    border: 1px solid var(--surface-border-hover);
    border-radius: var(--radius-xs);
    color: var(--primary);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s var(--ease-out);
    letter-spacing: 0.02em;
}

.submit-ticket:hover {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.3), rgba(232, 121, 249, 0.22));
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.submit-ticket:active {
    transform: translateY(0);
}

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 320px;
    width: calc(100vw - 40px);
}

.notification-container .custom-notification {
    pointer-events: auto;
}

.custom-notification {
    position: relative;
    max-width: 320px;
    background: rgba(14, 14, 22, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(167, 139, 250, 0.04);
    border-radius: var(--radius-sm);
    padding: 13px 16px 13px 44px;
    z-index: 9999;
    opacity: 0;
    transform: translateX(16px) scale(0.97);
    transition: opacity 0.28s var(--ease-out), transform 0.28s var(--ease-out);
    color: var(--text);
    overflow: hidden;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.custom-notification::after {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.custom-notification.success::after { background: var(--green); box-shadow: 0 0 10px rgba(52,211,153,0.4); }
.custom-notification.warning::after { background: var(--yellow); box-shadow: 0 0 10px rgba(251,191,36,0.4); }
.custom-notification.error::after   { background: var(--red);   box-shadow: 0 0 10px rgba(248,113,113,0.4); }

.custom-notification.show {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.custom-notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.custom-notification-title {
    font-weight: 600;
    font-size: 13px;
    margin: 0;
    letter-spacing: 0.01em;
}

.custom-notification-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.25);
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    padding: 0;
    margin-left: 8px;
    flex-shrink: 0;
}

.custom-notification-close:hover {
    color: rgba(255,255,255,0.7);
}

.custom-notification-message {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
}

.custom-notification::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 1.5px;
    width: 100%;
    background: var(--primary);
    opacity: 0.5;
    animation: shrink 5s linear forwards;
}

.custom-notification.success::before { background: var(--green); }
.custom-notification.warning::before { background: var(--yellow); }
.custom-notification.error::before   { background: var(--red); }

@keyframes shrink {
    to { width: 0%; }
}

body.light-theme .custom-notification {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(124, 58, 237, 0.12);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.1);
    color: var(--text);
}

/* ── Mobile 768px ── */
@media (max-width: 768px) {
    .container {
        padding: 16px;
        align-items: flex-start;
        padding-top: 32px;
    }

    .nft, .card {
        width: 100%;
        max-width: none;
        padding: 20px 16px;
    }

    .dc-banner { height: 80px; }
    .dc-avatar-area { margin-top: -36px; }
    .tokenImage.avatar { width: 80px; height: 80px; }
    .avatar-status { width: 22px; height: 22px; }
    .card-name { font-size: 22px; }
    .card-socials, .card-stack, .card-cta { gap: 8px; }

    .social-pill, .cta-primary, .cta-secondary {
        font-size: 13px;
        padding: 10px 16px;
        min-height: 44px;
    }

    .ticket-form {
        max-width: 100%;
        width: 100%;
        bottom: 0;
        right: 0;
        left: 0;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    .ticket-form.active { transform: translateY(0) scale(1) !important; }

    .form-group input,
    .form-group textarea { font-size: 16px; }

    button:not(.gallery-dot):not(.gallery-nav):not(.theme-toggle), .submit-ticket, .close-ticket {
        min-height: 44px;
    }

    /* portfolio mobile */
    .pf-main {
        padding: calc(var(--header-h) + 20px) 16px 40px;
        gap: 20px;
    }

    .pf-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding-bottom: 20px;
    }

    .pf-title { font-size: 26px; }
    .pf-hero-actions { gap: 8px; }

    .pf-workspace {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .pf-sidebar {
        position: static;
        order: 2;
        margin-top: 20px;
        padding-top: 16px;
        border-top: 1px solid var(--surface-border);
    }

    .pf-sidebar-label { display: none; }

    .project-bar {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .project-pill {
        flex: 0 0 auto;
        padding: 7px 12px;
        font-size: 12px;
        box-shadow: none;
    }
    .project-pill.active {
        box-shadow: none;
        border-color: rgba(167, 139, 250, 0.4);
    }

    .pf-sidebar-footer {
        margin-top: 12px;
        padding-top: 12px;
    }
    .pf-order-btn { width: 100%; }

    .pf-content { order: 1; }

    .pf-gallery {
        gap: 12px;
        align-items: center;
        width: 100%;
    }

    .gallery-row {
        position: relative;
        flex-direction: row;
        gap: 0;
        width: 100%;
        align-items: center;
        justify-content: center;
    }

    .pf-gallery .gallery-viewport {
        width: min(300px, calc(100vw - 32px));
        flex: none;
        aspect-ratio: 9/16;
        border-radius: var(--radius-sm);
        position: relative;
        overflow: hidden;
    }

    .pf-gallery .gallery-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        font-size: 18px;
        background: rgba(0,0,0,0.55);
        border-color: rgba(255,255,255,0.12);
        margin: 0;
        z-index: 3;
    }

    .pf-gallery .gallery-nav.prev { left: 0; }
    .pf-gallery .gallery-nav.next { right: 0; }

    .pf-gallery .screenshot-card {
        background-size: contain;
        background-position: center;
        background-color: rgba(0,0,0,0.7);
    }

    .pf-gallery .gallery-dots {
        gap: 8px;
    }

    .gallery-swipe-hint {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 11px;
        font-family: var(--font-mono);
        color: rgba(167, 139, 250, 0.45);
        letter-spacing: 0.06em;
        text-transform: uppercase;
        animation: hintFade 3s var(--ease-out) 1s forwards;
        opacity: 1;
    }

    @keyframes hintFade {
        0%   { opacity: 1; }
        70%  { opacity: 1; }
        100% { opacity: 0; pointer-events: none; }
    }
}

/* ── Mobile 480px ── */
@media (max-width: 480px) {
    .nft, .card { padding: 16px 14px; }
    .dc-banner { height: 70px; }
    .dc-avatar-area { margin-top: -30px; text-align: center; }
    .dc-info { text-align: center; align-items: center; }
    .tokenImage.avatar { width: 68px; height: 68px; }
    .avatar-status { width: 20px; height: 20px; }
    .card-stack, .card-socials, .card-cta { justify-content: center; }

    .discord-activity {
        max-width: 100%;
        text-align: left;
    }
    .da-large { width: 48px; height: 48px; }
    .da-images { width: 48px; height: 48px; }
    .da-small { width: 18px; height: 18px; }
    .card-name { font-size: 20px; }
    .card-bio { font-size: 13px; }
    .description { font-size: 13px; }
    .mobile-hide { display: none !important; }
    .ticket-form { max-height: 92vh; overflow-y: auto; }

    /* show text in social pills on index */
    .social-pill { padding: 10px 14px; font-size: 13px; }
    .social-pill img { width: 16px; height: 16px; }

    .pf-title { font-size: 22px; }
    .pf-sub { font-size: 13px; }

    .pf-project-title { font-size: 18px; }
    .pf-project-desc { font-size: 13px; }
    .project-meta { font-size: 10px; }
    .tag { font-size: 10px; padding: 2px 8px; }

    .pf-gallery .gallery-dots { margin-top: 10px; }
}

/* ── Mobile 320px ── */
@media (max-width: 320px) {
    .nft, .card { padding: 12px 10px; }
    .card-name { font-size: 16px; }
    .description { font-size: 12px; }
    .social-pill img { width: 14px; height: 14px; }
    .pf-title { font-size: 18px; }
}


.pwa-install-prompt {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: rgba(12, 12, 20, 0.88);
    border: 1px solid rgba(167, 139, 250, 0.15);
    color: var(--text);
    border-radius: var(--radius);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(167,139,250,0.05);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    z-index: 9997;
    width: max-content;
    max-width: min(380px, calc(100vw - 32px));
    padding: 16px 20px;
    opacity: 0;
    animation: slideUpPrompt 0.4s var(--ease-out) 0.2s forwards;
    display: flex;
    align-items: center;
    gap: 16px;
}

body.light-theme .pwa-install-prompt {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(124, 58, 237, 0.15);
}

.pwa-prompt-content {
    flex: 1;
    text-align: left;
}

.pwa-prompt-content h3 {
    margin: 0 0 3px;
    font-size: 14px;
    font-weight: 700;
}

.pwa-prompt-content p {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-muted);
}

.pwa-prompt-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.pwa-install-btn, .pwa-close-btn {
    padding: 7px 14px;
    border-radius: var(--radius-xs);
    font-family: var(--font);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    white-space: nowrap;
}

.pwa-install-btn {
    background: linear-gradient(135deg, var(--primary-strong), var(--primary));
    border: none;
    color: #fff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.pwa-install-btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
}

.pwa-close-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
}

.pwa-close-btn:hover {
    border-color: rgba(255,255,255,0.2);
    color: var(--text);
}

@keyframes slideUpPrompt {
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}


@media (max-width: 900px) {
    .pf-main { padding-left: 24px; padding-right: 24px; gap: 28px; }
    .pf-workspace { grid-template-columns: 180px 1fr; gap: 20px; }
}

@media (max-width: 680px) {
    .pf-main { padding: calc(var(--header-h) + 24px) 16px 48px; gap: 24px; }
    .pf-workspace { grid-template-columns: 1fr; }
    .pf-sidebar {
        position: static;
        flex-direction: column;
    }
    .project-bar {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }
    .project-pill {
        flex: 0 0 auto;
        box-shadow: none;
    }
    .project-pill.active { box-shadow: none; border-color: rgba(167, 139, 250, 0.4); }
    .pf-sidebar-footer { margin-top: 8px; padding-top: 8px; }
    .pf-order-btn { width: auto; }
    .pf-gallery .gallery-nav.prev { left: -8px; }
    .pf-gallery .gallery-nav.next { right: -8px; }
    .pf-hero { flex-direction: column; align-items: flex-start; gap: 16px; padding-bottom: 24px; }
    .pf-title { font-size: 28px; }
}

@media (max-height: 500px) and (orientation: landscape) {
    .container { padding: 10px; justify-content: flex-start; }
    .nft, .card { max-width: 90%; padding: 12px; }
    .dc-banner { height: 50px; }
    .dc-avatar-area { margin-top: -24px; }
    .tokenImage.avatar { width: 60px; height: 60px; }
    .avatar-status { width: 16px; height: 16px; }
    h2.glowing-text, .card-name { font-size: 16px; }
    .description { font-size: 12px; }
    .ticket-form { max-height: 90vh; max-width: 90%; }
}

@media (max-width: 360px) {
    .social-pill { font-size: 12px; padding: 8px 10px; }
    .cta-primary, .cta-secondary { font-size: 13px; padding: 10px 16px; }
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body { font-weight: 400; }
}

@media (hover: none) {
    button, .close-ticket, .submit-ticket,
    .cta-primary, .cta-secondary, .social-pill {
        min-height: 44px;
    }

    button:active, .cta-primary:active,
    .cta-secondary:active, .social-pill:active {
        transform: scale(0.96);
        opacity: 0.9;
    }
}


.device-info {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    font-size: 13px;
    background: rgba(167, 139, 250, 0.06);
    border: 1px solid var(--surface-border);
    padding: 5px 10px;
    border-radius: var(--radius-xs);
}

.device-info span { display: flex; align-items: center; }
