/* Import Premium Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Orbitron:wght@500;700;900&family=Share+Tech+Mono&display=swap');

/* Color Variables & Styling Tokens */
:root {
    --bg-gradient: linear-gradient(135deg, #090314 0%, #030107 50%, #000000 100%);
    --card-bg: rgba(14, 11, 23, 0.65);
    --card-border: rgba(255, 255, 255, 0.04);
    --glow-color: rgba(114, 137, 218, 0.2);
    --purple-glow: rgba(155, 89, 182, 0.3);
    
    /* Skill Colors based on Reference Image */
    --color-php: #505c8a;
    --color-lua: #253366;
    --color-js: #edd21d;
    --color-css: #1f57e6;
    --color-htm: #d9421a;
    --color-c: #00599c;

    --text-primary: #ffffff;
    --text-secondary: #7f7a8c;
    --text-muted: #4e4a59;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-gradient);
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    padding: 40px 20px;
    position: relative;
}

/* Ambient Floating Background Blobs */
.background-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(74, 20, 140, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    top: -100px;
    left: -100px;
    z-index: 0;
    pointer-events: none;
    animation: floatBlob 20s infinite alternate ease-in-out;
}

.background-glow:nth-child(2) {
    background: radial-gradient(circle, rgba(123, 31, 162, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    bottom: -150px;
    right: -100px;
    top: auto;
    left: auto;
    animation: floatBlob 25s infinite alternate-reverse ease-in-out;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.1); }
}

/* Profiles Container */
.profiles-wrapper {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 35px;
    z-index: 1;
    width: 100%;
    max-width: 950px;
    flex-wrap: wrap;
}

/* Card Style (Glassmorphism) */
.profile-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    width: 380px;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8),
                0 0 40px rgba(13, 8, 24, 0.5);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
                border-color 0.4s;
    position: relative;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                                rgba(155, 89, 182, 0.08) 0%, 
                                rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
}

.profile-card:hover {
    transform: translateY(-8px);
    border-color: rgba(155, 89, 182, 0.2);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.9),
                0 0 50px rgba(155, 89, 182, 0.15);
}

.profile-card:hover::before {
    opacity: 1;
}

/* Banner Styling */
.banner-container {
    height: 140px;
    width: 100%;
    position: relative;
    background-color: #050505;
    background-size: cover;
    background-position: center;
    transition: background-image 0.5s ease;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 20%, rgba(14, 11, 23, 1) 100%);
}

/* Avatar Styling */
.avatar-section {
    position: relative;
    margin-top: -65px;
    padding-left: 28px;
    display: flex;
    align-items: flex-end;
    margin-bottom: 20px;
    z-index: 2;
}

.avatar-wrapper {
    position: relative;
    width: 105px;
    height: 105px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #1d1730 0%, #3e1b73 100%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6),
                0 0 20px var(--purple-glow);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.avatar-wrapper::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #9b59b6, #3498db);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.6;
    transition: opacity 0.4s;
}

.profile-card:hover .avatar-wrapper {
    transform: scale(1.04);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7),
                0 0 30px rgba(155, 89, 182, 0.4);
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background-color: #0b0914;
}

/* Info Section (Username, ID, Status) */
.info-section {
    padding: 0 28px;
    text-align: center;
    margin-bottom: 24px;
}

.username {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.discord-id-pill {
    display: inline-block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px 20px;
    border-radius: 20px;
    margin-bottom: 12px;
    letter-spacing: 1.5px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
    transition: border-color 0.3s, color 0.3s;
}

.discord-id-pill:hover {
    border-color: rgba(155, 89, 182, 0.4);
    color: var(--text-primary);
    cursor: pointer;
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.status-dot {
    width: 7.5px;
    height: 7.5px;
    border-radius: 50%;
    background-color: #747f8d; /* Default Offline Gray */
    transition: background-color 0.4s, box-shadow 0.4s;
}

/* Status variants */
.status-dot.online {
    background-color: #3ba55d;
    box-shadow: 0 0 10px rgba(59, 165, 93, 0.6);
}
.status-dot.idle {
    background-color: #faa81a;
    box-shadow: 0 0 10px rgba(250, 168, 26, 0.6);
}
.status-dot.dnd {
    background-color: #ed4245;
    box-shadow: 0 0 10px rgba(237, 66, 69, 0.6);
}
.status-dot.offline {
    background-color: #747f8d;
    box-shadow: none;
}

.status-text {
    text-transform: capitalize;
}

/* Server Join Badge Component */
.server-section {
    padding: 0 28px;
    margin-bottom: 22px;
}

.server-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.server-card:hover {
    background: rgba(88, 101, 242, 0.08);
    border-color: rgba(88, 101, 242, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(88, 101, 242, 0.15),
                0 0 15px rgba(88, 101, 242, 0.1);
}

.server-icon-wrapper {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #5865f2;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

.server-icon-wrapper svg {
    width: 22px;
    height: 22px;
    fill: #ffffff;
}

.server-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.server-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

.server-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Social Icon Bar */
.socials-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 26px;
}

.social-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--text-secondary);
}

.social-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: fill 0.3s;
}

