:root {
    --primary-bg: #05050a;
    --accent-main: #6c5ce7;
    --accent-glow: #a29bfe;
    --accent-gold: #fdcb6e;
    --text-primary: #dfe6e9;
    --glass: rgba(10, 10, 15, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1500px;
}

/* Elegant Background Animation */
.bg-lines {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at center, transparent 0%, var(--primary-bg) 80%),
        linear-gradient(rgba(108, 92, 231, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108, 92, 231, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    z-index: -2;
    animation: floatingGrid 60s linear infinite;
    transform: perspective(500px) rotateX(45deg);
}

@keyframes floatingGrid {
    0% {
        transform: perspective(500px) rotateX(45deg) translateY(0);
    }

    100% {
        transform: perspective(500px) rotateX(45deg) translateY(100px);
    }
}

/* Smoother HUD Container */
.hud-container {
    position: relative;
    padding: 60px;
    border: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(15, 15, 20, 0.8), rgba(5, 5, 10, 0.9));
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
    border-radius: 4px;
}

/* Refined Corners */
.corner {
    position: absolute;
    width: 15px;
    height: 15px;
    border: 1px solid var(--accent-gold);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0.7;
}

.topleft {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.topright {
    top: -1px;
    right: -1px;
    border-left: none;
    border-bottom: none;
}

.bottomleft {
    bottom: -1px;
    left: -1px;
    border-right: none;
    border-top: none;
}

.bottomright {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}

.hud-container:hover .corner {
    width: 100%;
    height: 100%;
    opacity: 0.1;
}

/* Profile Layout */
.profile-card {
    display: flex;
    gap: 60px;
    align-items: center;
    transform-style: preserve-3d;
}

@media (max-width: 800px) {
    .profile-card {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
}

/* Sophisticated Avatar Frame */
.profile-frame {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 1px solid rgba(108, 92, 231, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateZ(30px);
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.1);
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.05), transparent);
}

.profile-frame::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 1px solid transparent;
    border-top-color: var(--accent-gold);
    border-bottom-color: var(--accent-main);
    animation: spin 10s linear infinite;
    opacity: 0.6;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.avatar-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.misfit-text {
    font-family: 'Black Ops One', cursive;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
    text-shadow: 0 0 10px var(--accent-main);
    transform: rotate(-5deg);
    opacity: 0.9;
}

.power-level {
    position: absolute;
    bottom: -30px;
    letter-spacing: 4px;
    font-size: 10px;
    color: var(--accent-gold);
    opacity: 0.7;
}

/* Info Panel */
.info-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    transform: translateZ(50px);
}

/* Subtle, Cinematic Title */
.glitch-name {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 3rem;
    line-height: 1;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    background: linear-gradient(to right, #fff, #a29bfe, #fff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* Standard property for text fill */
    -webkit-text-fill-color: transparent;
    /* Webkit specific */
    background-size: 200% auto;
    animation: shine 5s ease-in-out infinite;
}

.glitch-name::before,
.glitch-name::after {
    display: none;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.role-badge {
    color: var(--accent-gold);
    font-size: 0.9rem;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* Matured Stats Grid */
.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.stat-item {
    text-decoration: none;
    color: var(--text-primary);
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.02));
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-item:hover {
    background: rgba(108, 92, 231, 0.1);
    border-color: rgba(108, 92, 231, 0.3);
    transform: translateX(10px);
}

.label {
    font-size: 0.75rem;
    letter-spacing: 2px;
    opacity: 0.5;
    text-transform: uppercase;
}

.value {
    font-size: 0.9rem;
    font-weight: 500;
}

.bar-container {
    display: none;
}

.stat-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-main);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    transform-origin: bottom;
}

.stat-item:hover::before {
    transform: scaleY(1);
}

/* Scanline - Reduced Visibility */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.02), transparent);
    opacity: 0.3;
    animation: scan 6s linear infinite;
    pointer-events: none;
    z-index: 10;
}

@keyframes scan {
    0% {
        top: 0%;
    }

    100% {
        top: 100%;
    }
}