:root {
    /* Variables de tema */
    --bgDark: #050505;
    --textMain: #ffffff;
    --textMuted: #a1a1aa;
    --primary: #ffffff;
    --secondary: #18181b;
    --borderLight: rgba(255, 255, 255, 0.1);
}

/* Contenedor del fondo Silk (Canvas) */
#silkContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

#silkContainer canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Configuración Base */
body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    background-color: var(--bgDark);
    color: var(--textMain);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.bgGradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background:
        radial-gradient(circle at 50% 0%, rgba(120, 119, 198, 0.15), transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(120, 119, 198, 0.1), transparent 50%),
        #030014;
    z-index: -2;
}

.bgTexture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    opacity: 0.4;
    background-image: url("assets/background/background.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
    mix-blend-mode: lighten;
}

/* Contenedor de la Aplicación */
.appContainer {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    padding-top: 100px;
}

/* Barra de Navegación */
.navbar {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(90%, 450px);
    background: rgba(10, 10, 15, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--borderLight);
    border-radius: 50px;
    padding: 0.8rem 1.5rem;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.navContent {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap; /* Permitir apilar en móvil */
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 500;
    font-size: 1.1rem;
    color: #fff;
}

.navLinks {
    display: flex;
    gap: 1.5rem;
}

.navLinks a {
    color: var(--textMuted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
}

.navLinks a:hover,
.navLinks a.active {
    color: var(--textMain);
}

/* Sección Héroe */
.heroSection {
    width: 100%;
    min-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.heroBadge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-size: 0.9rem;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.heroBadge:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.heroTitle {
    font-size: clamp(2.5rem, 8vw, 4.5rem); /* Fluido */
    line-height: 1.1;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
    letter-spacing: -0.03em;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
}

/* Avatar del Héroe */
.heroAvatar {
    margin-top: 2rem;
    width: clamp(120px, 30vw, 180px); /* Escala en móvil */
    height: clamp(120px, 30vw, 180px);
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.heroAvatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.15);
}

.avatarGif {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Animación de Saludo */
.wave {
    display: inline-block;
    animation: wave 2.5s infinite;
    transform-origin: 70% 70%;
}

@keyframes wave {
    0% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(14deg);
    }

    20% {
        transform: rotate(-8deg);
    }

    30% {
        transform: rotate(14deg);
    }

    40% {
        transform: rotate(-4deg);
    }

    50% {
        transform: rotate(10deg);
    }

    60% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* Estilos Responsivos */
@media (max-width: 768px) {
    .heroTitle {
        padding: 0 1rem;
    }

    .navContent {
        flex-direction: column;
        justify-content: center;
    }

    .navLinks {
        width: 100%;
        justify-content: center;
        gap: 1rem;
    }

    #silkContainer {
        display: none !important; /* Salva batería y TBT en móvil */
    }

    .bgTexture {
        display: none; /* Mix-blend en móvil requiere muchos recursos */
    }

    .heroAvatar {
        box-shadow: none !important;
        border: 2px solid rgba(255, 255, 255, 0.2) !important;
    }
}

/* Secciones Generales */
.contentSection {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.sectionTitle {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(to right, #fff, #a1a1aa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* Scroll Infinito */
.scroller {
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    -webkit-mask: linear-gradient(90deg, transparent, white 10%, white 90%, transparent);
    mask: linear-gradient(90deg, transparent, white 10%, white 90%, transparent);
}

.scrollerInner {
    padding-block: 1rem;
    display: flex;
    flex-wrap: nowrap;
    gap: 2rem;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.scroller:hover .scrollerInner {
    animation-play-state: paused;
}

.scroller[data-direction="right"] .scrollerInner {
    animation-direction: reverse;
}

.scroller[data-direction="left"] .scrollerInner {
    animation-direction: normal;
}

.scroller[data-speed="fast"] .scrollerInner {
    animation-duration: 20s;
}

.scroller[data-speed="slow"] .scrollerInner {
    animation-duration: 60s;
}

@keyframes scroll {
    to {
        transform: translate(calc(-50% - 1rem));
    }
}

.scroller .card {
    width: clamp(260px, 75vw, 320px);
    flex-shrink: 0;
}

/* Tarjetas Genéricas */
.card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
    text-decoration: none;
    color: var(--textMain);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Tarjetas de Plataforma */
.cardImgIcon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.platformCard:hover .cardImgIcon {
    transform: scale(1.1);
}

.platformCard h3 {
    margin: 0.5rem 0;
    font-size: 1.5rem;
}

.platformCard p {
    color: var(--textMuted);
    font-size: 0.9rem;
    margin: 0;
}

/* Tarjetas de Proyecto */
.projectCard {
    padding: 0;
    align-items: start;
    text-align: left;
}

.projectImage {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.projectInfo {
    padding: 1.5rem;
    width: 100%;
}

.projectInfo h3 {
    margin-top: 0;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.projectInfo p {
    color: var(--textMuted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.8rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    color: #e2e8f0;
    margin-right: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Wrapper para Scroller y Flechas */
.scroller-wrapper {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.scroller {
    /* El scroller toma el espacio disponible */
    flex: 1;
    /* max-width se controla ahora en el wrapper, pero mantenemos por seguridad */
    max-width: 1000px;
}

/* Flechas de Navegación */
.navData-arrow {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--textMuted);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    flex-shrink: 0;
    /* Evitar que se aplasten */
    font-size: 1.2rem;
}

.navData-arrow:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--textMain);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.navData-arrow:active {
    transform: scale(0.95);
}

/* Ajustes responsivos para flechas */
@media (max-width: 768px) {
    .scroller-wrapper {
        padding: 0 0.5rem;
    }

    .navData-arrow {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        background: rgba(0, 0, 0, 0.3);
        /* Más contraste en móvil */
    }
}

/* Botón de Descarga Prominente */
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    color: #000;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.btn-download:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.35);
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

.btn-download:active {
    transform: translateY(-1px);
}

.btn-download i {
    font-size: 1.2rem;
}

/* Animación sutil de pulso para animar a descargar */
@keyframes pulse-white {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}


/* Discord Popup Styles */
.discord-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.discord-overlay.active {
    opacity: 1;
    visibility: visible;
}

.discord-card {
    background: rgba(30, 30, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 350px;
    text-align: center;
    position: relative;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.discord-overlay.active .discord-card {
    transform: scale(1);
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--textMuted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-popup:hover {
    color: var(--textMain);
}

.discord-header {
    margin-bottom: 1.5rem;
}

.discord-header i {
    font-size: 3rem;
    color: #5865F2;
    /* Discord Color */
    margin-bottom: 1rem;
}

.discord-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.username-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-family: 'Outfit', monospace;
    font-size: 1.2rem;
    color: var(--textMain);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.copy-btn {
    background: #5865F2;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn:hover {
    background: #4752c4;
    transform: translateY(-2px);
}

.copy-feedback {
    margin-top: 1rem;
    color: #4ade80;
    font-size: 0.9rem;
    font-weight: 500;
}

.copy-feedback.hidden {
    display: none;
}