@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
    --bg: #000000;
    --text: #f0f0f8;
    --muted: rgba(240, 240, 248, 0.4);
    --border: rgba(255, 255, 255, 0.09);
    
    /* PRISM Palette */
    --prism-1: #00e5ff;   /* cian */
    --prism-2: #00e676;   /* verde */
    --prism-3: #c6ff00;   /* lima */
    --prism-4: #ffe600;   /* amarillo */
    --prism-5: #00bfa5;   /* teal */
    
    --accent: var(--prism-1);
    --rainbow: linear-gradient(135deg, 
        var(--prism-1) 0%, 
        var(--prism-5) 25%, 
        var(--prism-2) 50%, 
        var(--prism-3) 75%, 
        var(--prism-1) 100%
    );
    
    --font-heading: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-heading);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Grid - PRISM Style */
.scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

.prism-dispersion {
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 800px;
    background: conic-gradient(
      from 250deg at 50% 0%,
      #0040ff11, #00b0ff18, #00e5ff20, #00ff8818,
      #c6ff0015, #ffe60018, #ff880015, #ff220010,
      #ff000008, transparent, transparent,
      transparent, transparent, #0040ff11
    );
    filter: blur(60px);
    opacity: 0.4;
    pointer-events: none;
}

.prism-dispersion.bottom {
    top: auto;
    bottom: -400px;
    background: conic-gradient(
      from 70deg at 50% 100%,
      #0040ff11, #00b0ff18, #00e5ff20, #00ff8818,
      #c6ff0015, #ffe60018, #ff880015, #ff220010,
      #ff000008, transparent, transparent,
      transparent, transparent, #0040ff11
    );
    opacity: 0.3;
}

.bg-icon {
    position: absolute;
    top: -5%;
    right: -10%;
    width: 800px;
    height: 800px;
    opacity: 0.4;
    transform: rotate(15deg);
    filter: blur(4px);
    pointer-events: none;
    mix-blend-mode: screen;
    animation: floatIcon 60s ease-in-out infinite;
}

@keyframes floatIcon {
    0% { transform: translate(0, 0) rotate(15deg); }
    33% { transform: translate(12px, -18px) rotate(15.5deg); }
    66% { transform: translate(-8px, 10px) rotate(14.5deg); }
    100% { transform: translate(0, 0) rotate(15deg); }
}

/* 
   --- Common Back to Lab Button ---
   Este estilo se mantiene para cuando la presentación se abre fuera del Lab, 
   usando la misma clase que el componente de React.
*/
.back-to-lab-btn {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 20001;
    background: rgba(16, 16, 16, 0.2);
    backdrop-filter: blur(4px) saturate(180%) contrast(1.1);
    -webkit-backdrop-filter: blur(4px) saturate(180%) contrast(1.1);
    border: 0.5px solid #ffffff;
    color: #ffffff;
    padding: 0.8rem 1.6rem;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    user-select: none;
    text-decoration: none;
    mix-blend-mode: difference;
}

.back-to-lab-btn span {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

.back-to-lab-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2), inset 0 1px 3px rgba(255, 255, 255, 0.1);
}

.back-to-lab-btn:hover span { opacity: 1; }
.back-to-lab-btn svg { width: 20px; height: 20px; transition: transform 0.4s ease; }
.back-to-lab-btn:hover svg { transform: translateX(-3px); }

/* Script inyectado en HTML manejará la ocultación real si está en iframe */

/* --- ESTILOS BASE (Tipo Acuario LED) --- */
.project-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
}

.project-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3rem;
    margin-bottom: 6rem;
    padding: 5rem 3rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03); /* Cristal ahumado */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.project-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    width: 25%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--prism-1), transparent);
    z-index: 2;
}

.project-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 15%;
    width: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--prism-2), transparent);
    z-index: 2;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 800px;
    z-index: 10;
}

.header-content .tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 0.3em;
    display: block;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.2rem;
}

.project-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    opacity: 0.9;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}

.header-content h1 {
    font-size: 4.8rem;
    line-height: 1;
    letter-spacing: -0.04em;
    display: inline-block;
}

.header-content h1 .snap {
    font-weight: 800;
    background: var(--rainbow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-content h1 .store {
    font-weight: 300;
    color: var(--text);
    opacity: 0.8;
}

.header-content .dot {
    background: var(--rainbow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Títulos de sección con gradiente sutil */
.info-block h2 {
    font-size: 0.9rem;
    font-family: var(--font-mono);
    color: var(--accent);
    letter-spacing: 0.2em;
    margin-bottom: 2rem;
    text-transform: uppercase;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-block h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0.3;
}

.header-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    justify-content: center;
}

.btn-action {
    background: var(--rainbow);
    color: #000;
    border: none;
    padding: 1rem 2.2rem;
    border-radius: 100px; /* Estilo píldora más moderno */
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(0, 229, 255, 0.3);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-action:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.5);
    filter: brightness(1.1);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.info-block h2 {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--muted);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-transform: uppercase;
}

.info-block h2::after {
    content: '';
    height: 1px;
    flex-grow: 1;
    background: var(--border);
}

.info-block p {
    font-size: 1rem;
    line-height: 1.8;
    opacity: 0.8;
}

.info-block ul {
    list-style: none;
}

.info-block li {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
}

.info-block li span {
    font-family: var(--font-mono);
    color: var(--accent);
    font-weight: 700;
    min-width: 120px;
}

.info-block.full-width {
    grid-column: span 2;
    margin-top: 2rem;
}

.info-block.conclusion {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 3.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.info-block.conclusion h2 { color: var(--accent); }

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step h3 {
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.step p {
    font-size: 0.9rem;
    opacity: 0.6;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.media-item {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    cursor: zoom-in;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s ease,
                background 0.4s ease;
}

.media-item:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.06);
}

.media-content {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 4px;
    background: #222;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.media-item:hover .media-content {
    transform: scale(1.02);
}

.media-caption {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--muted);
    letter-spacing: 0.1em;
}

.project-footer {
    margin-top: 8rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff88;
}

/* --- LIGHTBOX UNIVERSAL --- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-overlay.active .lightbox-content {
    transform: scale(1);
}

.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.15);
    transform: rotate(90deg) scale(1.1);
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
        font-size: 1.8rem;
    }
}
