/* ----------------------------------------
   Variables
---------------------------------------- */
:root {
    --bg: #020204;
    --text: #f0f0f5;
    --muted: #5a5a90;
    --a1: #ff0055;
    --a2: #00f2fe;
    --a3: #7000ff;
    --a4: #fffb00;
    --glass: rgba(6, 6, 18, 0.75);
    --glass-border: rgba(255, 255, 255, 0.07);
    --mono: 'Share Tech Mono', monospace;
    --head: 'Outfit', sans-serif;
    --body: 'Inter', sans-serif;
}

/* ----------------------------------------
   Reset
---------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { cursor: none; }
body {
    font-family: var(--body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}
a { color: inherit; text-decoration: none; cursor: none; }
h1, h2, h3 { font-family: var(--head); font-weight: 900; }

/* ----------------------------------------
   CRT / VHS Effects
---------------------------------------- */
.scanlines {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0,0,0,0.09) 3px,
        rgba(0,0,0,0.09) 4px
    );
    pointer-events: none;
    z-index: 9995;
    animation: scanSlide 12s linear infinite;
}
@keyframes scanSlide {
    from { background-position: 0 0; }
    to   { background-position: 0 100vh; }
}

.crt-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, transparent 50%, rgba(0,0,0,0.65) 100%);
    pointer-events: none;
    z-index: 9994;
}

.vhs-noise {
    position: fixed;
    inset: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9993;
    animation: noiseAnim 0.4s steps(3) infinite;
}
@keyframes noiseAnim {
    0%   { transform: translate(0,0); }
    33%  { transform: translate(-2px, 1px); }
    66%  { transform: translate(2px,-1px); }
    100% { transform: translate(-1px,2px); }
}

/* ----------------------------------------
   Glitch Flash
---------------------------------------- */
.glitch-flash {
    position: fixed;
    inset: 0;
    display: none;
    pointer-events: none;
    z-index: 9996;
    mix-blend-mode: overlay;
    transition: opacity 0.08s ease;
}

/* ----------------------------------------
   Custom Cursor
---------------------------------------- */
.cursor-dot {
    position: fixed;
    width: 8px; height: 8px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    transform: translate(-50%,-50%);
    mix-blend-mode: difference;
    will-change: left, top;
}

.cursor-ring {
    position: fixed;
    width: 40px; height: 40px;
    border: 1.5px solid var(--a2);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%,-50%);
    will-change: left, top;
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    animation: ringPulse 2.5s ease-in-out infinite;
}
.cursor-ring.hover {
    width: 56px; height: 56px;
    border-color: var(--a1);
    background: rgba(255,0,85,0.06);
}
@keyframes ringPulse {
    0%,100% { border-color: var(--a2); box-shadow: 0 0 6px rgba(0,242,254,0.4); }
    50%      { border-color: var(--a1); box-shadow: 0 0 10px rgba(255,0,85,0.4); }
}

#cursor-trails {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* ----------------------------------------
   Background
---------------------------------------- */
#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.bg-parallax-text {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    white-space: nowrap;
    font-size: 20vw;
    font-weight: 900;
    font-family: var(--head);
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,0.012);
    z-index: 1;
    pointer-events: none;
    user-select: none;
}

/* ----------------------------------------
   Ticker Tape
---------------------------------------- */
.ticker-wrap {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%; height: 26px;
    background: rgba(0,0,0,0.88);
    border-top: 1px solid var(--a1);
    overflow: hidden;
    display: flex;
    align-items: center;
    z-index: 998;
}
.ticker {
    display: inline-block;
    white-space: nowrap;
    animation: tickerScroll 55s linear infinite;
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--a1);
    letter-spacing: 1px;
    will-change: transform;
}
@keyframes tickerScroll {
    from { transform: translateX(100vw); }
    to   { transform: translateX(-100%); }
}

