/* ===========================
   CSS Variables & Reset
   =========================== */
:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.35);
    --accent-1: #7c3aed;
    --accent-2: #06b6d4;
    --accent-3: #f43f5e;
    --accent-4: #10b981;
    --gradient-primary: linear-gradient(135deg, #7c3aed, #06b6d4);
    --gradient-featured: linear-gradient(135deg, #7c3aed 0%, #a855f7 30%, #06b6d4 70%, #22d3ee 100%);
    --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.15);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* ===========================
   Animated Background
   =========================== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #7c3aed, transparent 70%);
    top: -10%;
    left: -5%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #06b6d4, transparent 70%);
    top: 40%;
    right: -10%;
    animation-delay: -5s;
    animation-duration: 22s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #f43f5e, transparent 70%);
    bottom: -5%;
    left: 20%;
    animation-delay: -10s;
    animation-duration: 28s;
}

.orb-4 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #a855f7, transparent 70%);
    top: 60%;
    left: -15%;
    animation-delay: -7s;
    animation-duration: 20s;
}

.orb-5 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #22d3ee, transparent 70%);
    top: 20%;
    right: 20%;
    animation-delay: -12s;
    animation-duration: 30s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(80px, -60px) scale(1.1);
    }
    50% {
        transform: translate(-40px, 80px) scale(0.9);
    }
    75% {
        transform: translate(60px, 40px) scale(1.05);
    }
}

/* ===========================
   Particle Canvas
   =========================== */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ===========================
   Cursor Glow
   =========================== */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.12), transparent 70%);
    pointer-events: none;
    z-index: 2;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

body:hover .cursor-glow {
    opacity: 1;
}

/* ===========================
   Container
   =========================== */
.container {
    position: relative;
    z-index: 10;
    max-width: 480px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===========================
   Profile Section
   =========================== */
.profile-section {
    text-align: center;
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    margin-bottom: 28px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    animation: fadeInUp 0.8s ease 0.1s forwards;
    opacity: 0;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.status-badge.online {
    background: rgba(67, 181, 129, 0.1);
    border-color: rgba(67, 181, 129, 0.25);
    color: #43b581;
}

.status-badge.idle {
    background: rgba(250, 166, 26, 0.1);
    border-color: rgba(250, 166, 26, 0.25);
    color: #faa61a;
}

.status-badge.dnd {
    background: rgba(240, 71, 71, 0.1);
    border-color: rgba(240, 71, 71, 0.25);
    color: #f04747;
}

.status-badge.offline {
    background: rgba(116, 127, 141, 0.1);
    border-color: rgba(116, 127, 141, 0.2);
    color: #747f8d;
}

/* Discord Status */
.discord-status-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.status-indicator.online {
    background-color: #43b581;
    box-shadow: 0 0 8px rgba(67, 181, 129, 0.6);
}

.status-indicator.dnd {
    background-color: #f04747;
    box-shadow: 0 0 8px rgba(240, 71, 71, 0.6);
}

.status-indicator.idle {
    background-color: #faa61a;
    box-shadow: 0 0 8px rgba(250, 166, 26, 0.6);
}

.status-indicator.offline {
    background-color: #747f8d;
    box-shadow: none;
}

.status-indicator.loading {
    background-color: #b9bbbe;
    animation: status-pulse 1.5s ease-in-out infinite;
}

.status-indicator.error {
    background-color: #cc0000;
}

#discord-status-text {
    font-weight: 600;
    transition: color 0.3s ease;
}

#discord-status-text.error {
    color: #cc0000;
}

@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Avatar */
.avatar-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    cursor: pointer;
}

.avatar-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--gradient-primary);
    animation: spin-slow 8s linear infinite;
    opacity: 0.8;
}

.avatar-ring.ring-2 {
    inset: -8px;
    background: var(--gradient-featured);
    animation: spin-slow 12s linear infinite reverse;
    opacity: 0.3;
    filter: blur(4px);
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 2;
    border: 3px solid var(--bg-primary);
    transition: transform var(--transition-bounce);
}

.avatar-wrapper:hover .avatar {
    transform: scale(1.08);
}

.avatar-wrapper:hover .avatar-ring {
    animation-duration: 3s;
}

/* Name */
.name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.name-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.verified-badge {
    color: #06b6d4;
    font-size: 1.1rem;
    -webkit-text-fill-color: #06b6d4;
    animation: badge-pop 0.5s ease 1s forwards;
    transform: scale(0);
    display: inline-block;
}

