/* NAU FEST - Línea Gráfica Oficial */
/* Paleta de colores oficial */

:root {
    /* Colores principales de la paleta NAU FEST */
    --boundless-blue: #285F74;
    --resilient-turquoise: #00A0AF;
    --gritty-green: #BBD153;
    --empowered-yellow: #E3E24F;
    --optimistic-ice: #C2EDF0;
    --immersive-blue-black: #22404D;
    
    /* Gradientes para efectos */
    --nebula-gradient: linear-gradient(135deg, 
        var(--immersive-blue-black) 0%, 
        var(--boundless-blue) 25%, 
        var(--resilient-turquoise) 50%, 
        var(--gritty-green) 75%, 
        var(--empowered-yellow) 100%);
    
    --background-gradient: linear-gradient(135deg, 
        var(--immersive-blue-black) 0%, 
        var(--boundless-blue) 50%, 
        var(--resilient-turquoise) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background-gradient);
    color: var(--optimistic-ice);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Efecto Nebulosa Animado */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--nebula-gradient);
    opacity: 0.3;
    animation: nebulaMove 20s ease-in-out infinite;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, var(--resilient-turquoise) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, var(--gritty-green) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, var(--empowered-yellow) 0%, transparent 50%);
    opacity: 0.4;
    animation: nebulaGlow 15s ease-in-out infinite reverse;
    z-index: -1;
}

@keyframes nebulaMove {
    0%, 100% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translateX(20px) translateY(-10px) rotate(1deg);
        opacity: 0.5;
    }
    50% {
        transform: translateX(-10px) translateY(20px) rotate(-1deg);
        opacity: 0.4;
    }
    75% {
        transform: translateX(15px) translateY(5px) rotate(0.5deg);
        opacity: 0.6;
    }
}

@keyframes nebulaGlow {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.4;
    }
    33% {
        transform: scale(1.1) rotate(120deg);
        opacity: 0.6;
    }
    66% {
        transform: scale(0.9) rotate(240deg);
        opacity: 0.3;
    }
}

.container {
    max-width: 1200px;
    width: 100%;
    background: rgba(34, 64, 77, 0.9);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--resilient-turquoise);
    position: relative;
    backdrop-filter: blur(10px);
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: start;
}

.container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--nebula-gradient);
    border-radius: 22px;
    z-index: -1;
    opacity: 0.3;
    animation: borderGlow 8s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

.header {
    text-align: center;
    grid-column: 1 / -1;
    position: relative;
}

.ja-logo {
    position: absolute;
    top: 0;
    right: 0;
    max-width: 120px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    transition: transform 0.3s ease;
}

.ja-logo:hover {
    transform: scale(1.1);
}

.naufy-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    position: sticky;
    top: 20px;
}

.content-area {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.logo-image {
    max-width: 300px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(0, 160, 175, 0.5));
    animation: logoGlow 3s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(0, 160, 175, 0.5)) brightness(1);
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(0, 160, 175, 0.8)) brightness(1.1);
    }
}

.subtitle {
    color: var(--gritty-green);
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(187, 209, 83, 0.3);
}

.description {
    color: var(--optimistic-ice);
    font-size: 1rem;
    line-height: 1.6;
}

.intro-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    transition: all 0.5s ease;
}

.intro-image {
    max-width: 400px;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(187, 209, 83, 0.4));
    animation: introFloat 4s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.intro-image:hover {
    transform: scale(1.05);
}

@keyframes introFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.naufy-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.naufy-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.interests-section {
    margin-bottom: 40px;
    transition: all 0.5s ease;
}

.section-title {
    font-size: 1.5rem;
    color: var(--resilient-turquoise);
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 160, 175, 0.3);
}

.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.interest-btn {
    background: linear-gradient(135deg, var(--immersive-blue-black) 0%, var(--boundless-blue) 100%);
    border: 2px solid var(--resilient-turquoise);
    color: var(--optimistic-ice);
    padding: 15px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    position: relative;
    overflow: hidden;
    text-transform: capitalize;
}

.interest-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 160, 175, 0.3), transparent);
    transition: left 0.5s ease;
}

.interest-btn:hover::before {
    left: 100%;
}

.interest-btn:hover {
    background: linear-gradient(135deg, var(--resilient-turquoise) 0%, var(--gritty-green) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 160, 175, 0.3);
    border-color: var(--gritty-green);
}