/* ----------------------------------------
   Error Windows (Windows 98 style)
---------------------------------------- */
.error-window {
    position: fixed;
    background: #c0c0c0;
    border: 2px outset #fff;
    min-width: 260px;
    max-width: 310px;
    z-index: 900;
    font-family: var(--mono);
    font-size: 0.72rem;
    color: #000;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
    user-select: none;
    animation: errFloat 11s ease-in-out infinite;
}
.error-window:nth-of-type(2) { animation-delay: -5.5s; animation-duration: 14s; }
@keyframes errFloat {
    0%,100% { transform: translate(0,0) rotate(-0.5deg); }
    25%  { transform: translate(10px,-14px) rotate(0.6deg); }
    50%  { transform: translate(-6px,9px) rotate(-0.3deg); }
    75%  { transform: translate(14px,5px) rotate(0.9deg); }
}

.error-titlebar {
    background: linear-gradient(to right, #000080, #1084d0);
    color: #fff;
    padding: 3px 6px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: bold;
    cursor: grab;
    font-size: 0.7rem;
}
.error-titlebar:active { cursor: grabbing; }
.error-title-text { flex: 1; }
.error-icon { font-size: 0.85rem; }

.error-close {
    width: 16px; height: 14px;
    background: #c0c0c0;
    border: 2px outset #fff;
    color: #000;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6rem;
    cursor: pointer;
    flex-shrink: 0;
    font-family: sans-serif;
    line-height: 1;
}
.error-close:hover { background: #ff0055; color: #fff; }
.error-close:active { border: 2px inset #fff; }

.error-body { padding: 10px 12px; line-height: 2; }
.error-btns { margin-top: 8px; display: flex; gap: 5px; }
.error-btn {
    background: #c0c0c0;
    border: 2px outset #fff;
    padding: 2px 12px;
    cursor: pointer;
    font-family: var(--mono);
    font-size: 0.7rem;
    color: #000;
}
.error-btn:hover { background: #b0b0b0; }
.error-btn:active { border: 2px inset #fff; }

.fake-progress {
    width: 100%; height: 14px;
    background: #fff;
    border: 2px inset #808080;
    margin-top: 6px;
}
.fake-progress-bar {
    height: 100%;
    background: #000080;
    width: 0;
    animation: pFill 7s linear infinite;
}
@keyframes pFill {
    0%  { width: 0; }
    88% { width: 88%; }
    89% { width: 0; }
    100%{ width: 0; }
}

/* ----------------------------------------
   Dashboard Grid
---------------------------------------- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 1.4rem;
    height: calc(100vh - 26px);
    padding: 1.4rem 1.4rem 0;
    position: relative;
    z-index: 2;
}

.logo-wrapper    { grid-column: 1 / 3; grid-row: 1 / 2; }
.profile-wrapper { grid-column: 1 / 3; grid-row: 2 / 4; }
.my-links-wrapper{ grid-column: 3 / 4; grid-row: 1 / 3; }
.art-wrapper     { grid-column: 4 / 5; grid-row: 1 / 3; }
.friends-wrapper { grid-column: 3 / 5; grid-row: 3 / 4; }

@media (max-width: 1024px) {
    body { overflow-y: auto; overflow-x: hidden; }
    .dashboard-grid {
        height: auto;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        padding-bottom: 30px;
    }
    .logo-wrapper,.profile-wrapper,.art-wrapper,.my-links-wrapper,.friends-wrapper {
        grid-column: 1 / -1; grid-row: auto;
    }
}

/* ----------------------------------------
   Tilt Cards
---------------------------------------- */
.tilt-wrapper {
    perspective: 1200px;
    width: 100%; height: 100%;
    display: block; min-height: 0;
}
.tilt-card {
    width: 100%; height: 100%; min-height: 0;
    transform-style: preserve-3d;
    position: relative;
}

/* ----------------------------------------
   Glass Panels
---------------------------------------- */
.glass-panel {
    background: var(--glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}
.glass-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,0,85,0.04), rgba(0,242,254,0.04));
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    z-index: 0;
}
.glass-panel:hover::before { opacity: 1; }

/* Top-right corner accent */
.glass-panel::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 36px; height: 36px;
    border-top: 2px solid rgba(255,0,85,0.5);
    border-right: 2px solid rgba(255,0,85,0.5);
    border-radius: 0 14px 0 0;
    pointer-events: none;
    z-index: 0;
}

/* Make content sit above ::before overlay */
.glass-panel > * { position: relative; z-index: 1; }

/* ----------------------------------------
   Logo Block
---------------------------------------- */
.logo-box { justify-content: center; gap: 0.5rem; }

.logo-glitch {
    position: relative;
    font-family: var(--head);
    font-size: clamp(2rem, 3.8vw, 4.2rem);
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    line-height: 1;
    display: inline-block;
    animation: logoFlicker 5s ease-in-out infinite;
}
.logo-glitch::before,
.logo-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%;
}
.logo-glitch::before {
    color: var(--a1);
    clip-path: polygon(0 18%, 100% 18%, 100% 42%, 0 42%);
    transform: translateX(-3px);
    animation: glitchR 7s steps(1) infinite;
}
.logo-glitch::after {
    color: var(--a2);
    clip-path: polygon(0 58%, 100% 58%, 100% 80%, 0 80%);
    transform: translateX(3px);
    animation: glitchB 7s steps(1) infinite;
}

@keyframes glitchR {
    0%,88%,100% { transform: translateX(-3px); clip-path: polygon(0 18%,100% 18%,100% 42%,0 42%); }
    90% { transform: translateX(6px);  clip-path: polygon(0 28%,100% 28%,100% 52%,0 52%); }
    92% { transform: translateX(-6px); clip-path: polygon(0 10%,100% 10%,100% 36%,0 36%); }
    94% { transform: translateX(4px);  clip-path: polygon(0 22%,100% 22%,100% 46%,0 46%); }
    96% { transform: translateX(-3px); clip-path: polygon(0 18%,100% 18%,100% 42%,0 42%); }
}
@keyframes glitchB {
    0%,88%,100% { transform: translateX(3px);  clip-path: polygon(0 58%,100% 58%,100% 80%,0 80%); }
    91% { transform: translateX(-6px); clip-path: polygon(0 48%,100% 48%,100% 72%,0 72%); }
    93% { transform: translateX(6px);  clip-path: polygon(0 64%,100% 64%,100% 88%,0 88%); }
    95% { transform: translateX(-4px); clip-path: polygon(0 55%,100% 55%,100% 77%,0 77%); }
    97% { transform: translateX(3px);  clip-path: polygon(0 58%,100% 58%,100% 80%,0 80%); }
}
@keyframes logoFlicker {
    0%,93%,100% { opacity: 1; }
    94% { opacity: 0.75; }
    95% { opacity: 1; }
    96% { opacity: 0.55; }
    97% { opacity: 1; }
    98% { opacity: 0.85; }
}

.logo-sub {
    font-family: var(--mono);
    font-size: 0.85rem;
    letter-spacing: 3px;
    color: var(--muted);
    text-transform: uppercase;
    min-height: 1.3em;
}
.logo-sub::after { content: '▌'; animation: blink 0.7s step-end infinite; }

.sys-info { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.3rem; }
.sys-tag {
    font-family: var(--mono);
    font-size: 0.65rem;
    border: 1px solid var(--a3);
    color: var(--a3);
    padding: 1px 7px;
    border-radius: 2px;
    letter-spacing: 1px;
}

/* ----------------------------------------
   Shared
---------------------------------------- */
.blink { animation: blink 1s step-end infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

.line {
    width: 36px; height: 3px;
    background: var(--a1);
    margin-bottom: 0.7rem;
    border-radius: 1px;
    flex-shrink: 0;
}
.line.right { align-self: flex-end; }

h2 { font-size: 1.4rem; text-transform: uppercase; margin-bottom: 0.2rem; }
.my-links-box h2 { text-align: right; }

@keyframes gradShift {
    to { background-position: 400% center; }
}
.text-gradient {
    background: linear-gradient(90deg, var(--a1), var(--a2), var(--a3), var(--a4), var(--a1));
    background-size: 400% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradShift 3s linear infinite;
}

/* ----------------------------------------
   Profile Block
---------------------------------------- */
.profile-box { justify-content: flex-start; }

.profile-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.8rem; }

.avatar-container { position: relative; flex-shrink: 0; }

.yota-avatar {
    width: 68px; height: 68px;
    border-radius: 50%;
    display: block;
    position: relative; z-index: 2;
    border: 2px solid var(--a1);
    animation: avatarMorph 3s ease-in-out infinite;
}
@keyframes avatarMorph {
    0%,100% { border-radius: 50%; border-color: var(--a1); filter: drop-shadow(0 0 8px var(--a1)); transform: scale(1) rotate(0deg); }
    33%  { border-radius: 30% 70% 70% 30%/30% 30% 70% 70%; border-color: var(--a2); filter: drop-shadow(0 0 8px var(--a2)); }
    66%  { border-radius: 50% 30% 30% 70%/70% 70% 30% 30%; border-color: var(--a3); filter: drop-shadow(0 0 8px var(--a3)); transform: scale(1.06) rotate(6deg); }
}

.avatar-rings { position: absolute; inset: -8px; border-radius: 50%; z-index: 1; }
.avatar-rings::before,
.avatar-rings::after { content: ''; position: absolute; border-radius: 50%; border: 1px solid; }
.avatar-rings::before {
    inset: 0;
    border-color: rgba(0,242,254,0.35);
    animation: ringPop 2.2s ease-out infinite;
}
.avatar-rings::after {
    inset: -10px;
    border-color: rgba(112,0,255,0.2);
    animation: ringPop 2.2s ease-out infinite 0.7s;
}
@keyframes ringPop {
    0%   { transform: scale(0.85); opacity: 0.9; }
    100% { transform: scale(1.5);  opacity: 0; }
}

.profile-title { flex: 1; min-width: 0; }

.yota-name {
    font-family: var(--head);
    font-size: 1.7rem;
    font-weight: 900;
    text-transform: uppercase;
    background: linear-gradient(to right, #ff0055, #00f2fe, #7000ff, #fffb00, #ff0055);
    background-size: 400% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradShift 2s linear infinite, namePop 0.5s ease-in-out infinite alternate;
}
@keyframes namePop {
    from { letter-spacing: 0; transform: skewX(-6deg); }
    to   { letter-spacing: 2px; transform: skewX(6deg); }
}

.profile-status {
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--muted);
    margin-top: 3px;
    display: flex; align-items: center; gap: 4px;
    letter-spacing: 1px;
}
.status-dot {
    width: 6px; height: 6px;
    background: var(--a4);
    border-radius: 50%;
    animation: blink 0.8s step-end infinite;
    flex-shrink: 0;
}

.ramen-scroll-container {
    flex: 1; min-height: 0;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,0,85,0.22);
    border-radius: 5px;
    padding: 8px 10px;
    display: flex; flex-direction: column;
    overflow: hidden;
    margin-bottom: 0.7rem;
}
.ramen-label {
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--a2);
    margin-bottom: 5px;
    opacity: 0.8;
    flex-shrink: 0;
}
.ramen-blink { animation: blink 1s step-end infinite; color: var(--a4); }
.ramen-text {
    font-family: var(--mono);
    font-size: 0.78rem;
    line-height: 1.85;
    color: rgba(255,255,255,0.55);
    overflow-y: auto;
    flex: 1; min-height: 0;
}
.ramen-text::-webkit-scrollbar { width: 3px; }
.ramen-text::-webkit-scrollbar-thumb { background: var(--a1); border-radius: 2px; }

