/* Posterboard-specific styles */
.posterboard-section {
    padding: 2rem 0 4rem 0;
    background: var(--bg-secondary);
    min-height: 100vh;
    overflow-x: hidden;
}

.posterboard-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--accent-primary), #9f7aea);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.posterboard-metadata {
    text-align: center;
    margin-bottom: 2rem;
}

.posterboard-author {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.posterboard-date {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-style: italic;
}

.posterboard-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.4;
}



/* Connection line colors */
.connection.informative {
    stroke: #3182ce;
}

.connection.narrative {
    stroke: #38a169;
}

.connection.emotional {
    stroke: #e53e3e;
}

.connection.connotative {
    stroke: #9f7aea;
}

.connection.thematic {
    stroke: #d69e2e;
}

.connection.contrast {
    stroke: #4a5568;
}

/* Posterboard Container */
.posterboard {
    position: relative;
    background: linear-gradient(45deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
    background-size: 400% 400%;
    animation: slowBackgroundShift 20s ease-in-out infinite;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg), 0 0 30px rgba(159, 122, 234, 0.1);
    min-height: 1000px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    border: 3px solid var(--border-color);
    overflow: hidden;
    position: relative;
}

.posterboard::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7, #dda0dd);
    background-size: 600% 600%;
    border-radius: 1rem;
    z-index: -1;
    animation: rainbowBorder 8s ease-in-out infinite;
    opacity: 0.3;
}

@keyframes slowBackgroundShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes rainbowBorder {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* SVG for connections */
.connection-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;

}

.connection-line {
    stroke-width: 2.5;
    opacity: 0.8;
    transition: opacity 0.3s ease, stroke-width 0.3s ease;
    fill: none;
    stroke-dasharray: 0;
    animation: connectionPulse 4s ease-in-out infinite;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.3));
}

@keyframes connectionPulse {
    0%, 100% { opacity: 0.6; stroke-width: 2.5; }
    50% { opacity: 1; stroke-width: 3; }
}

.connection-line.highlighted {
    opacity: 1;
    stroke-width: 4;
}

/* Nodes */
.node {
    position: absolute;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    max-width: 280px;
    min-width: 220px;
    box-shadow: var(--shadow), 0 0 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
    transform: translate(-50%, -50%);
    animation: subtleFloat 6s ease-in-out infinite;
    animation-delay: var(--float-delay, 0s);
    will-change: transform;
}

.node:nth-child(odd) {
    --float-delay: 0s;
}

.node:nth-child(even) {
    --float-delay: 3s;
}

@keyframes subtleFloat {
    0%, 100% { transform: translate(-50%, -50%) translateY(0px) rotate(0deg); }
    25% { transform: translate(-50%, -50%) translateY(-3px) rotate(0.5deg); }
    50% { transform: translate(-50%, -50%) translateY(0px) rotate(0deg); }
    75% { transform: translate(-50%, -50%) translateY(3px) rotate(-0.5deg); }
}

