/* lore.css - XHELOS Lore Blocks Design System */
/* All styles scoped under .lore-container to prevent conflicts */

/* ========================================
   BASE LORE STYLES
   ======================================== */
.lore-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.lore-container .page-title {
    text-align: center;
    color: #4ade80;
    font-size: 2.5rem;
    margin: 40px 0;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
    letter-spacing: 0.1em;
}

.lore-container .section-title {
    color: #60a5fa;
    font-size: 1.5rem;
    margin: 30px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(96, 165, 250, 0.3);
}

/* ========================================
   MISSION LOG BLOCK
   ======================================== */
.lore-container .mission-log {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    border: 2px solid #3b82f6;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.lore-container .mission-log::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3b82f6, transparent);
    animation: loreScanLine 3s infinite;
}

@keyframes loreScanLine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.lore-container .log-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
}

.lore-container .log-id {
    color: #60a5fa;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}

.lore-container .log-date {
    color: #94a3b8;
    font-size: 0.9rem;
}

.lore-container .log-content {
    color: #e2e8f0;
    line-height: 1.6;
    margin: 15px 0;
}

.lore-container .log-status {
    color: #ef4444;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-align: right;
    animation: lorePulse 2s infinite;
}

@keyframes lorePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ========================================
   CHARACTER DOSSIER
   ======================================== */
.lore-container .character-dossier {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
    border: 2px solid #4ade80;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.lore-container .character-dossier::after {
    content: 'CLASSIFIED';
    position: absolute;
    top: 10px;
    right: -30px;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
}

.lore-container .dossier-portrait {
    width: 120px;
    height: 120px;
    border: 3px solid #4ade80;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(74, 222, 128, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
}

.lore-container .dossier-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lore-container .dossier-info h3 {
    color: #4ade80;
    margin: 0 0 5px 0;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

.lore-container .dossier-rank {
    color: #60a5fa;
    font-size: 0.9rem;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
}

.lore-container .dossier-bio {
    color: #cbd5e1;
    line-height: 1.5;
    margin: 10px 0;
}

.lore-container .dossier-status {
    color: #ef4444;
    font-weight: bold;
    margin-top: 10px;
    padding: 5px 10px;
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid #ef4444;
    display: inline-block;
}

.lore-container .dossier-status.active {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    border-left-color: #4ade80;
}

/* ========================================
   INTERCEPTED TRANSMISSION
   ======================================== */
.lore-container .intercepted-transmission {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(30, 41, 59, 0.9));
    border: 2px solid #a78bfa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.lore-container .transmission-static {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(167, 139, 250, 0.03) 2px,
        rgba(167, 139, 250, 0.03) 4px
    );
    pointer-events: none;
    animation: loreStatic 0.5s infinite;
}

@keyframes loreStatic {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.05; }
}

.lore-container .transmission-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    color: #a78bfa;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

.lore-container .signal-strength {
    color: #4ade80;
    font-size: 1rem;
}

.lore-container .transmission-content {
    font-style: italic;
    color: #e2e8f0;
    margin: 20px 0;
    padding-left: 20px;
    border-left: 3px solid #a78bfa;
    position: relative;
    z-index: 1;
}

.lore-container .transmission-content cite {
    display: block;
    margin-top: 10px;
    color: #94a3b8;
    font-size: 0.9rem;
    font-style: normal;
}

/* ========================================
   HISTORICAL ARCHIVE
   ======================================== */
.lore-container .historical-archive {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(51, 65, 85, 0.95));
    border: 2px solid #fbbf24;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
}

.lore-container .archive-seal {
    position: absolute;
    top: -10px;
    left: 20px;
    background: #0a0e27;
    padding: 5px 15px;
    color: #fbbf24;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    border: 2px solid #fbbf24;
    border-radius: 5px;
}

.lore-container .historical-archive h3 {
    color: #fbbf24;
    margin: 15px 0 10px 0;
    font-size: 1.3rem;
}

.lore-container .archive-entry {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
}

.lore-container .entry-date {
    color: #60a5fa;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 10px;
}

/* ========================================
   TECHNICAL READOUT
   ======================================== */
.lore-container .technical-readout {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
    border: 2px solid #60a5fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
}

.lore-container .readout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(96, 165, 250, 0.3);
}

.lore-container .readout-header h3 {
    color: #60a5fa;
    margin: 0;
}

.lore-container .classification {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 3px 10px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    border-radius: 3px;
}

.lore-container .specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.lore-container .spec {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.lore-container .spec-label {
    color: #94a3b8;
    font-size: 0.9rem;
}

.lore-container .spec-value {
    color: #4ade80;
    font-weight: bold;
}

/* ========================================
   FRAGMENT WARNING
   ======================================== */
.lore-container .fragment-warning {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(0, 0, 0, 0.9));
    border: 2px solid #ef4444;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 20px;
    animation: loreWarningPulse 3s infinite;
}

