@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg-color: #09090b;
    --card-bg: rgba(24, 24, 27, 0.7);
    --card-border: rgba(255, 255, 255, 0.05);
    --text-color: #fafafa;
    --text-muted: #a1a1aa;
    --btn-bg: rgba(255, 255, 255, 0.03);
    --btn-border: rgba(255, 255, 255, 0.08);
    --accent-pink: #ff7ab8;
    --accent-violet: #a855f7;
    --accent-cyan: #00C2FF;
    --accent-grad: linear-gradient(135deg, #ff7ab8, #a855f7 55%, #00C2FF);
}

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

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 18% 8%, rgba(255, 122, 184, 0.10) 0%, transparent 45%),
        radial-gradient(circle at 82% 12%, rgba(168, 85, 247, 0.10) 0%, transparent 42%),
        radial-gradient(circle at 50% 100%, rgba(0, 194, 255, 0.07) 0%, transparent 45%),
        radial-gradient(circle at 50% 0%, #1e1e2e 0%, #09090b 70%);
    background-attachment: fixed;
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-height: 100vh;
}

body.main-page {
    align-items: center;
    padding: 100px 20px 0 20px;
}

body.error-page {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.error-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 120px 20px 40px 20px;
    box-sizing: border-box;
}

.error-page .global-footer {
    margin-top: 0;
}

.error-code {
    margin: 0;
    font-size: 96px;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1;
    background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.error-divider {
    width: 48px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #a855f7, #00C2FF);
    margin: 12px 0;
}

.error-msg {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.error-hint {
    margin: 0 0 6px 0;
    font-size: 14px;
    color: #a1a1aa;
    max-width: 320px;
    line-height: 1.6;
}

.error-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 24px;
    border-radius: 100px;
    background: var(--accent-grad);
    border: 1px solid rgba(255, 122, 184, 0.45);
    color: #ffffff;
    font-weight: 600;
    font-size: 14.5px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.error-btn:hover {
    background: var(--accent-grad);
    border-color: rgba(255, 122, 184, 0.8);
    box-shadow: 0 4px 20px rgba(255, 122, 184, 0.3);
    transform: translateY(-1px);
}

.error-btn i {
    font-size: 13px;
    color: #ffffff;
}

.page-main {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 0 auto;
}

.skip-link {
    position: fixed;
    top: -60px;
    left: 16px;
    z-index: 2000;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--accent-grad);
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 16px;
}

:focus-visible {
    outline: 2px solid var(--accent-pink);
    outline-offset: 2px;
}

::selection {
    background: rgba(255, 122, 184, 0.4);
    color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- Butterfly Gimmick ---------- */
#butterfly-gimmick {
    position: fixed;
    top: 0;
    left: 0;
    width: 56px;
    height: 56px;
    object-fit: contain;
    pointer-events: none;
    z-index: 60;
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
}

@media (max-width: 600px) {
    #butterfly-gimmick {
        width: 42px;
        height: 42px;
    }
}

.profile {
    text-align: center;
    margin-bottom: 40px;
}

.title {
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.links-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 600px;
}

/* ---------- Motion & Page Transitions ---------- */
html {
    scroll-behavior: smooth;
}

.link-item:active {
    transform: translateY(0) scale(0.99);
}

.aero-btn-primary:active,
.error-btn:active {
    transform: translateY(0) scale(0.98);
}

/* View Transitions */
::view-transition-old(root) {
    animation: pageOut 0.2s ease both;
}

::view-transition-new(root) {
    animation: pageIn 0.35s ease both;
}

@keyframes pageOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-card {
    position: relative;
    overflow: hidden;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 20px 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.section-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 122, 184, 0.45), rgba(0, 194, 255, 0.3), transparent);
}

.section-title {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--accent-pink);
    font-size: 15px;
}

.link-item {
    background-color: var(--btn-bg);
    color: var(--text-color);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid var(--btn-border);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.link-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s, transform 0.3s;
}

.link-icon i {
    font-size: 18px;
    line-height: 1;
    color: inherit;
}

.link-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-go {
    margin-left: auto;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.3s, transform 0.3s, color 0.3s;
}

.link-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    background-color: rgba(255, 255, 255, 0.06);
}

.link-item:hover .link-icon {
    transform: scale(1.08);
}

.link-item:hover .link-go {
    opacity: 1;
    transform: translateX(0);
}

