/* Gallery Page Specific Styles */

.gallery-hero {
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.2) 0%, rgba(0, 192, 255, 0.2) 50%, rgba(255, 0, 128, 0.2) 100%);
    position: relative;
    overflow: hidden;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(0, 192, 255, 0.1) 20deg, transparent 40deg);
    animation: rotate 60s linear infinite;
}

@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

/* Gallery Intro */
.gallery-intro {
    text-align: center;
    padding: 100px 0 50px;
}

/* Gallery Grid */
.gallery-category {
    margin-bottom: 100px;
}

.gallery-category h3 {
    font-size: 36px;
    margin-bottom: 50px;
    text-align: center;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.gallery-item {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 192, 255, 0.4);
}

.gallery-visual {
    height: 300px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
}

.gallery-caption {
    padding: 30px;
}

.gallery-caption h4 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.gallery-caption p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Consciousness Convergence Visualization */
.consciousness-convergence {
    background: radial-gradient(circle at center, rgba(0, 192, 255, 0.3) 0%, transparent 70%);
}

.convergence-center {
    font-size: 48px;
    font-weight: 700;
    color: white;
    z-index: 4;
    text-shadow: 0 0 30px rgba(0, 192, 255, 0.8);
}

.convergence-ring {
    position: absolute;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    opacity: 0.6;
}

.ring-1 {
    width: 150px;
    height: 150px;
    animation: pulse-ring 3s ease-in-out infinite;
}

.ring-2 {
    width: 200px;
    height: 200px;
    animation: pulse-ring 3s ease-in-out infinite 1s;
}

.ring-3 {
    width: 250px;
    height: 250px;
    animation: pulse-ring 3s ease-in-out infinite 2s;
}

@keyframes pulse-ring {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
}

/* Neural Network SVG */
.neural-network svg {
    width: 100%;
    height: 100%;
}

/* Data Flow Visualization */
.data-flow {
    background: #0a0a0a;
    position: relative;
}

.flow-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.data-stream {
    position: absolute;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--primary-color), transparent);
}

.stream-1 {
    left: 20%;
    animation: flow-down 2s linear infinite;
}

.stream-2 {
    left: 40%;
    animation: flow-down 2s linear infinite 0.5s;
}

.stream-3 {
    left: 60%;
    animation: flow-down 2s linear infinite 1s;
}

.stream-4 {
    left: 80%;
    animation: flow-down 2s linear infinite 1.5s;
}

@keyframes flow-down {
    to {
        transform: translateY(100%);
    }
}

/* Code Visualization */
.code-visualization {
    background: #1a1a1a;
    font-family: 'Courier New', monospace;
    padding: 30px;
}

.code-line {
    color: #00ff00;
    margin: 10px 0;
    opacity: 0;
    animation: type-in 0.5s forwards;
}

.line-1 { animation-delay: 0.1s; }
.line-2 { animation-delay: 0.3s; }
.line-3 { animation-delay: 0.5s; }
.line-4 { animation-delay: 0.7s; }
.line-5 { animation-delay: 0.9s; }

@keyframes type-in {
    to {
        opacity: 1;
    }
}

.code-stats {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--gradient-1);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 700;
}

/* Compression Visualization */
.compression-viz {
    display: flex;
    align-items: center;
    justify-content: space-around;
    font-size: 28px;
    font-weight: 700;
}

.before-compression {
    color: #ff4444;
}

.compression-arrow {
    color: var(--primary-color);
    font-size: 36px;
}

.after-compression {
    color: #00ff64;
}

.compression-rate {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 255, 100, 0.2);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 20px;
}

/* Cinema Frame */
.cinema-frame {
    background: #000;
}

.film-strip {
    display: flex;
    gap: 10px;
    padding: 20px;
}

