/* monopole.boo - Vaporwave Phantom Physics */
/* Colors: #E0F0E0, #1A0C1A, #C0A0C0, #0C1A0F, #A040A0, #F0E0F0, #40A060, #A0C0A0 */
/* Fonts: Josefin Sans, Poppins, Fira Mono */

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #1A0C1A;
    font-family: 'Poppins', sans-serif;
}

/* Opening Overlay */
#opening-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0C1A0F;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1s ease;
}

#opening-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

#split-line {
    width: 2px;
    height: 0;
    background: linear-gradient(to bottom, #40A060, #A040A0);
    transition: height 1.5s ease;
    box-shadow: 0 0 20px rgba(64, 160, 96, 0.5), 0 0 20px rgba(160, 64, 160, 0.5);
}

#split-line.drawn {
    height: 100%;
}

/* Split Container */
#split-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    height: 100%;
    position: relative;
    opacity: 0;
    transition: opacity 1s ease 0.5s;
}

#split-container.visible {
    opacity: 1;
}

/* Sides */
.side {
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    scrollbar-width: thin;
}

.left-side {
    background: linear-gradient(180deg, #0C1A0F 0%, #1A0C1A 50%, #0C1A0F 100%);
    border-right: 1px solid rgba(64, 160, 96, 0.15);
    scrollbar-color: #40A060 #0C1A0F;
}

.right-side {
    background: linear-gradient(180deg, #1A0C1A 0%, #0C1A0F 50%, #1A0C1A 100%);
    border-left: 1px solid rgba(160, 64, 160, 0.15);
    scrollbar-color: #A040A0 #1A0C1A;
}

.side-inner {
    padding: 4rem 3rem;
    min-height: 100%;
}

/* Sections */
.side-section {
    margin-bottom: 6rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.side-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-section {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.last-section {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Typography */
.side-title {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    letter-spacing: 0.03em;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.left-side .side-title {
    color: #E0F0E0;
}

.right-side .side-title {
    color: #F0E0F0;
}

.side-subtitle {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.left-side .side-subtitle {
    color: #A0C0A0;
}

.right-side .side-subtitle {
    color: #C0A0C0;
}

.side-body {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 0.95rem;
    line-height: 1.8;
    max-width: 480px;
}

.left-side .side-body {
    color: #A0C0A0;
}

.right-side .side-body {
    color: #C0A0C0;
}

/* Equation Fragments */
.equation-fragment {
    font-family: 'Fira Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    margin-top: 1.5rem;
    padding: 0.5rem 1rem;
    border-left: 2px solid;
    opacity: 0.6;
}

.left-side .equation-fragment {
    color: #40A060;
    border-color: #40A060;
}

.right-side .equation-fragment {
    color: #A040A0;
    border-color: #A040A0;
}

/* Oscilloscope Reading */
.oscilloscope-reading {
    margin-top: 2rem;
    height: 60px;
    border: 1px solid rgba(160, 64, 160, 0.3);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    background: rgba(26, 12, 26, 0.5);
}

.trace {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(160, 64, 160, 0.3);
}

.blip {
    position: absolute;
    top: 50%;
    left: 45%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #A040A0;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px #A040A0, 0 0 20px rgba(160, 64, 160, 0.5);
    animation: blipPulse 3s ease-in-out infinite;
}

@keyframes blipPulse {
    0%, 100% { opacity: 0.2; transform: translate(-50%, -50%) scale(0.5); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

/* Fern Decoration */
.fern-decoration {
    width: 40px;
    height: 60px;
    margin-top: 2rem;
    position: relative;
    opacity: 0.3;
}

.fern-decoration::before,
.fern-decoration::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.left-side .fern-decoration::before {
    width: 20px;
    height: 40px;
    border: 1px solid #40A060;
    left: 0;
    top: 0;
    transform: rotate(-15deg);
}

.left-side .fern-decoration::after {
    width: 15px;
    height: 30px;
    border: 1px solid #A0C0A0;
    right: 0;
    bottom: 0;
    transform: rotate(15deg);
}

.right-side .fern-decoration::before {
    width: 20px;
    height: 40px;
    border: 1px solid #A040A0;
    left: 0;
    top: 0;
    transform: rotate(-15deg);
}

.right-side .fern-decoration::after {
    width: 15px;
    height: 30px;
    border: 1px solid #C0A0C0;
    right: 0;
    bottom: 0;
    transform: rotate(15deg);
}

/* Bridge Zone */
#bridge-zone {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 1.5s ease;
}

#bridge-zone.active {
    opacity: 1;
}

#bridge-content {
    text-align: center;
    padding: 2rem;
    background: radial-gradient(ellipse at center, rgba(26, 12, 26, 0.95) 0%, transparent 80%);
}

.bridge-text {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #C0A0C0;
    max-width: 240px;
    margin: 0 auto;
}

.bridge-glyph {
    font-size: 2rem;
    margin-top: 1.5rem;
    color: #A040A0;
    text-shadow: 0 0 20px rgba(160, 64, 160, 0.6);
    animation: glyphFloat 4s ease-in-out infinite;
}

@keyframes glyphFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Ghost Particles */
#ghost-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.ghost-particle {
    position: absolute;
    border-radius: 50%;
    border: 2px dashed;
    filter: blur(2px);
    opacity: 0;
    animation: ghostFade 8s ease-in-out infinite;
}

.ghost-particle.left-ghost {
    border-color: #40A060;
}

.ghost-particle.right-ghost {
    border-color: #A040A0;
}

@keyframes ghostFade {
    0%, 100% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 0.15; transform: scale(1); }
}

/* Gradient divider between halves */
.side::after {
    content: '';
    position: fixed;
    top: 0;
    width: 40px;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.left-side::after {
    right: 0;
    background: linear-gradient(to right, transparent, rgba(26, 12, 26, 0.5));
}

.right-side::after {
    left: 0;
    background: linear-gradient(to left, transparent, rgba(26, 12, 26, 0.5));
}

/* Responsive */
@media (max-width: 768px) {
    #split-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        overflow-y: auto;
    }

    .side {
        height: auto;
        overflow-y: visible;
    }

    .side-inner {
        padding: 2rem 1.5rem;
    }

    .side::after {
        display: none;
    }

    #bridge-zone {
        display: none;
    }
}