.node:hover {
    transform: translate(-50%, -50%) scale(1.08) rotate(1deg);
    box-shadow: var(--shadow-lg), 0 0 25px rgba(159, 122, 234, 0.4);
    border-color: var(--accent-primary);
    animation-play-state: paused;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.node.highlighted {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(49, 130, 206, 0.3);
}

.node-content h4 {
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(159, 122, 234, 0.2);
    transition: all 0.3s ease;
}

.node:hover .node-content h4 {
    transform: scale(1.05);
    color: var(--text-primary);
    text-shadow: 0 0 15px rgba(159, 122, 234, 0.5);
}

.node-content p {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.node-content small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Fake social media post styling */
.fake-post {
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin: 0.5rem 0;
    border: 1px solid var(--border-color);
}

.post-header {
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.post-content {
    color: var(--text-primary);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.post-stats {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* Node positioning for different screen sizes */
@media (max-width: 768px) {
    .posterboard-section {
        overflow-x: auto;
    }
    
    .posterboard {
        margin: 0;
        border-radius: 0.5rem;
        min-height: 1600px;
        min-width: 800px;
        max-width: 800px;
    }
    
    .node {
        max-width: 180px;
        min-width: 150px;
        padding: 0.6rem;
    }
    
    .node-content h4 {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
    
    .node-content p {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    .node-content small {
        font-size: 0.7rem;
    }
    
    .posterboard-title {
        font-size: 1.8rem;
    }
    
    .posterboard-author {
        font-size: 1rem;
    }
    
    .posterboard-date {
        font-size: 0.85rem;
    }
    
    .posterboard-subtitle {
        font-size: 0.85rem;
        padding: 0 1rem;
    }
    
    .particle {
        width: 3px !important;
        height: 3px !important;
    }
    
    .folklore-illustration, .the-lighthouse-image {
        max-height: 120px !important;
    }
}

@media (max-width: 480px) {
    .posterboard {
        min-width: 600px;
        max-width: 600px;
        min-height: 950px;
    }
    
    .node {
        max-width: 160px;
        min-width: 130px;
        padding: 0.5rem;
    }
    
    .node-content h4 {
        font-size: 0.85rem;
    }
    
    .node-content p {
        font-size: 0.75rem;
    }
    
    .posterboard-title {
        font-size: 1.6rem;
    }
    
    .folklore-illustration, .the-lighthouse-image {
        max-height: 100px !important;
    }
}

@media (max-width: 480px) {
    .node {
        max-width: 140px;
        min-width: 120px;
        padding: 0.5rem;
    }
    
    .node-content h4 {
        font-size: 0.85rem;
    }
    
    .node-content p {
        font-size: 0.75rem;
    }
    
    .node-content small {
        font-size: 0.7rem;
    }
}

/* Animation for connections appearing */
@keyframes connectionAppear {
    from {
        stroke-dasharray: 5, 5;
        stroke-dashoffset: 10;
        opacity: 0;
    }
    to {
        stroke-dasharray: none;
        stroke-dashoffset: 0;
        opacity: 0.7;
    }
}

.connection-line.animate {
    animation: connectionAppear 1s ease-out forwards;
}

/* Hover effects for interactive elements */
.node:hover .node-content h4 {
    color: var(--text-primary);
    transform: scale(1.05);
}

/* Floating particles */
.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0.6;
    animation: floatUp 15s linear infinite;
}

.particle:nth-child(2n) {
    background: #9f7aea;
    animation-duration: 20s;
    width: 6px;
    height: 6px;
}

.particle:nth-child(3n) {
    background: #38a169;
    animation-duration: 18s;
    width: 3px;
    height: 3px;
}

.particle:nth-child(4n) {
    background: #e53e3e;
    animation-duration: 22s;
    width: 5px;
    height: 5px;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Glitch effect for title */
.posterboard-title {
    position: relative;
}

.posterboard-title::before,
.posterboard-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.posterboard-title::before {
    animation: glitch1 2s infinite;
    color: #ff0040;
    z-index: -1;
}

.posterboard-title::after {
    animation: glitch2 2s infinite;
    color: #00ff80;
    z-index: -2;
}

@keyframes glitch1 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitch2 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(2px, -2px); }
    40% { transform: translate(2px, 2px); }
    60% { transform: translate(-2px, -2px); }
    80% { transform: translate(-2px, 2px); }
}

/* Strange cursor trail effect */
.mouse-trail {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    animation: trailFade 0.8s ease-out forwards;
}

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

/* Weird text effects for nodes */
.node-content p {
    transition: all 0.3s ease;
}

.node:hover .node-content p {
    letter-spacing: 0.5px;
    text-shadow: 0 0 8px rgba(159, 122, 234, 0.3);
}

/* Occasional color shift for connections */
.connection-line.color-shift {
    animation: colorCycle 3s ease-in-out infinite;
}

@keyframes colorCycle {
    0%, 100% { filter: hue-rotate(0deg) saturate(1); }
    25% { filter: hue-rotate(90deg) saturate(1.2); }
    50% { filter: hue-rotate(180deg) saturate(0.8); }
    75% { filter: hue-rotate(270deg) saturate(1.1); }
}

/* SVG container gets a subtle background pattern */
.connection-svg {
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(159, 122, 234, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(49, 130, 206, 0.03) 0%, transparent 50%);
}

/* Bilibin illustration styling */
.bilibin-image {
    text-align: center;
    margin-bottom: 0.5rem;
}

.folklore-illustration {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* The Lighthouse image styling */
.the-lighthouse-image {
    text-align: center;
    margin-bottom: 0.5rem;
}



  
   


.folklore-illustration:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    filter: sepia(5%) contrast(1.15) brightness(1);
}

/* The Lighthouse image styling */
.the-lighthouse-image {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    border-radius: 0.5rem;
   
    transition: all 0.3s ease;

}

.the-lighthouse-image:hover {
    transform: scale(1.02);

}

/* Keyword highlighting */
.keyword-highlight {
    background: linear-gradient(120deg, rgba(159, 122, 234, 0.3) 0%, rgba(49, 130, 206, 0.3) 100%);
    color: var(--text-primary);
    padding: 0.1rem 0.2rem;
    border-radius: 0.2rem;
    font-weight: 600;
    animation: keywordPulse 1.5s ease-in-out infinite;
    text-shadow: 0 0 8px rgba(159, 122, 234, 0.4);
}

@keyframes keywordPulse {
    0%, 100% { 
        background: linear-gradient(120deg, rgba(159, 122, 234, 0.3) 0%, rgba(49, 130, 206, 0.3) 100%);
        transform: scale(1);
    }
    50% { 
        background: linear-gradient(120deg, rgba(159, 122, 234, 0.5) 0%, rgba(49, 130, 206, 0.5) 100%);
        transform: scale(1.02);
    }
}

 