/* P07XBuilder - Futuristic Link Aggregator | Purple/Black Theme */

:root {
    --primary-purple: #7c3aed;
    --primary-purple-light: #a78bfa;
    --primary-purple-dark: #5b21b6;
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a2e;
    --text-primary: #ffffff;
    --text-secondary: #b4b4bb;
    --text-muted: #8a8a95;
    --accent-pink: #ec4899;
    --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
    --glass-bg: rgba(26, 26, 46, 0.7);
    --glass-border: rgba(124, 58, 237, 0.2);
    --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.3);
    --container-max: 520px;
    --border-radius: 16px;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-primary: #f5f3ff;
    --bg-secondary: #ede9fe;
    --text-primary: #1f1f1f;
    --text-secondary: #4a4a4a;
    --text-muted: #6b6b6b;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(124, 58, 237, 0.3);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    line-height: 1.6;
}

#particleCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.gradient-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse at 20% 20%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
}

.container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 48px 24px;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-section {
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
}

.avatar-container {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 28px;
}

.avatar {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    z-index: 3;
}

.avatar-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
}

.avatar-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border: 2px solid var(--primary-purple);
    border-radius: 50%;
    animation: pulse-ring 3s ease-in-out infinite;
}

.avatar-ring.ring-2 {
    width: 130px;
    height: 130px;
    border-color: var(--primary-purple-light);
    opacity: 0.6;
    animation-delay: 0.5s;
}

.avatar-ring.ring-3 {
    width: 140px;
    height: 140px;
    border-color: var(--accent-pink);
    opacity: 0.3;
    animation-delay: 1s;
}

@keyframes pulse-ring {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 1;
    }
}

.status-indicator {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 4;
}

.status-dot {
    display: block;
    width: 16px;
    height: 16px;
    background: #22c55e;
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
    animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
    }

    50% {
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.8);
    }
}

.profile-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 10px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-tagline {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
}

.tagline-icon {
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

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

    50% {
        transform: translateY(-5px);
    }
}

.profile-stats {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    padding: 18px 28px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-icon {
    font-size: 1.3rem;
}

.stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-purple-light);
    transition: all 0.2s;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.stat-divider {
    width: 1px;
    height: 44px;
    background: linear-gradient(180deg, transparent, var(--glass-border), transparent);
}

.links-section {
    width: 100%;
    flex: 1;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.links-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.link-card {
    position: relative;
    display: block;
    text-decoration: none;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 20px 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.link-card:hover,
.link-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--primary-purple);
    box-shadow: var(--shadow-glow);
}

.link-card:active {
    transform: translateY(-2px);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.5) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.link-card:hover .card-glow {
    opacity: 1;
}

.card-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    z-index: 2;
}

.card-icon {
    width: 52px;
    height: 52px;
    background: var(--gradient-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card-icon .icon-default,
.card-icon .icon-hover {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.card-icon .icon-default {
    opacity: 1;
}

.card-icon .icon-hover {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
}

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

/* Ko-fi brand color */
.card-icon.kofi-icon {
    background: #29ABE0;
}

.card-icon.kofi-icon svg {
    fill: white;
}

.link-card:hover .card-icon {
    transform: scale(1.05);
}

.link-card[data-platform="kofi"]:hover {
    border-color: #29ABE0;
    box-shadow: 0 0 40px rgba(41, 171, 224, 0.3);
}

.card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1rem, 3vw, 1.15rem);
    font-weight: 600;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    color: var(--text-secondary);
}

.card-arrow {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition-normal);
}

.card-arrow svg {
    width: 22px;
    height: 22px;
}

.link-card:hover .card-arrow {
    color: var(--primary-purple-light);
    transform: translateX(4px);
}

.card-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    z-index: 1;
    transition: left 0.6s ease;
}

.link-card:hover .card-shimmer {
    left: 100%;
}

.coming-soon {
    margin-top: 28px;
    text-align: center;
}

.coming-soon-content {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px dashed var(--glass-border);
    border-radius: var(--border-radius);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.coming-soon-icon {
    animation: rocket 2s ease-in-out infinite;
}

@keyframes rocket {

    0%,
    100% {
        transform: translateY(0) rotate(-5deg);
    }

    50% {
        transform: translateY(-3px) rotate(5deg);
    }
}

.footer {
    margin-top: auto;
    padding-top: 48px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 24px;
    font-size: 0.8rem;
    color: #22c55e;
}

.security-badge svg {
    fill: #22c55e;
}

.theme-toggle,
.qr-toggle {
    position: fixed;
    top: 20px;
    width: 48px;
    height: 48px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    -webkit-tap-highlight-color: transparent;
}

.theme-toggle {
    right: 20px;
}

.qr-toggle {
    right: 78px;
    color: var(--text-secondary);
}

.theme-toggle:hover,
.qr-toggle:hover {
    border-color: var(--primary-purple);
    box-shadow: var(--shadow-glow);
    transform: scale(1.05);
}

.toggle-icon {
    font-size: 1.3rem;
}

.dark-icon {
    display: block;
}

.light-icon {
    display: none;
}

[data-theme="light"] .dark-icon {
    display: none;
}

[data-theme="light"] .light-icon {
    display: block;
}

.qr-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

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

.qr-modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 36px;
    text-align: center;
    position: relative;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
    max-width: 300px;
    width: 100%;
}

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

.qr-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qr-close:hover {
    border-color: var(--accent-pink);
    color: var(--accent-pink);
}

.qr-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 24px;
    color: var(--text-primary);
    font-weight: 600;
}

.qr-code {
    width: 200px;
    height: 200px;
    background: white;
    margin: 0 auto 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.qr-code canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.qr-url {
    font-size: 0.9rem;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .container {
        padding: 32px 20px;
    }

    .avatar-container {
        width: 120px;
        height: 120px;
    }

    .avatar {
        width: 85px;
        height: 85px;
    }

    .avatar-text {
        font-size: 1.2rem;
    }

    .avatar-ring {
        width: 100px;
        height: 100px;
    }

    .avatar-ring.ring-2 {
        width: 110px;
        height: 110px;
    }

    .avatar-ring.ring-3 {
        width: 120px;
        height: 120px;
    }

    .profile-stats {
        padding: 16px 20px;
        gap: 18px;
    }

    .link-card {
        padding: 18px 20px;
    }

    .card-icon {
        width: 48px;
        height: 48px;
    }

    .theme-toggle,
    .qr-toggle {
        width: 44px;
        height: 44px;
        top: 16px;
    }

    .theme-toggle {
        right: 16px;
    }

    .qr-toggle {
        right: 68px;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 28px 16px;
    }

    .profile-stats {
        padding: 14px 16px;
        gap: 14px;
    }

    .link-card {
        padding: 16px;
    }

    .card-icon {
        width: 44px;
        height: 44px;
    }

    .qr-code {
        width: 160px;
        height: 160px;
    }
}

@media (min-width: 768px) {
    .container {
        padding: 64px 32px;
    }

    .avatar-container {
        width: 160px;
        height: 160px;
    }

    .avatar {
        width: 110px;
        height: 110px;
    }

    .link-card {
        padding: 24px 28px;
    }

    .card-icon {
        width: 56px;
        height: 56px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    #particleCanvas {
        display: none;
    }
}

::selection {
    background: var(--primary-purple);
    color: white;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-purple-dark);
    border-radius: 4px;
}

.link-card:focus-visible,
.theme-toggle:focus-visible,
.qr-toggle:focus-visible {
    outline: 2px solid var(--primary-purple);
    outline-offset: 2px;
}