.social-button:hover {
    transform: scale(1.15) translateY(-3px);
    background: rgba(155, 89, 182, 0.15);
    border-color: rgba(155, 89, 182, 0.3);
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.25);
}

/* Stats Metrics Grid Section */
.metrics-section {
    padding: 0 28px;
    margin-bottom: 24px;
}

.metrics-container {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 18px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    padding: 14px 6px;
    position: relative;
}

.metric-item {
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.metric-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background: rgba(255, 255, 255, 0.04);
}

.metric-label {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: capitalize;
    letter-spacing: 0.5px;
}

.metric-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Skills Badges Grid Section */
.skills-section {
    padding: 0 28px 32px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skills-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    font-family: 'Orbitron', sans-serif;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 320px;
}

/* Skill Badge Styles */
.skill-badge {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4),
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    text-transform: uppercase;
}

/* Color mappings matching reference */
.skill-badge.php {
    background-color: var(--color-php);
    box-shadow: 0 4px 12px rgba(80, 92, 138, 0.25), inset 0 1px 1px rgba(255,255,255,0.1);
}
.skill-badge.lua {
    background-color: var(--color-lua);
    box-shadow: 0 4px 12px rgba(37, 51, 102, 0.25), inset 0 1px 1px rgba(255,255,255,0.1);
}
.skill-badge.js {
    background-color: var(--color-js);
    color: #0c0a00;
    text-shadow: none;
    box-shadow: 0 4px 12px rgba(237, 210, 29, 0.25), inset 0 1px 1px rgba(255,255,255,0.2);
}
.skill-badge.css {
    background-color: var(--color-css);
    box-shadow: 0 4px 12px rgba(31, 87, 230, 0.25), inset 0 1px 1px rgba(255,255,255,0.1);
}
.skill-badge.htm {
    background-color: var(--color-htm);
    box-shadow: 0 4px 12px rgba(217, 66, 26, 0.25), inset 0 1px 1px rgba(255,255,255,0.15);
}
.skill-badge.c {
    background-color: var(--color-c);
    box-shadow: 0 4px 12px rgba(0, 89, 156, 0.25), inset 0 1px 1px rgba(255,255,255,0.1);
}

.skill-badge:hover {
    transform: scale(1.18) translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    border-color: rgba(255, 255, 255, 0.2);
    z-index: 5;
}

.skill-badge.php:hover { box-shadow: 0 8px 20px rgba(80, 92, 138, 0.5); }
.skill-badge.lua:hover { box-shadow: 0 8px 20px rgba(37, 51, 102, 0.5); }
.skill-badge.js:hover { box-shadow: 0 8px 20px rgba(237, 210, 29, 0.5); }
.skill-badge.css:hover { box-shadow: 0 8px 20px rgba(31, 87, 230, 0.5); }
.skill-badge.htm:hover { box-shadow: 0 8px 20px rgba(217, 66, 26, 0.5); }
.skill-badge.c:hover { box-shadow: 0 8px 20px rgba(0, 89, 156, 0.5); }

/* Responsive adjustments */
@media (max-width: 820px) {
    .profiles-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .profile-card {
        width: 100%;
        max-width: 380px;
    }
    
    .server-card.unified {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 24px 20px;
    }
    
    .server-left {
        flex-direction: column;
        gap: 12px;
    }
}

/* Unified Server Footer Component */
.server-footer-section {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 40px;
    z-index: 1;
}

.server-card.unified {
    width: 100%;
    max-width: 795px;
    background: rgba(14, 11, 23, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    padding: 16px 28px;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    transition: background 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.server-card.unified:hover {
    background: rgba(88, 101, 242, 0.06);
    border-color: rgba(88, 101, 242, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6),
                0 0 25px rgba(88, 101, 242, 0.2);
}

.server-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.server-card.unified .server-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.25);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.server-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.server-card.unified:hover .server-icon-wrapper {
    transform: scale(1.08) rotate(-5deg);
}

.server-card.unified .server-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: left;
}

@media (max-width: 820px) {
    .server-card.unified .server-info {
        text-align: center;
    }
}

.server-card.unified .server-name {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.server-card.unified .server-subtitle {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Join Button */
.join-action-btn {
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 12px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.35);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.server-card.unified:hover .join-action-btn {
    background: linear-gradient(135deg, #7289da 0%, #5865f2 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.5);
}