.tags { display: flex; gap: 0.35rem; flex-wrap: wrap; flex-shrink: 0; }
.tag {
    font-family: var(--mono);
    background: rgba(0,242,254,0.07);
    color: var(--a2);
    padding: 1px 7px;
    border-radius: 2px;
    font-size: 0.75rem;
    border: 1px solid rgba(0,242,254,0.18);
    transition: 0.25s;
}
.tag:hover { background: var(--a2); color: #000; }

/* ----------------------------------------
   3D Cube Block
---------------------------------------- */
.art-box { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.geometric-art { width: 175px; height: 175px; perspective: 800px; display: flex; align-items: center; justify-content: center; }
.cube {
    width: 100%; height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 16s linear infinite;
}
.face {
    position: absolute;
    width: 125px; height: 125px;
    top: 25px; left: 25px;
    border: 2px solid var(--a3);
    background: rgba(112,0,255,0.07);
    box-shadow: 0 0 20px rgba(112,0,255,0.25);
    transition: all 0.5s ease;
}
.front  { transform: translateZ(62px); }
.back   { transform: rotateY(180deg) translateZ(62px); }
.right  { transform: rotateY(90deg)  translateZ(62px); }
.left   { transform: rotateY(-90deg) translateZ(62px); }
.top    { transform: rotateX(90deg)  translateZ(62px); }
.bottom { transform: rotateX(-90deg) translateZ(62px); }
@keyframes rotateCube {
    0%   { transform: rotateX(15deg) rotateY(0deg); }
    100% { transform: rotateX(15deg) rotateY(360deg); }
}

.cube.state-1 { animation-duration: 0.9s; }
.cube.state-1 .face {
    border-color: var(--a4);
    background: rgba(255,0,85,0.18);
    box-shadow: inset 0 0 35px rgba(255,0,85,0.5), 0 0 15px var(--a2);
}
.cube.state-2 { animation: rotateCube 4s cubic-bezier(0.4,0,0.2,1) infinite; }
.cube.state-2 .face { border-radius: 50%; opacity: 0.88; }
.cube.state-2 .front  { transform: rotateY(0deg)   translateZ(155px); border-color: var(--a1); box-shadow: 0 0 30px var(--a1); }
.cube.state-2 .back   { transform: rotateY(180deg) translateZ(155px); border-color: var(--a2); box-shadow: 0 0 30px var(--a2); }
.cube.state-2 .right  { transform: rotateY(90deg)  translateZ(155px); border-color: var(--a3); box-shadow: 0 0 30px var(--a3); }
.cube.state-2 .left   { transform: rotateY(-90deg) translateZ(155px); border-color: var(--a4); box-shadow: 0 0 30px var(--a4); }
.cube.state-2 .top    { transform: rotateX(90deg)  translateZ(155px); border-color: var(--a1); box-shadow: 0 0 30px var(--a1); }
.cube.state-2 .bottom { transform: rotateX(-90deg) translateZ(155px); border-color: var(--a2); box-shadow: 0 0 30px var(--a2); }
.cube.state-3 { animation-duration: 0.15s; }
.cube.state-3 .face { transform: translateZ(0) scale(0.08); background: #fff; box-shadow: 0 0 80px 40px #fff; border: none; border-radius: 50%; }

.cube-coords {
    position: absolute;
    top: 14px; left: 14px;
    font-family: var(--mono);
    font-size: 0.72rem;
    color: rgba(0,242,254,0.75);
    display: flex; flex-direction: column; gap: 2px;
    z-index: 10; pointer-events: none;
    text-shadow: 0 0 5px rgba(0,242,254,0.5);
}
.coord-val { display: inline-block; width: 52px; text-align: right; color: var(--a4); }
.cube-mode {
    position: absolute;
    bottom: 14px;
    font-family: var(--mono);
    color: var(--a1);
    font-size: 0.78rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--a1);
}
@keyframes glitchText {
    0%  { transform: translate(0); text-shadow: -2px 0 red, 2px 0 blue; }
    20% { transform: translate(-2px,2px); }
    40% { transform: translate(2px,-2px); }
    60% { transform: translate(-2px,2px); }
    80% { transform: translate(2px,-2px); }
    100%{ transform: translate(0); text-shadow: 0 0 10px var(--a1); }
}

/* ----------------------------------------
   My Links Block
---------------------------------------- */
.flex-col { display: flex; flex-direction: column; gap: 0.55rem; width: 100%; }

.dash-link {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.7rem 0.9rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-left: 2px solid transparent;
    font-family: var(--head);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}
.dash-link::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0;
    background: rgba(255,0,85,0.09);
    transition: width 0.3s ease;
    z-index: 0;
}
.dash-link:hover::before { width: 100%; }
.dash-link:hover { border-left-color: var(--a1); padding-left: 1.4rem; }
.dash-link:hover .link-arrow { color: var(--a1); transform: translate(5px,-5px); }
.dash-link > * { position: relative; z-index: 1; }
.link-num { font-family: var(--mono); font-size: 0.65rem; color: var(--muted); min-width: 18px; }
.link-title { flex: 1; }
.link-arrow { transition: 0.3s; font-size: 1rem; }

/* ----------------------------------------
   Friend Links Block
---------------------------------------- */
.grid-col-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
    align-content: start;
}
@media (max-width: 768px) { .grid-col-2 { grid-template-columns: 1fr; } }