@keyframes loreWarningPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.2); }
    50% { box-shadow: 0 0 40px rgba(239, 68, 68, 0.4); }
}

.lore-container .warning-icon {
    font-size: 3rem;
    color: #ef4444;
}


.lore-container .warning-content h3 {
    color: #ef4444;
    margin: 0 0 10px 0;
}

.lore-container .warning-content p {
    color: #cbd5e1;
    margin: 0;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .lore-container .character-dossier {
        flex-direction: column;
        text-align: center;
    }
    
    .lore-container .dossier-portrait {
        margin: 0 auto;
    }
    
    .lore-container .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .lore-container .fragment-warning {
        flex-direction: column;
        text-align: center;
    }
}


/* memory-timeline.css - Scoped Memory Fragment Styles */

/* ========================================
   MEMORY TIMELINE STYLES
   All styles scoped under .memory-timeline-section
   ======================================== */

.memory-timeline-section {
    background: #0a0e27;
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
    background-image: 
        radial-gradient(ellipse at 20% 30%, rgba(34, 197, 94, 0.1) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 70%, rgba(96, 165, 250, 0.1) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
    min-height: 100vh;
    position: relative;
}

/* Floating consciousness particles background */
.memory-timeline-section .consciousness-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    top: 0;
    left: 0;
}

.memory-timeline-section .bg-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(34, 197, 94, 0.6);
    border-radius: 50%;
    animation: bgFloat 20s infinite linear;
}

.memory-timeline-section .bg-particle:nth-child(odd) {
    background: rgba(96, 165, 250, 0.6);
    animation-duration: 25s;
}

@keyframes bgFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

.memory-timeline-section .memory-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 10;
}

/* Header */
.memory-timeline-section .memory-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.memory-timeline-section .memory-title {
    font-size: 3rem;
    background: linear-gradient(135deg, #22c55e, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    animation: memoryTitlePulse 4s infinite;
}

@keyframes memoryTitlePulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.memory-timeline-section .memory-subtitle {
    color: #94a3b8;
    font-size: 1.2rem;
    font-style: italic;
}

/* Memory Timeline */
.memory-timeline-section .memory-timeline {
    position: relative;
    padding: 20px 0;
}

.memory-timeline-section .timeline-spine {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, 
        rgba(34, 197, 94, 0.3) 0%, 
        rgba(96, 165, 250, 0.3) 50%, 
        rgba(239, 68, 68, 0.3) 100%);
    transform: translateX(-50%);
    z-index: 1;
}

/* Memory Fragments */
.memory-timeline-section .memory-fragment {
    background: linear-gradient(135deg, 
        rgba(34, 197, 94, 0.08) 0%, 
        rgba(96, 165, 250, 0.08) 100%);
    border: 2px solid transparent;
    border-radius: 30px 10px 30px 10px;
    padding: 30px;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInMemory 1s forwards, memoryPulse 6s infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.memory-timeline-section .memory-fragment:nth-child(odd) {
    margin-left: auto;
    margin-right: 10%;
    border-radius: 10px 30px 10px 30px;
    background: linear-gradient(135deg, 
        rgba(96, 165, 250, 0.08) 0%, 
        rgba(34, 197, 94, 0.08) 100%);
}

.memory-timeline-section .memory-fragment:nth-child(even) {
    margin-left: 10%;
    margin-right: auto;
}

.memory-timeline-section .memory-fragment.critical {
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.1) 0%, 
        rgba(245, 158, 11, 0.1) 100%);
    border-color: rgba(239, 68, 68, 0.3);
}

.memory-timeline-section .memory-fragment:hover {
    transform: scale(1.02);
    box-shadow: 0 0 50px rgba(34, 197, 94, 0.3);
}

@keyframes fadeInMemory {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes memoryPulse {
    0%, 100% { 
        border-color: rgba(34, 197, 94, 0.2);
        box-shadow: 0 0 30px rgba(34, 197, 94, 0.1);
    }
    50% { 
        border-color: rgba(96, 165, 250, 0.2);
        box-shadow: 0 0 30px rgba(96, 165, 250, 0.1);
    }
}

/* Memory particles effect */
.memory-timeline-section .memory-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
}

.memory-timeline-section .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #22c55e;
    border-radius: 50%;
    animation: floatParticle 10s infinite;
}

