/* Portal Component - Stained Glass Inspired by Sagrada Família */

/* Seed Journey Entry */
.seed-journey-entry {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-image: radial-gradient(ellipse at center, #1b2735 0%, #0a0e1c 80%);
    z-index: 100;
    transition: opacity 1s ease-in-out;
}

.star-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle fill="%23fff" cx="50" cy="50" r="0.5" opacity="0.5" /></svg>');
    background-size: 100px 100px;
    opacity: 0.3;
}

.seed-container {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.8s ease;
}

/* Stained Glass Portal - Sagrada Família Inspired */
.portal-container {
    position: relative;
    width: 350px;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.8s ease;
    filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.4));
}

/* Central Sun with Nebula Effect */
.sun-source {
    position: absolute;
    width: 120px;
    height: 120px;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 182, 119, 0.7) 0%, transparent 40%), /* Soft Peach */
        radial-gradient(circle at 70% 70%, rgba(255, 204, 128, 0.7) 0%, transparent 40%), /* Light Gold */
        radial-gradient(circle at 50% 20%, rgba(255, 230, 109, 0.8) 0%, transparent 50%), /* Light Yellow */
        radial-gradient(circle at 20% 80%, rgba(255, 245, 225, 0.7) 0%, transparent 40%), /* Creamy White */
        radial-gradient(circle at 80% 30%, rgba(255, 160, 122, 0.7) 0%, transparent 40%), /* Light Salmon */
        radial-gradient(circle at 50% 50%, #ffffff 20%, #fffde4 50%, #ffc107 100%); /* Base: White/Yellow */
    border-radius: 50%;
    box-shadow: 
        0 0 40px 20px rgba(255, 255, 255, 0.8),    /* White */
        0 0 70px 40px rgba(255, 204, 128, 0.6),    /* Light Gold */
        0 0 100px 60px rgba(255, 245, 157, 0.4),  /* Pale Yellow */
        0 0 130px 80px rgba(255, 182, 119, 0.3),  /* Soft Peach */
        0 0 160px 100px rgba(255, 160, 122, 0.2); /* Light Salmon */
    animation: portal-sun-pulse 6s ease-in-out infinite alternate;
    z-index: 10;
    overflow: hidden;
}