.friend-item {
    display: flex; align-items: center;
    padding: 0.55rem;
    background: rgba(255,255,255,0.02);
    border-radius: 5px;
    position: relative; overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.friend-item:hover {
    border-color: var(--a1);
    transform: scale(1.03);
    z-index: 5;
    background: rgba(255,0,85,0.05);
}
.friend-glitch {
    position: absolute; inset: 0;
    background: repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(0,242,254,0.04) 4px, rgba(0,242,254,0.04) 8px);
    z-index: 0; transition: 0.3s;
}
.hue-1 { filter: hue-rotate(90deg); }
.hue-2 { filter: hue-rotate(180deg); }
.friend-item:hover .friend-glitch {
    background: repeating-linear-gradient(-45deg, transparent, transparent 4px, rgba(255,0,85,0.1) 4px, rgba(255,0,85,0.1) 8px);
    filter: none;
}
.f-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    margin-right: 8px;
    border: 2px solid rgba(255,255,255,0.1);
    object-fit: cover;
    transition: 0.3s;
    position: relative; z-index: 1;
    flex-shrink: 0;
}
.friend-item:hover .f-avatar { animation: avatarMorph 0.6s ease-in-out infinite; border-color: var(--a1); }
.f-info { position: relative; z-index: 1; min-width: 0; }
.f-info h3 { font-size: 0.9rem; font-weight: 700; transition: 0.3s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.friend-item:hover .f-info h3 {
    background: linear-gradient(to right, #ff0055, #00f2fe, #7000ff, #fffb00, #ff0055);
    background-size: 400% auto;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradShift 1.5s linear infinite;
}
.f-info p { font-size: 0.68rem; color: var(--muted); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.scrollable-list { flex: 1; overflow-y: auto; min-height: 0; padding-right: 3px; }
.scrollable-list::-webkit-scrollbar { width: 3px; }
.scrollable-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }
.scrollable-list::-webkit-scrollbar-thumb:hover { background: var(--a2); }

/* ----------------------------------------
   Screen Shake
---------------------------------------- */
@keyframes screenShake {
    0%,100% { transform: translate(0,0); }
    10% { transform: translate(-4px,2px); }
    20% { transform: translate(4px,-2px); }
    30% { transform: translate(-3px,4px); }
    40% { transform: translate(3px,-3px); }
    50% { transform: translate(-5px,1px); }
    60% { transform: translate(5px,2px); }
    70% { transform: translate(-2px,-4px); }
    80% { transform: translate(2px,4px); }
    90% { transform: translate(-3px,-1px); }
}
