/* =========================================================
   SOCIALS PAGE  –  orbital solar system
   ========================================================= */

/* ?? Canvas layers ?????????????????????????????????????????????????????????? */
#starfield {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

#solar-canvas {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* ?? Solar system container ????????????????????????????????????????????????? */
#solar-system {
    position: fixed;
    inset: 0;
    z-index: 2;
}

/* ?? Sun (center logo) ?????????????????????????????????????????????????????? */
#solar-sun {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: clamp(76px, 11vw, 120px);
    height: clamp(76px, 11vw, 120px);
    z-index: 5;
    pointer-events: none;
    border-radius: 50%;
}

#solar-sun img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    animation: sunPulse 3.2s ease-in-out infinite alternate;
}

@keyframes sunPulse {
    from {
        filter: drop-shadow(0 0 14px rgba(0, 180, 255, 0.65))
                drop-shadow(0 0 38px rgba(0, 80, 255, 0.45));
    }
    to {
        filter: drop-shadow(0 0 26px rgba(0, 220, 255, 0.95))
                drop-shadow(0 0 70px rgba(0, 140, 255, 0.65))
                drop-shadow(0 0 120px rgba(80, 0, 255, 0.25));
    }
}

/* ?? Planet elements ???????????????????????????????????????????????????????? */
.planet {
    position: absolute;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: left, top, opacity;
}

.planet:hover {
    transform: scale(1.55) !important;
}

.planet-body {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c, #444);
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.planet:hover .planet-body {
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow:
        0 0 18px var(--c, #fff),
        0 0 40px color-mix(in srgb, var(--c, #fff) 40%, transparent),
        inset 0 0 8px rgba(255, 255, 255, 0.12);
}

.planet-body svg {
    width: 55%;
    height: 55%;
    fill: #fff;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
    flex-shrink: 0;
}

/* Image-based planets (logo_pawno / logo_ithead) */
.planet-body--img {
    padding: 0;
    background: rgba(10, 12, 30, 0.55);
}

.planet-body--img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* ?? Per-planet colour tokens ??????????????????????????????????????????????? */
#p-youtube  { --c: #ff2020; }
#p-steam    { --c: #1e9fff; }
#p-pawno    { --c: #00c896; }
#p-ithead   { --c: #4a90d9; }
#p-facebook { --c: #4267b2; }
#p-twitter  { --c: #1da1f2; }

/* ?? Tooltip ???????????????????????????????????????????????????????????????? */
#planet-tooltip {
    position: fixed;
    z-index: 50;
    padding: 10px 18px 12px;
    background: rgba(3, 6, 24, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 10px;
    backdrop-filter: blur(12px);
    pointer-events: none;
    white-space: nowrap;
    text-align: center;
    opacity: 0;
    transform: translateX(-50%) translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#planet-tooltip.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

#pt-name {
    font-family: 'Orbitron', monospace;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #fff;
    margin-bottom: 3px;
}

#pt-handle {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.70rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
}

#pt-visit {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(80, 190, 255, 0.85);
}

/* ?? Back link ?????????????????????????????????????????????????????????????? */
.back-link {
    position: fixed;
    top: 22px;
    left: 26px;
    z-index: 50;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.25s;
}

.back-link:hover { color: rgba(255, 255, 255, 0.82); }

.back-arrow { transition: transform 0.2s; }
.back-link:hover .back-arrow { transform: translateX(-5px); }

/* ?? Page title ????????????????????????????????????????????????????????????? */
#socials-title {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    font-family: 'Orbitron', monospace;
    font-size: clamp(0.9rem, 2.2vw, 1.6rem);
    font-weight: 700;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
    pointer-events: none;
    white-space: nowrap;
}

#socials-title::before,
#socials-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
}

#socials-title::before { color: #00ffff; animation: glitch-slice-a 9s infinite; }
#socials-title::after  { color: #ff00ff; animation: glitch-slice-b 9s infinite; }

@keyframes glitch-slice-a {
    0%, 88%, 100% { opacity: 0; clip-path: none; transform: none; }
    90% {
        opacity: 0.85;
        clip-path: polygon(0 18%, 100% 18%, 100% 40%, 0 40%);
        transform: translate(-5px, 0);
    }
    93% {
        opacity: 0.85;
        clip-path: polygon(0 55%, 100% 55%, 100% 75%, 0 75%);
        transform: translate(4px, 0);
    }
    96% { opacity: 0; }
}