/* Nebula stars within the sun */
.sun-source::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #ffffff, transparent),
        radial-gradient(1px 1px at 40px 70px, #ffe66d, transparent),
        radial-gradient(1.5px 1.5px at 60px 20px, #ffffff, transparent),
        radial-gradient(1px 1px at 80px 50px, #4ecdc4, transparent),
        radial-gradient(2px 2px at 30px 80px, #ff6b9d, transparent),
        radial-gradient(1px 1px at 70px 10px, #a8e6cf, transparent),
        radial-gradient(1.5px 1.5px at 90px 60px, #ffffff, transparent),
        radial-gradient(1px 1px at 10px 40px, #ff8b94, transparent);
    background-repeat: no-repeat;
    animation: twinkle 4s ease-in-out infinite;
}

@keyframes portal-sun-pulse {
    from {
        transform: scale(0.95);
        box-shadow: 
            0 0 35px 18px rgba(255, 255, 255, 0.7),
            0 0 60px 35px rgba(255, 204, 128, 0.5),
            0 0 90px 55px rgba(255, 245, 157, 0.3),
            0 0 120px 75px rgba(255, 182, 119, 0.15),
            0 0 150px 95px rgba(255, 160, 122, 0.15);
    }
    to {
        transform: scale(1.05);
        box-shadow: 
            0 0 45px 22px rgba(255, 255, 255, 0.9),
            0 0 80px 45px rgba(255, 204, 128, 0.7),
            0 0 110px 65px rgba(255, 245, 157, 0.5),
            0 0 140px 85px rgba(255, 182, 119, 0.25),
            0 0 170px 105px rgba(255, 160, 122, 0.25);
    }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Stained Glass Panels - Organic Flowing Shapes */
.glass-panels {
    position: absolute;
    width: 100%;
    height: 100%;
}

.glass-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    background: linear-gradient(45deg, 
        rgba(255, 215, 0, 0.3) 0%, 
        rgba(255, 182, 193, 0.2) 25%, 
        rgba(138, 43, 226, 0.2) 50%, 
        rgba(255, 215, 0, 0.3) 75%, 
        rgba(255, 182, 193, 0.2) 100%);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: glass-float 12s ease-in-out infinite;
}

.panel-1 {
    width: 120px;
    height: 120px;
    border-radius: 47% 53% 70% 30% / 30% 43% 57% 70%;
    transform: translate(-50%, -50%) rotate(var(--rotation));
    animation-delay: 0s;
}

.panel-2 {
    width: 140px;
    height: 140px;
    border-radius: 67% 33% 45% 55% / 50% 61% 39% 50%;
    transform: translate(-50%, -50%) rotate(var(--rotation));
    animation-delay: -2s;
}

.panel-3 {
    width: 160px;
    height: 160px;
    border-radius: 34% 66% 56% 44% / 59% 46% 54% 41%;
    transform: translate(-50%, -50%) rotate(var(--rotation));
    animation-delay: -4s;
}

.panel-4 {
    width: 180px;
    height: 180px;
    border-radius: 49% 51% 50% 50% / 65% 57% 43% 35%;
    transform: translate(-50%, -50%) rotate(var(--rotation));
    animation-delay: -6s;
}

.panel-5 {
    width: 200px;
    height: 200px;
    border-radius: 56% 44% 33% 67% / 40% 64% 36% 60%;
    transform: translate(-50%, -50%) rotate(var(--rotation));
    animation-delay: -8s;
}

.panel-6 {
    width: 220px;
    height: 220px;
    border-radius: 36% 64% 61% 39% / 66% 41% 59% 34%;
    transform: translate(-50%, -50%) rotate(var(--rotation));
    animation-delay: -10s;
}

@keyframes glass-float {
    0% { 
        transform: translate(-50%, -50%) rotate(var(--rotation)) scale(1); 
        opacity: 0.6; 
    }
    50% { 
        transform: translate(-50%, -50%) rotate(calc(var(--rotation) + 20deg)) scale(1.05); 
        opacity: 0.9; 
    }
    100% {
        transform: translate(-50%, -50%) rotate(var(--rotation)) scale(1);
        opacity: 0.6;
    }
}

/* Ethereal Mist Around Glass */
.glass-mist {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.mist-layer {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    animation: mist-drift 15s ease-in-out infinite;
}

.mist-1 {
    width: 250px;
    height: 250px;
    animation-delay: 0s;
}

.mist-2 {
    width: 220px;
    height: 220px;
    animation-delay: 5s;
}

.mist-3 {
    width: 190px;
    height: 190px;
    animation-delay: 10s;
}

@keyframes mist-drift {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1) rotate(0deg); 
        opacity: 0.2; 
    }
    33% { 
        transform: translate(-50%, -50%) scale(1.1) rotate(120deg); 
        opacity: 0.4; 
    }
    66% { 
        transform: translate(-50%, -50%) scale(0.9) rotate(240deg); 
        opacity: 0.3; 
    }
}

/* Intention Orbit */
.intention-orbit {
    position: absolute;
    width: 100%;
    height: 100%;
}

.intention-word {
    position: absolute;
    top: 50%;
    left: 50%;
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

.seed-container.active .intention-word {
    opacity: 1;
}

.intention-word:hover {
    color: #ffd700;
    text-shadow: 0 0 20px #ffd700, 0 0 30px #fff;
    transform: translate(-50%, -50%) scale(1.15);
}

.seed-prompt {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4rem;
    letter-spacing: 2px;
    text-align: center;
}

/* Active State Enhancements */
.seed-container.active .portal-container {
    transform: scale(1.25);
    filter: drop-shadow(0 0 60px rgba(255, 215, 0, 0.6));
}

.seed-container.active .sun-source {
    animation: portal-sun-pulse 3s ease-in-out infinite alternate;
    box-shadow: 
        0 0 40px 20px rgba(255, 255, 255, 0.8),
        0 0 70px 40px rgba(255, 204, 128, 0.6),
        0 0 100px 60px rgba(255, 245, 157, 0.4),
        0 0 130px 80px rgba(255, 182, 119, 0.3),
        0 0 160px 100px rgba(255, 160, 122, 0.2);
}

.seed-container.active .glass-panel {
    animation: glass-float 8s ease-in-out infinite;
}

/* Bloom Animation */
.bloom-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.petal {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 25px;
    height: 180px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffd700);
    border-radius: 50%;
    transform-origin: center bottom;
    opacity: 0;
}

.seed-container.blooming .petal {
    animation: bloom-petal 2s ease-out forwards;
}

@keyframes bloom-petal {
    0% {
        transform: translate(-50%, -100%) rotate(var(--r)) scaleY(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -100%) rotate(var(--r)) scaleY(1.3);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -100%) rotate(var(--r)) scaleY(0);
        opacity: 0;
    }
} 