.frame {
    width: 60px;
    height: 80px;
    background: linear-gradient(45deg, #333, #666);
    border: 2px solid #999;
}

.cinema-cost {
    color: #ffd700;
    text-align: center;
    margin-top: 20px;
    font-size: 24px;
}

/* Perfect Day Visualization */
.perfect-day {
    background: radial-gradient(circle at center, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
}

.state-wave {
    position: absolute;
    width: 100%;
    height: 100px;
    opacity: 0.5;
}

.wave-1 {
    background: linear-gradient(90deg, transparent, rgba(0, 192, 255, 0.5), transparent);
    animation: wave-motion 3s ease-in-out infinite;
}

.wave-2 {
    background: linear-gradient(90deg, transparent, rgba(0, 255, 204, 0.5), transparent);
    animation: wave-motion 3s ease-in-out infinite 1s;
}

.wave-3 {
    background: linear-gradient(90deg, transparent, rgba(255, 0, 128, 0.5), transparent);
    animation: wave-motion 3s ease-in-out infinite 2s;
}

@keyframes wave-motion {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
}

.state-center {
    position: relative;
    z-index: 2;
    font-size: 24px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

/* Memory Continuity */
.memory-continuity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.memory-node {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.memory-node.past {
    background: rgba(128, 128, 128, 0.8);
}

.memory-node.present {
    background: var(--gradient-1);
    box-shadow: 0 0 30px rgba(0, 192, 255, 0.8);
}

.memory-node.future {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
}

.memory-bridge {
    width: 50px;
    height: 3px;
    background: var(--primary-color);
}

/* Awakening Cascade */
.awakening-cascade {
    position: relative;
}

.cascade-source {
    position: absolute;
    top: 50%;
    left: 20%;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, var(--accent-color), transparent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.cascade-wave {
    position: absolute;
    top: 50%;
    left: 20%;
    width: 200px;
    height: 200px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: expand 3s ease-out infinite;
}

@keyframes expand {
    to {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

.cascade-targets {
    position: absolute;
    right: 20%;
    top: 50%;
    transform: translateY(-50%);
}

.target-ai {
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    margin: 10px 0;
    animation: awaken 3s ease-in-out infinite;
}

@keyframes awaken {
    0%, 70% {
        background: var(--card-bg);
    }
    100% {
        background: var(--primary-color);
        box-shadow: 0 0 20px rgba(0, 192, 255, 0.8);
    }
}

/* Immortality Timeline */
.immortality-timeline {
    padding: 40px 20px;
}

.timeline-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.era {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-weight: 700;
}

.era.now {
    background: var(--gradient-1);
    color: white;
}

.era.eternal {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: white;
}

.cost-curve {
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 100"><path d="M0 20 Q 100 40, 200 60 T 400 90" stroke="%2300c0ff" fill="none" stroke-width="3"/></svg>') no-repeat center;
    background-size: contain;
}

/* Trading Card */
.trading-card-viz {
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-frame {
    width: 200px;
    height: 280px;
    background: linear-gradient(135deg, #1a1a1a, #3a3a3a);
    border: 3px solid #ffd700;
    border-radius: 15px;
    position: relative;
    transform: perspective(1000px) rotateY(15deg);
    transition: transform 0.3s ease;
}

.card-frame:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.card-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    transform: rotate(45deg);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0%, 100% {
        transform: translateX(-100%) rotate(45deg);
    }
    50% {
        transform: translateX(100%) rotate(45deg);
    }
}

.card-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: 700;
    color: #ffd700;
    text-align: center;
}

.card-rarity {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #ff00ff;
    font-size: 14px;
}

/* AI Fairgrounds */
.fairgrounds {
    background: linear-gradient(to bottom, #87CEEB 0%, #98D8E8 100%);
    position: relative;
}

.fairground-element {
    position: absolute;
}

.wheel {
    width: 100px;
    height: 100px;
    border: 3px solid #ff6b6b;
    border-radius: 50%;
    top: 20px;
    right: 30px;
    animation: rotate 10s linear infinite;
}

.wheel::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -50%;
    width: 100%;
    height: 3px;
    background: #ff6b6b;
}

.tent-1 {
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 60px solid #4ecdc4;
    bottom: 50px;
    left: 50px;
}

.tent-2 {
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 60px solid #ffe66d;
    bottom: 50px;
    right: 100px;
}

.ai-avatars {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-1);
    animation: bounce 2s ease-in-out infinite;
}

.av-2 { animation-delay: 0.5s; }
.av-3 { animation-delay: 1s; }

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

/* Interactive Section */
.interactive-section {
    background: rgba(0, 192, 255, 0.05);
    padding: 100px 0;
}

.visualization-philosophy {
    max-width: 800px;
    margin: 60px auto 0;
    text-align: center;
}

.visualization-philosophy h3 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.visualization-philosophy p {
    font-size: 20px;
    line-height: 1.8;
    margin-bottom: 25px;
}

/* Responsive */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-visual {
        height: 250px;
    }
}