@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

:root {
    --android-green: #3DDC84;
    --ux-blue: #4285F4;
    --glass-bg: rgba(20, 20, 22, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --transition-speed: 0.8s;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: #000;
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Capa de Intro Video */
#intro-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease-in-out, visibility 1s;
}

#intro-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top; /* ALINEACIÓN SUPERIOR */
    transform: scale(1.12);
    transform-origin: top; /* ALINEACIÓN SUPERIOR */
}

/* Contenedor Principal */
#app {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Contenedor Maestro de Escalado: La clave para la alineación perfecta */
.media-master {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: scale(1.12); /* UN SOLO ESCALADO PARA TODO EL CONTENIDO */
    transform-origin: top; /* ALINEACIÓN SUPERIOR PARA OCULTAR MARCAS DE AGUA */
    overflow: hidden;
    z-index: 1;
}

/* Estilo unificado para imágenes y vídeos */
.scene-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: top center; /* ALINEACIÓN SUPERIOR */
    background-repeat: no-repeat;
    transition: background-image var(--transition-speed) ease-in-out, opacity 0.5s ease;
    /* Ya no escalamos aquí individualmente */
}

/* Video de transición */
#scene-video {
    z-index: 5;
    object-fit: cover;
    object-position: top; /* ALINEACIÓN SUPERIOR */
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Capa de Hotspots */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.hotspot {
    position: absolute;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, var(--ux-blue) 0%, transparent 70%);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    animation: fadeInSpot 0.8s ease-out forwards;
}

@keyframes fadeInSpot {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.hotspot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--ux-blue);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hotspot:hover {
    transform: scale(1.3);
}

.hotspot-label {
    position: absolute;
    top: -50px;
    white-space: nowrap;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(0,0,0,0.8);
    padding: 8px 14px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
    pointer-events: none;
}

.hotspot:hover .hotspot-label {
    opacity: 1;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* Paneles de Información (CV) */
.panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 600px;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 45px;
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.8);
}

.panel.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.panel h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 24px;
    background: linear-gradient(90deg, var(--android-green), var(--ux-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.panel p {
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 18px;
    font-size: 1.05rem;
}

.close-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(255,255,255,0.1);
    width: 35px;
    height: 35px;
    border: none;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s;
}

.close-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Botones Persistentes */
.back-btn, .external-web-btn, .download-btn {
    position: fixed;
    padding: 14px 28px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: white;
    cursor: pointer;
    font-weight: 800;
    z-index: 50;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-decoration: none;
    display: block;
}

.back-btn { top: 40px; left: 40px; border-color: var(--ux-blue); display: none; }
.download-btn { bottom: 40px; left: 40px; border-color: #f44336; }
.external-web-btn { bottom: 40px; right: 40px; border-color: var(--android-green); }

.back-btn:hover, .external-web-btn:hover, .download-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.download-btn:hover { border-color: #ff5252; }

/* Habilidades */
.skill-bar {
    width: 100%;
    height: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--android-green), var(--ux-blue));
    border-radius: 5px;
    transition: width 1.5s cubic-bezier(0.19, 1, 0.22, 1);
}