@keyframes badge-pop {
    0% { transform: scale(0) rotate(-180deg); }
    60% { transform: scale(1.3) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.handle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 400;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.3s forwards;
}

.bio {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 360px;
    margin: 0 auto 24px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

/* Stats Row */
.stats-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 16px 28px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.5s forwards;
}

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

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

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 28px;
    background: var(--glass-border);
}

/* ===========================
   Links Section
   =========================== */
.links-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

/* Link Card */
.link-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px) scale(0.98);
}

.link-card:nth-child(1) { animation: cardSlideIn 0.6s ease 0.6s forwards; }
.link-card:nth-child(2) { animation: cardSlideIn 0.6s ease 0.7s forwards; }
.link-card:nth-child(3) { animation: cardSlideIn 0.6s ease 0.8s forwards; }
.link-card:nth-child(4) { animation: cardSlideIn 0.6s ease 0.9s forwards; }
.link-card:nth-child(5) { animation: cardSlideIn 0.6s ease 1.0s forwards; }

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

.link-card:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-glow);
}

.link-card:active {
    transform: translateY(0) scale(0.98);
}

/* Link Shine Effect */
.link-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.5s ease;
}

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

/* Featured Card */
.link-card.featured {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(6, 182, 212, 0.1));
    border-color: rgba(124, 58, 237, 0.3);
    padding: 18px 20px;
}

.link-card.featured:hover {
    border-color: rgba(124, 58, 237, 0.5);
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.2), 0 0 60px rgba(6, 182, 212, 0.1);
}

/* Icon Wrappers */
.link-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    transition: all var(--transition-smooth);
    position: relative;
}

.link-card:hover .link-icon-wrapper {
    transform: scale(1.1) rotate(-5deg);
}

.featured-icon {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(6, 182, 212, 0.3));
    color: #c4b5fd;
}

.github {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.youtube {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.instagram {
    background: linear-gradient(135deg, rgba(131, 58, 180, 0.2), rgba(253, 29, 29, 0.15), rgba(252, 176, 69, 0.1));
    color: #e879f9;
}

.tiktok {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

.twitter {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

.discord {
    background: rgba(88, 101, 242, 0.15);
    color: #818cf8;
}

.telegram {
    background: rgba(38, 166, 222, 0.15);
    color: #38bdf8;
}

.email {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
}

/* Link Content */
.link-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.link-title {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.link-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.link-arrow {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: all var(--transition-smooth);
    flex-shrink: 0;
}

.link-card:hover .link-arrow {
    color: var(--text-secondary);
    transform: translateX(4px);
}

/* ===========================
   Music Widget
   =========================== */
.music-widget {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 1.5s forwards;
}

.music-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 24px;
}

.music-visualizer .bar {
    width: 3px;
    border-radius: 2px;
    background: var(--gradient-primary);
    animation: music-bar 1.2s ease-in-out infinite;
}

.bar:nth-child(1) { height: 8px; animation-delay: 0s; }
.bar:nth-child(2) { height: 16px; animation-delay: 0.15s; }
.bar:nth-child(3) { height: 12px; animation-delay: 0.3s; }
.bar:nth-child(4) { height: 20px; animation-delay: 0.45s; }
.bar:nth-child(5) { height: 6px; animation-delay: 0.6s; }

@keyframes music-bar {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.3); }
}

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

.music-title {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.music-track {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===========================
   Footer
   =========================== */
.footer {
    text-align: center;
    opacity: 0;
    animation: fadeInUp 0.8s ease 1.7s forwards;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: all var(--transition-smooth);
}

.footer-icon:hover {
    background: var(--glass-hover);
    border-color: rgba(124, 58, 237, 0.3);
    color: #c4b5fd;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.15);
}

.footer-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.heart {
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
    75% { transform: scale(1.15); }
}

.footer-year {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   Scrollbar
   =========================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.5);
}

/* ===========================
   Selection
   =========================== */
::selection {
    background: rgba(124, 58, 237, 0.3);
    color: #fff;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 520px) {
    .container {
        padding: 30px 16px 40px;
    }

    .name {
        font-size: 1.5rem;
    }

    .bio {
        font-size: 0.82rem;
    }

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

    .stat-number {
        font-size: 1.1rem;
    }

    .link-card {
        padding: 12px 14px;
    }

    .link-icon-wrapper {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .orb { filter: blur(60px); opacity: 0.3; }
    .orb-1 { width: 250px; height: 250px; }
    .orb-2 { width: 200px; height: 200px; }
    .orb-3 { width: 180px; height: 180px; }
    .orb-4 { width: 150px; height: 150px; }
    .orb-5 { width: 120px; height: 120px; }
}

/* ===========================
   Accessibility - Reduced Motion
   =========================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