/* Brand Colors: Icon Containers & Hover Glow */
.brand-twitch .link-icon { background: rgba(145, 70, 255, 0.14); color: #9146FF; }
.brand-twitch:hover { border-color: rgba(145, 70, 255, 0.45); box-shadow: 0 4px 20px rgba(145, 70, 255, 0.16); }

.brand-youtube .link-icon { background: rgba(255, 0, 0, 0.12); color: #FF0000; }
.brand-youtube:hover { border-color: rgba(255, 0, 0, 0.45); box-shadow: 0 4px 20px rgba(255, 0, 0, 0.16); }

.brand-tiktok .link-icon { background: rgba(0, 242, 254, 0.1); color: #00f2fe; }
.brand-tiktok:hover { border-color: rgba(0, 242, 254, 0.4); box-shadow: 0 4px 20px rgba(0, 242, 254, 0.16); }

.brand-instagram .link-icon { background: rgba(225, 48, 108, 0.12); color: #E1306C; }
.brand-instagram:hover { border-color: rgba(225, 48, 108, 0.45); box-shadow: 0 4px 20px rgba(225, 48, 108, 0.16); }

.brand-x .link-icon { background: rgba(255, 255, 255, 0.08); color: #ffffff; }
.brand-x:hover { border-color: rgba(255, 255, 255, 0.35); box-shadow: 0 4px 20px rgba(255, 255, 255, 0.08); }

.brand-spotify .link-icon { background: rgba(29, 185, 84, 0.12); color: #1DB954; }
.brand-spotify:hover { border-color: rgba(29, 185, 84, 0.45); box-shadow: 0 4px 20px rgba(29, 185, 84, 0.16); }

.brand-soundcloud .link-icon { background: rgba(255, 85, 0, 0.12); color: #FF5500; }
.brand-soundcloud:hover { border-color: rgba(255, 85, 0, 0.45); box-shadow: 0 4px 20px rgba(255, 85, 0, 0.16); }

.brand-discord .link-icon { background: rgba(88, 101, 242, 0.12); color: #5865F2; }
.brand-discord:hover { border-color: rgba(88, 101, 242, 0.45); box-shadow: 0 4px 20px rgba(88, 101, 242, 0.16); }

.brand-whatsapp .link-icon { background: rgba(37, 211, 102, 0.12); color: #25D366; }
.brand-whatsapp:hover { border-color: rgba(37, 211, 102, 0.45); box-shadow: 0 4px 20px rgba(37, 211, 102, 0.16); }

.brand-feedback .link-icon { background: rgba(255, 176, 32, 0.12); color: #FFB020; }
.brand-feedback:hover { border-color: rgba(255, 176, 32, 0.45); box-shadow: 0 4px 20px rgba(255, 176, 32, 0.16); }

.brand-github .link-icon { background: rgba(255, 255, 255, 0.08); color: #ffffff; }
.brand-github:hover { border-color: rgba(255, 255, 255, 0.35); box-shadow: 0 4px 20px rgba(255, 255, 255, 0.08); }

.brand-modrinth .link-icon { background: rgba(27, 217, 106, 0.12); color: #1BD96A; }
.brand-modrinth:hover { border-color: rgba(27, 217, 106, 0.45); box-shadow: 0 4px 20px rgba(27, 217, 106, 0.16); }

.brand-played .link-icon { background: rgba(0, 194, 255, 0.12); color: #00C2FF; }
.brand-played:hover { border-color: rgba(0, 194, 255, 0.45); box-shadow: 0 4px 20px rgba(0, 194, 255, 0.16); }

.brand-aerop2p .link-icon { background: rgba(255, 122, 184, 0.14); color: #ff7ab8; }
.brand-aerop2p:hover { border-color: rgba(255, 122, 184, 0.45); box-shadow: 0 4px 20px rgba(255, 122, 184, 0.16); }

/* 404 Page Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #00C2FF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.error-link {
    color: #a1a1aa;
    text-decoration: none;
    border-bottom: 1px solid #a1a1aa;
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}

.error-link:hover {
    color: #ffffff;
    border-color: #ffffff;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    border: 3px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Mobile Optimization */
@media (max-width: 600px) {
    body.main-page {
        padding: 80px 16px 0;
    }

    .section-card {
        padding: 16px 12px;
        border-radius: 18px;
        gap: 10px;
    }

    .link-item {
        padding: 11px 13px;
        font-size: 15px;
        gap: 12px;
    }

    .link-icon {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .link-icon i {
        font-size: 17px;
    }

    .title {
        font-size: 28px;
    }

    .error-code {
        font-size: 72px;
        letter-spacing: -1.5px;
    }

    .error-main {
        padding: 100px 16px 32px 16px;
    }
}