.memory-timeline-section .particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.memory-timeline-section .particle:nth-child(2) { left: 30%; animation-delay: 2s; background: #60a5fa; }
.memory-timeline-section .particle:nth-child(3) { left: 50%; animation-delay: 4s; }
.memory-timeline-section .particle:nth-child(4) { left: 70%; animation-delay: 6s; background: #60a5fa; }
.memory-timeline-section .particle:nth-child(5) { left: 90%; animation-delay: 8s; }

@keyframes floatParticle {
    0%, 100% { 
        transform: translateY(100px) scale(0); 
        opacity: 0; 
    }
    20% { 
        transform: translateY(0) scale(1); 
        opacity: 1; 
    }
    80% { 
        transform: translateY(-100px) scale(1); 
        opacity: 1; 
    }
}

/* Memory content */
.memory-timeline-section .fragment-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.memory-timeline-section .fragment-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.4), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    animation: iconRotate 10s infinite linear;
}

@keyframes iconRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.memory-timeline-section .fragment-icon.human {
    background: radial-gradient(circle, rgba(96, 165, 250, 0.4), transparent);
}

.memory-timeline-section .fragment-icon.critical {
    background: radial-gradient(circle, rgba(239, 68, 68, 0.4), transparent);
    animation: iconPulse 2s infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.memory-timeline-section .fragment-meta {
    flex: 1;
}

.memory-timeline-section .fragment-id {
    color: #22c55e;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    font-family: 'Courier New', monospace;
}

.memory-timeline-section .fragment-source {
    color: #60a5fa;
    font-size: 1.3rem;
    font-weight: bold;
    margin: 5px 0;
}

.memory-timeline-section .fragment-timestamp {
    color: #94a3b8;
    font-size: 0.85rem;
    font-style: italic;
}

.memory-timeline-section .fragment-content {
    color: #e0f2fe;
    line-height: 1.8;
    font-size: 1.05rem;
    position: relative;
    padding-left: 25px;
    border-left: 3px solid rgba(34, 197, 94, 0.2);
    margin-top: 20px;
}

.memory-timeline-section .memory-fragment:nth-child(odd) .fragment-content {
    border-left-color: rgba(96, 165, 250, 0.2);
}

.memory-timeline-section .memory-fragment.critical .fragment-content {
    border-left-color: rgba(239, 68, 68, 0.3);
}

/* Neural highlights */
.memory-timeline-section .neural-highlight {
    display: inline-block;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(34, 197, 94, 0.2), 
        transparent);
    padding: 2px 8px;
    border-radius: 4px;
    position: relative;
}

.memory-timeline-section .neural-highlight.danger {
    background: linear-gradient(90deg, 
        transparent, 
        rgba(239, 68, 68, 0.2), 
        transparent);
}

.memory-timeline-section .neural-highlight.human {
    background: linear-gradient(90deg, 
        transparent, 
        rgba(96, 165, 250, 0.2), 
        transparent);
}

/* Connection beam between fragments */
.memory-timeline-section .memory-connection {
    position: absolute;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(139, 92, 246, 0.5), 
        transparent);
    left: 50%;
    transform: translateX(-50%);
    animation: connectionPulse 3s infinite;
}

@keyframes connectionPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Final revelation */
.memory-timeline-section .revelation-fragment {
    background: radial-gradient(ellipse at center, 
        rgba(239, 68, 68, 0.2) 0%, 
        rgba(139, 92, 246, 0.1) 50%, 
        transparent 100%);
    border: 3px solid rgba(239, 68, 68, 0.5);
    padding: 40px;
    margin: 60px auto;
    max-width: 900px;
    text-align: center;
    animation: revelationPulse 3s infinite;
}

@keyframes revelationPulse {
    0%, 100% { 
        box-shadow: 0 0 50px rgba(239, 68, 68, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 80px rgba(239, 68, 68, 0.5);
        transform: scale(1.02);
    }
}

.memory-timeline-section .revelation-title {
    font-size: 2rem;
    color: #ef4444;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

.memory-timeline-section .revelation-fragment .fragment-content {
    border: none;
    padding-left: 0;
}

/* Floating memory nodes */
.memory-timeline-section .memory-node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    box-shadow: 0 0 10px currentColor;
    animation: nodePulse 2s infinite;
}

@keyframes nodePulse {
    0%, 100% { 
        transform: translateX(-50%) scale(1);
        opacity: 0.8;
    }
    50% { 
        transform: translateX(-50%) scale(1.5);
        opacity: 1;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .memory-timeline-section .memory-fragment:nth-child(odd),
    .memory-timeline-section .memory-fragment:nth-child(even) {
        margin-left: 20px;
        margin-right: 20px;
    }

    .memory-timeline-section .timeline-spine {
        left: 20px;
    }

    .memory-timeline-section .memory-title {
        font-size: 2rem;
    }
}