/* -----------------------------
   CSS Variables & Tokens 
------------------------------ */
:root {
    --bg-color: #030305;
    --text-main: #f0f0f5;
    --text-muted: #8080a8;
    
    --accent-1: #ff0055;
    --accent-2: #00f2fe;
    --accent-3: #7000ff;

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* -----------------------------
   Reset & Base Styles 
------------------------------ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow: hidden; /* Force single screen */
    height: 100vh;
    width: 100vw;
}

h1, h2, h3 { font-family: var(--font-heading); font-weight: 900; }
a { color: inherit; text-decoration: none; }

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

/* Grid Assignments */
.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; }

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

/* -----------------------------
   Glass Panels & Components
------------------------------ */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

.logo-box {
    display: flex; 
    flex-direction: column; 
    justify-content: center;
}
.logo { font-size: 4rem; line-height: 1.1; margin-bottom: 0.5rem; text-transform: uppercase; }
.subtitle { color: var(--text-muted); font-size: 1.2rem; letter-spacing: 2px; text-transform: uppercase; }

.text-gradient {
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 { font-size: 2rem; color: var(--text-main); text-transform: uppercase; margin-bottom: 0.5rem; }
.line { width: 40px; height: 4px; background: var(--accent-1); margin-bottom: 1.5rem; }
.right { align-self: flex-end; }
.my-links-box h2 { text-align: right; }

.tags { display: flex; gap: 0.5rem; margin-top: 1.5rem; flex-wrap: wrap; }
.tag { font-family: monospace; background: rgba(0, 242, 254, 0.1); color: var(--accent-2); padding: 0.2rem 0.8rem; border-radius: 12px; font-size: 0.9rem; }

/* Yotakun Profile - Insanely Flashy */
.profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1rem;
}

.yota-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--accent-2);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.5);
    animation: avatarPulse 1.5s infinite alternate;
}

@keyframes avatarPulse {
    0% { transform: scale(1) rotate(0deg); border-color: var(--accent-1); box-shadow: 0 0 10px var(--accent-1); border-radius: 50%; }
    50% { border-radius: 30%; }
    100% { transform: scale(1.15) rotate(15deg); border-color: var(--accent-2); box-shadow: 0 0 40px var(--accent-2); border-radius: 40%; }
}

