:root {
    --kuromi-bg: #0f0f12;
    --kuromi-card: #1a1a1f;
    --kuromi-border: #2a2a32;
    --kuromi-pink: #ff49db;
    --kuromi-pink-glow: rgba(255, 73, 219, 0.4);
    --kuromi-lavender: #b388ff;
    --kuromi-text: #ffffff;
    --kuromi-text-muted: #a1a1aa;
    --font-main: 'Inter', sans-serif;
}

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

body {
    background-color: var(--kuromi-bg);
    color: var(--kuromi-text);
    font-family: var(--font-main);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* Background refinement */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    display: block;
}

.blob-1 { top: -10%; left: -10%; background: var(--kuromi-pink-glow); }
.blob-2 { bottom: -10%; right: -10%; background: #4c1d95; }

/* Main Container */
.libre-main, .libre-header {
    width: 100%;
    max-width: 580px;
    padding: 20px;
    z-index: 10;
}

/* Header Style con Avatar Dinámico Mejorado */
.libre-header {
    text-align: center;
    padding: 40px 20px;
    width: 100%;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    background: transparent;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 580px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.avatar-ring {
    --avatar-size: 85vw;
    --avatar-max: 280px;
    width: var(--avatar-size);
    height: var(--avatar-size);
    max-width: var(--avatar-max);
    max-height: var(--avatar-max);
    margin: 0;
    padding: 3px;
    background: linear-gradient(135deg, var(--kuromi-pink), var(--kuromi-lavender));
    border-radius: 50%;
    box-shadow: 0 0 20px var(--kuromi-pink-glow);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.user-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--kuromi-bg);
}

.user-name {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 5px 0;
    letter-spacing: -0.02em;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.user-bio {
    font-size: 0.95rem;
    color: var(--kuromi-text-muted);
    padding: 0 20px;
    max-width: 450px;
    transition: all 0.3s ease;
    text-align: center;
}

/* ESTADO COMPACTO (AL HACER SCROLL) */
.header-compact {
    padding: 10px 0;
    background: rgba(15, 15, 18, 0.96);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    min-height: 70px;
    border-bottom: 1px solid var(--kuromi-border);
}

.header-compact .user-profile {
    flex-direction: row !important;
    justify-content: flex-start !important;
    padding: 0 15px;
    gap: 12px;
}

.header-compact .avatar-ring {
    width: 45px !important;
    height: 45px !important;
    min-width: 45px !important;
    min-height: 45px !important;
    box-shadow: 0 0 10px var(--kuromi-pink-glow);
}

.header-compact .user-name {
    font-size: 1.1rem !important;
    margin: 0 !important;
}

.header-compact .user-bio {
    opacity: 0;
    pointer-events: none;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Links Cards con Efecto Glass */
.links-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 30px;
    width: 100%;
}

.libre-link-card {
    display: flex;
    align-items: center;
    padding: 18px 22px;
    background: rgba(26, 26, 31, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    text-decoration: none;
    color: var(--kuromi-text);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.libre-link-card:hover {
    transform: translateY(-2px);
    border-color: var(--kuromi-pink);
    background: rgba(255, 73, 219, 0.1);
    box-shadow: 0 8px 32px rgba(255, 73, 219, 0.2);
}

.link-icon {
    font-size: 1.4rem;
    width: 36px;
    color: var(--kuromi-pink);
    filter: drop-shadow(0 0 5px var(--kuromi-pink-glow));
}

.link-label {
    flex-grow: 1;
    font-weight: 600;
    font-size: 1.05rem;
}

.link-external {
    font-size: 0.9rem;
    color: var(--kuromi-text-muted);
}

/* Spotlight Effect Glass */
.libre-link-card.spotlight {
    background: rgba(213, 51, 179, 0.4);
    border: 1px solid rgba(255, 73, 219, 0.4);
    box-shadow: 0 8px 32px var(--kuromi-pink-glow);
}

.libre-link-card.spotlight .link-icon,
.libre-link-card.spotlight .link-label,
.libre-link-card.spotlight .link-external {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.spotlight-badge {
    background: var(--kuromi-pink);
    color: white;
}

/* Social Footer Icons */
.social-footer-icons {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 40px;
}

.social-footer-icons a {
    color: var(--kuromi-text-muted);
    font-size: 1.6rem;
    transition: color 0.3s, transform 0.3s;
}

.social-footer-icons a:hover {
    color: var(--kuromi-pink);
    transform: translateY(-3px);
}

/* Footer Style */
.libre-footer {
    padding: 40px 0;
    text-align: center;
}

.powered-by {
    font-size: 0.8rem;
    color: var(--kuromi-text-muted);
    text-decoration: none;
    padding: 8px 16px;
    background: var(--kuromi-card);
    border-radius: 30px;
    border: 1px solid var(--kuromi-border);
}

.powered-by:hover {
    color: var(--kuromi-pink);
    border-color: var(--kuromi-pink);
}

/* Footer Corregido para Tema Kuromi */
footer {
    padding: 40px 20px calc(40px + env(safe-area-inset-bottom));
    text-align: center;
    border-top: 1px solid var(--kuromi-border);
    margin-top: 40px;
    background: transparent;
}

.disclaimer {
    font-size: 0.8rem;
    color: var(--kuromi-text-muted);
    margin-top: 10px;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .top-accent {
        height: 30vh;
    }
    
    .profile-overlap {
        width: 120px;
        height: 120px;
        margin-top: -60px;
    }
    
    .text-info h1 {
        font-size: 1.75rem;
    }
}