@keyframes glitch-slice-b {
    0%, 88%, 100% { opacity: 0; clip-path: none; transform: none; }
    91% {
        opacity: 0.8;
        clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
        transform: translate(5px, 0);
    }
    94% {
        opacity: 0.8;
        clip-path: polygon(0 5%, 100% 5%, 100% 22%, 0 22%);
        transform: translate(-4px, 0);
    }
    96% { opacity: 0; }
}


/* ?? Canvas layers ?????????????????????????????????????????????????????????? */
#particle-canvas {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* ?? Page wrapper ??????????????????????????????????????????????????????????? */
#socials-page {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ?? Header ????????????????????????????????????????????????????????????????? */
#socials-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 28px;
    z-index: 10;
    pointer-events: none;
}

.back-link {
    position: fixed;
    top: 22px;
    left: 26px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
    text-decoration: none;
    pointer-events: all;
    transition: color 0.25s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.back-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

.back-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.back-link:hover .back-arrow {
    transform: translateX(-5px);
}

/* ?? Glitch title ??????????????????????????????????????????????????????????? */
.glitch-text {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2.2rem, 7vw, 5.5rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #fff;
    position: relative;
    user-select: none;
    pointer-events: none;
    animation: glitch-shake 7s infinite;
    margin-bottom: 80px;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.glitch-text::before {
    color: #00ffff;
    animation: glitch-slice-a 7s infinite;
}

.glitch-text::after {
    color: #ff00ff;
    animation: glitch-slice-b 7s infinite;
}

@keyframes glitch-shake {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-4px, 2px); }
    40% { transform: translate(-4px, -2px); }
    60% { transform: translate(4px, 2px); }
    80% { transform: translate(4px, -2px); }
}

@keyframes glitch-slice-a {
    0%, 100% { clip-path: polygon(0% 0%, 100% 0%, 100% 33%, 0% 33%); }
    20% { clip-path: polygon(0% 10%, 100% 10%, 100% 45%, 0% 45%); }
    40% { clip-path: polygon(0% 5%, 100% 5%, 100% 40%, 0% 40%); }
    60% { clip-path: polygon(0% 20%, 100% 20%, 100% 60%, 0% 60%); }
    80% { clip-path: polygon(0% 8%, 100% 8%, 100% 38%, 0% 38%); }
}

@keyframes glitch-slice-b {
    0%, 100% { clip-path: polygon(0% 67%, 100% 67%, 100% 100%, 0% 100%); }
    20% { clip-path: polygon(0% 55%, 100% 55%, 100% 90%, 0% 90%); }
    40% { clip-path: polygon(0% 60%, 100% 60%, 100% 95%, 0% 95%); }
    60% { clip-path: polygon(0% 40%, 100% 40%, 100% 80%, 0% 80%); }
    80% { clip-path: polygon(0% 62%, 100% 62%, 100% 92%, 0% 92%); }
}

/* ?? Socials Grid ??????????????????????????????????????????????????????????? */
#socials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 24px;
    padding: 40px;
    max-width: 900px;
    width: 100%;
    pointer-events: all;
    z-index: 3;
}

.social-button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 28px 20px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--c);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cd) 0%, transparent 100%);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.social-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--c), transparent 50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.social-button:hover {
    color: var(--c);
    background: linear-gradient(135deg, var(--cd) 0%, var(--cd) 100%);
    box-shadow: 0 0 30px var(--c), inset 0 0 20px rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
    border-color: var(--c);
}

.social-button:hover::before {
    opacity: 0.4;
}

.social-button:active {
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--c);
}

/* ?? Social Icon ???????????????????????????????????????????????????????????? */
.social-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c);
    transition: all 0.3s ease;
}

.social-button:hover .social-icon {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 8px var(--c));
}

.social-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* ?? Social Label ??????????????????????????????????????????????????????????? */
.social-label {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
}

.social-button:hover .social-label {
    color: var(--c);
    text-shadow: 0 0 10px var(--c);
}

/* ?? Responsive Design ?????????????????????????????????????????????????????? */
@media (max-width: 768px) {
    #socials-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 16px;
        padding: 30px;
        max-width: 600px;
    }

    .social-button {
        padding: 20px 16px;
        border-radius: 8px;
    }

    .social-icon {
        width: 40px;
        height: 40px;
    }

    .social-label {
        font-size: 0.75rem;
    }

    .glitch-text {
        margin-bottom: 60px;
    }
}

@media (max-width: 480px) {
    #socials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 20px;
    }

    .social-button {
        padding: 16px 12px;
        border-radius: 6px;
    }

    .social-icon {
        width: 36px;
        height: 36px;
    }

    .glitch-text {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }
}