.interest-btn.selected {
    background: linear-gradient(135deg, var(--gritty-green) 0%, var(--empowered-yellow) 100%);
    border-color: var(--empowered-yellow);
    box-shadow: 0 0 20px rgba(187, 209, 83, 0.5);
    color: var(--immersive-blue-black);
    font-weight: bold;
}

.selection-info {
    text-align: center;
    color: var(--resilient-turquoise);
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-shadow: 0 0 5px rgba(0, 160, 175, 0.3);
}

.match-btn {
    background: linear-gradient(135deg, var(--resilient-turquoise) 0%, var(--gritty-green) 100%);
    border: none;
    color: var(--immersive-blue-black);
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
    min-width: 200px;
    position: relative;
    overflow: hidden;
}

.match-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.match-btn:hover::before {
    left: 100%;
}

.match-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--gritty-green) 0%, var(--empowered-yellow) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(187, 209, 83, 0.4);
}

.match-btn:disabled {
    background: var(--boundless-blue);
    cursor: not-allowed;
    opacity: 0.6;
}

.loader {
    display: none;
    text-align: center;
    margin: 40px 0;
}

.spinner {
    border: 4px solid var(--boundless-blue);
    border-top: 4px solid var(--resilient-turquoise);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    color: var(--resilient-turquoise);
    font-size: 1.1rem;
    text-shadow: 0 0 5px rgba(0, 160, 175, 0.3);
}

.results {
    display: none;
    transition: all 0.5s ease;
    opacity: 0;
    transform: translateY(20px);
}

.results.show {
    opacity: 1;
    transform: translateY(0);
}

.results-header {
    text-align: center;
    margin-bottom: 30px;
}

.results-image {
    max-width: 400px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px rgba(0, 160, 175, 0.4));
    animation: resultsCelebration 2s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.results-image:hover {
    transform: scale(1.1);
}

@keyframes resultsCelebration {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.05) rotate(2deg);
    }
    75% {
        transform: scale(1.05) rotate(-2deg);
    }
}

.results-title {
    font-size: 1.8rem;
    color: var(--gritty-green);
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(187, 209, 83, 0.3);
}

.company-card {
    background: linear-gradient(135deg, var(--immersive-blue-black) 0%, var(--boundless-blue) 100%);
    border: 2px solid var(--resilient-turquoise);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.company-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 160, 175, 0.1), transparent);
    transition: left 0.5s ease;
}

.company-card:hover::before {
    left: 100%;
}

.company-card:hover {
    border-color: var(--gritty-green);
    box-shadow: 0 5px 15px rgba(0, 160, 175, 0.3);
    transform: translateY(-2px);
}

.company-name {
    font-size: 1.3rem;
    color: var(--resilient-turquoise);
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 0 5px rgba(0, 160, 175, 0.3);
}

.match-score {
    color: var(--optimistic-ice);
    font-size: 0.9rem;
}

.reset-btn {
    background: linear-gradient(135deg, var(--boundless-blue) 0%, var(--resilient-turquoise) 100%);
    border: none;
    color: var(--optimistic-ice);
    padding: 10px 25px;
    border-radius: 20px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: linear-gradient(135deg, var(--resilient-turquoise) 0%, var(--gritty-green) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 160, 175, 0.3);
}

.error-message {
    color: #ff6b6b;
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 10px;
    border: 1px solid #ff6b6b;
}

/* Efectos de partículas flotantes */
.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--resilient-turquoise);
    border-radius: 50%;
    animation: float 20s infinite linear;
    opacity: 0.6;
}

.particle:nth-child(2n) {
    background: var(--gritty-green);
    animation-duration: 25s;
}

.particle:nth-child(3n) {
    background: var(--empowered-yellow);
    animation-duration: 30s;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .naufy-sidebar {
        order: 2;
        min-height: 200px;
        position: static;
    }
    
    .content-area {
        order: 1;
    }
    
    .ja-logo {
        max-width: 60px;
    }
    
    .logo-image {
        max-width: 250px;
    }
    
    .intro-image {
        max-width: 150px;
    }
    
    .results-image {
        max-width: 120px;
    }
    
    .interests-grid {
        grid-template-columns: 1fr;
    }
    
    .particle {
        width: 2px;
        height: 2px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    .ja-logo {
        max-width: 50px;
    }
    
    .logo-image {
        max-width: 200px;
    }
    
    .intro-image {
        max-width: 120px;
    }
    
    .results-image {
        max-width: 100px;
    }
}