.yota-name {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    text-transform: uppercase;
    background: linear-gradient(to right, #ff0055, #00f2fe, #7000ff, #fffb00, #ff0055, #00f2fe);
    background-size: 500% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbowGradient 3s linear infinite, shakeName 0.4s infinite alternate;
}

@keyframes rainbowGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

@keyframes shakeName {
    0% { transform: skewX(-15deg) translateY(0); letter-spacing: 0px; filter: drop-shadow(2px 2px 0px rgba(0,255,100,0.5)); }
    100% { transform: skewX(15deg) translateY(-3px); letter-spacing: 2px; filter: drop-shadow(-2px -2px 0px rgba(255,0,100,0.5)); }
}

/* -----------------------------
   3D & Tilt Setup 
------------------------------ */
.tilt-wrapper {
    perspective: 1500px;
    width: 100%; height: 100%;
    display: block; /* fills grid cell */
    min-height: 0;
}
.perspective-wrapper { perspective: 1500px; transform-style: preserve-3d; }
.tilt-card { width: 100%; height: 100%; min-height: 0; transform-style: preserve-3d; backface-visibility: hidden; position: relative; }
/* Inner elements pop out */
.tilt-card > * { transform: translateZ(40px); }

/* 3D Cube */
.art-box { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.geometric-art { width: 200px; height: 200px; perspective: 1000px; display: flex; align-items: center; justify-content: center; }
.cube { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; animation: rotateCube 20s infinite linear; transition: transform 0.5s; }
.face {
    position: absolute; width: 150px; height: 150px;
    top: 25px; left: 25px;
    border: 2px solid var(--accent-3);
    background: rgba(112, 0, 255, 0.1);
    box-shadow: 0 0 30px rgba(112, 0, 255, 0.3);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.front  { transform: translateZ(75px); }
.back   { transform: rotateY(180deg) translateZ(75px); }
.right  { transform: rotateY(90deg) translateZ(75px); }
.left   { transform: rotateY(-90deg) translateZ(75px); }
.top    { transform: rotateX(90deg) translateZ(75px); }
.bottom { transform: rotateX(-90deg) translateZ(75px); }
@keyframes rotateCube { 0% { transform: rotateX(0deg) rotateY(0deg); } 100% { transform: rotateX(360deg) rotateY(360deg); } }

/* --- CUBE GIMMICK STATES --- */
/* State 1: OVERDRIVE */
.cube.state-1 { animation: rotateCube 1s infinite linear; }
.cube.state-1 .face {
    border-color: #fffb00;
    box-shadow: inset 0 0 50px rgba(255, 0, 85, 0.8), 0 0 20px #00f2fe;
    background: rgba(255, 0, 85, 0.2);
}

/* State 2: EXPLODE */
.cube.state-2 { animation: rotateCube 4s infinite cubic-bezier(0.4, 0, 0.2, 1); }
.cube.state-2 .face { border-radius: 50%; opacity: 0.8; }
.cube.state-2 .front  { transform: rotateY(  0deg) translateZ(180px); border-color: #ff0055; box-shadow: 0 0 30px #ff0055; }
.cube.state-2 .back   { transform: rotateY(180deg) translateZ(180px); border-color: #00f2fe; box-shadow: 0 0 30px #00f2fe; }
.cube.state-2 .right  { transform: rotateY( 90deg) translateZ(180px); border-color: #7000ff; box-shadow: 0 0 30px #7000ff; }
.cube.state-2 .left   { transform: rotateY(-90deg) translateZ(180px); border-color: #fffb00; box-shadow: 0 0 30px #fffb00; }
.cube.state-2 .top    { transform: rotateX( 90deg) translateZ(180px); border-color: #ff0055; box-shadow: 0 0 30px #ff0055; }
.cube.state-2 .bottom { transform: rotateX(-90deg) translateZ(180px); border-color: #00f2fe; box-shadow: 0 0 30px #00f2fe; }

/* State 3: SINGULARITY */
.cube.state-3 { animation: rotateCube 0.2s infinite linear; }
.cube.state-3 .face {
    transform: rotateY(0deg) translateZ(0px) scale(0.3);
    border-radius: 0; background: #fff; box-shadow: 0 0 50px 20px #fff; border: none;
}

@keyframes glitchText {
    0% { transform: translate(0); text-shadow: -2px 0 red, 2px 0 blue; }
    20% { transform: translate(-2px, 2px); text-shadow: 2px 0 red, -2px 0 blue; }
    40% { transform: translate(-2px, -2px); text-shadow: rgb(0, 255, 0) 2px 0; }
    60% { transform: translate(2px, 2px); text-shadow: -2px 0 red, 2px 0 blue; }
    80% { transform: translate(2px, -2px); text-shadow: 2px 0 red, -2px 0 blue; }
    100% { transform: translate(0); text-shadow: 0 0 10px var(--accent-1); }
}

/* -----------------------------
   Links & Friends (Dashboard Style)
------------------------------ */
.flex-col { display: flex; flex-direction: column; gap: 1rem; width: 100%; }

.grid-col-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    align-content: start;
}

@media (max-width: 768px) {
    .grid-col-2 {
        grid-template-columns: 1fr;
    }
}

.dash-link {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.5rem; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
    font-size: 1.2rem; font-family: var(--font-heading); font-weight: 700; text-transform: uppercase;
    transition: 0.3s;
}
.dash-link:hover { background: rgba(255,0,85, 0.1); border-color: rgba(255,0,85, 0.3); padding-left: 2rem; }
.dash-link:hover .link-arrow { color: var(--accent-1); transform: translate(5px, -5px); }
.link-arrow { transition: 0.3s; }

.friend-item {
    display: flex; align-items: center; padding: 1rem;
    background: rgba(255,255,255,0.02); border-radius: 8px; position: relative; overflow: hidden;
    transition: 0.3s;
}
.friend-glitch {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(0, 242, 254, 0.05) 5px, rgba(0, 242, 254, 0.05) 10px);
    z-index: -1; transition: 0.3s;
}
.hue-1 { filter: hue-rotate(90deg); }
.hue-2 { filter: hue-rotate(180deg); }
.friend-item:hover { transform: scale(1.02); z-index: 5; }
.friend-item:hover .friend-glitch { background: repeating-linear-gradient(-45deg, transparent, transparent 5px, rgba(255, 0, 85, 0.15) 5px, rgba(255, 0, 85, 0.15) 10px); filter: hue-rotate(0deg); }
.friend-item:hover .f-info h3 {
    background: linear-gradient(to right, #ff0055, #00f2fe, #7000ff, #fffb00, #ff0055, #00f2fe);
    background-size: 500% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbowGradient 2s linear infinite, shakeName 0.2s infinite alternate;
    font-family: var(--font-heading);
    font-weight: 900;
    text-transform: uppercase;
}
.f-info h3 { font-size: 1.1rem; transition: 0.3s; }
.f-info p { font-size: 0.8rem; color: var(--text-muted); font-family: monospace; }

.f-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 15px;
    border: 2px solid rgba(255,255,255,0.1);
    object-fit: cover;
    transition: 0.3s;
}
.friend-item:hover .f-avatar {
    animation: avatarPulse 0.5s infinite alternate;
    border-color: var(--accent-1);
}

.scrollable-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    margin-right: -10px;
    min-height: 0;
}
.scrollable-list::-webkit-scrollbar { width: 4px; }
.scrollable-list::-webkit-scrollbar-track { background: transparent; }
.scrollable-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 4px; }
.scrollable-list::-webkit-scrollbar-thumb:hover { background: var(--accent-2); }

/* -----------------------------
   Background Effects 
------------------------------ */
.bg-parallax-text {
    position: fixed; top: 50%; left: 50%; width: 200%;
    transform: translate(-50%, -50%);
    font-size: 15vw; font-weight: 900; font-family: var(--font-heading);
    white-space: nowrap; color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.02);
    z-index: 0; pointer-events: none; text-align: center;
}
.cursor-glow {
    position: fixed; top: 0; left: 0; width: 600px; height: 600px;
    background: radial-gradient(circle at center, rgba(0, 242, 254, 0.15), transparent 60%);
    border-radius: 50%; transform: translate(-50%, -50%);
    pointer-events: none; z-index: 10; mix-blend-mode: color-dodge;
    transition: opacity 0.5s ease;
}
#bg-canvas { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }
