/* ============================================
   Philosophy Pages - Terminal Aesthetic with Green Glow
   (Based on Era Pages styling, extended for philosophy content)
   ============================================ */

/* Era Hero Section */
.era-hero {
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05) 0%, transparent 50%);
    border-bottom: 1px solid var(--border-color);
}

.era-title {
    font-family: var(--font-mono);
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.era-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
}

/* Era Section */
.era-section {
    padding: var(--spacing-xl) 0;
}

/* Era Terminal - Green Phosphor Glow */
.era-terminal {
    background: var(--bg-secondary);
    border: 2px solid var(--accent-primary);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.4),
                0 0 60px rgba(0, 255, 136, 0.2),
                inset 0 0 30px rgba(0, 255, 136, 0.05);
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.era-terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Terminal Header */
.terminal-header {
    background: var(--bg-primary);
    padding: 1rem;
    font-family: var(--font-mono);
    border-bottom: 1px solid var(--accent-primary);
    display: flex;
    align-items: center;
    /* Remove gap for natural typing flow */
}

.terminal-prompt {
    color: white;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.terminal-text {
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
    animation: terminalGlow 2s ease-in-out infinite;
}

/* Terminal typing animation */
.terminal-typed-text {
    color: white;
    text-shadow: 0 0 15px rgba(255, 255, 255, 1), 0 0 30px rgba(255, 255, 255, 0.8);
    font-family: var(--font-mono);
    white-space: pre;
    font-weight: bold;
    display: none; /* Hidden initially */
}

.terminal-cursor {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    animation: cursorBlink 1s ease-in-out infinite;
    display: none; /* Hidden initially */
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Enter key animation */
.enter-key {
    display: inline-block;
    color: var(--accent-primary);
    font-size: 0.8em;
    margin-left: 0.5rem;
    animation: enterPress 0.3s ease-in-out;
}

@keyframes enterPress {
    0% { transform: scale(1); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

@keyframes terminalGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(0, 255, 136, 0.6); }
    50% { text-shadow: 0 0 20px rgba(0, 255, 136, 0.9); }
}

/* Terminal Content */
.terminal-content {
    padding: 2rem;
    background: var(--bg-secondary);
    min-height: 200px;
    position: relative;
    z-index: 2;
}

.terminal-content p {
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    line-height: 1.8;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.4);
    margin-bottom: 1rem;
}

.terminal-content p:last-child {
    margin-bottom: 0;
}

.coming-soon {
    color: var(--accent-secondary);
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1.5rem !important;
}

/* Terminal Note - Smaller text for footnotes */
.terminal-note {
    font-size: 0.85rem !important;
    opacity: 0.85;
    margin-top: 1.5rem !important;
}

/* Make "Note:" label white but keep content green */
.terminal-note::first-line {
    color: white;
    font-weight: bold;
}

/* Terminal Links - Blue color */
.terminal-content a {
    color: #4A9EFF;
    text-decoration: underline;
    text-shadow: 0 0 5px rgba(74, 158, 255, 0.4);
    transition: text-shadow 0.3s ease, color 0.3s ease;
}

.terminal-content a:hover {
    color: #6BB6FF;
    text-shadow: 0 0 15px rgba(107, 182, 255, 0.8);
}

/* Scanlines Effect */
.era-terminal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 2px,
        transparent 2px,
        transparent 4px
    );
    pointer-events: none;
    z-index: 3;
    animation: scanlines 8s linear infinite;
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}

/* Era Navigation */
.era-nav {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.era-nav .btn {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

/* ============================================
   Hash Decode Effect - Generic
   ============================================ */
.philosophy-text,
.empowerment-text,
.transparency-text,
.liberation-text,
.buildbusy-text {
    font-family: var(--font-mono);
    line-height: 1.8;
    color: var(--text-primary);
}

.philosophy-text .letter,
.empowerment-text .letter,
.transparency-text .letter,
.liberation-text .letter,
.buildbusy-text .letter {
    display: inline;
    transition: color 0.2s ease;
}

.philosophy-text .hash-char,
.empowerment-text .hash-char,
.transparency-text .hash-char,
.liberation-text .hash-char,
.buildbusy-text .hash-char {
    color: var(--text-secondary);
    font-weight: bold;
}

.philosophy-text .decoded,
.empowerment-text .decoded,
.transparency-text .decoded,
.liberation-text .decoded,
.buildbusy-text .decoded {
    color: var(--accent-primary);
}

.philosophy-text .hex-glow,
.empowerment-text .hex-glow,
.transparency-text .hex-glow,
.liberation-text .hex-glow,
.buildbusy-text .hex-glow {
    color: white;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    font-weight: bold;
}

/* Keep white class for permanent white text */
.keep-white,
.white-word {
    color: white !important;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

/* ============================================
   User Empowerment - Specific Overrides
   ============================================ */

/* First sentence with reversed colors and underline */
.empowerment-text .reverse-sentence {
    text-decoration: underline;
    text-decoration-color: white;
    text-underline-offset: 3px;
}

.empowerment-text .reverse-sentence .letter {
    color: white !important;
}

.empowerment-text .reverse-sentence .white-word {
    color: var(--accent-primary) !important;
    text-shadow: 0 0 10px var(--accent-primary);
}

.empowerment-text .reverse-sentence .hex-glow {
    color: var(--accent-primary) !important;
    text-shadow: 0 0 8px var(--accent-primary);
}

/* ============================================
   MEGA CTA EFFECTS - Pulsing Glow + Wave + Particles
   ============================================ */

.ai-cta {
    margin-top: 2rem;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.cta-line {
    font-family: var(--font-mono);
    margin-bottom: 1rem;
}

.cta-text {
    color: var(--accent-primary);
    margin-left: 0.5rem;
}

.cta-links {
    padding-left: 2rem;
}

.cta-link {
    display: inline-block;
    color: var(--accent-primary);
    text-decoration: none;
    font-family: var(--font-mono);
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent-primary);
    transition: all 0.3s ease;
}

.cta-link:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    box-shadow: 0 0 15px var(--accent-primary);
}

/* Pulsing neon glow on main text */
.cta-glow-pulse {
    animation: ctaPulseGlow 8s ease-in-out infinite;
    text-shadow: 0 0 1px var(--accent-primary);
}

@keyframes ctaPulseGlow {
    0%, 100% {
        color: var(--accent-primary);
        text-shadow: 0 0 1px var(--accent-primary);
    }
    50% {
        color: #00ff88;
        text-shadow: 0 0 2px var(--accent-primary);
    }
}

/* Individual letters for wave effect */
.cta-letter {
    display: inline-block;
    transition: all 0.2s ease;
    color: var(--accent-primary);
}

/* Wave highlight on letters */
.cta-letter.cta-wave-active {
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 0 4px var(--accent-primary);
    font-weight: bold;
    transform: scaleY(1.05);
}

/* Interactive emojis */
.cta-emoji {
    display: inline-block;
    transition: all 0.3s ease;
    margin-left: 0.25rem;
}

.cta-emoji-interactive {
    cursor: pointer;
    animation: emojiPulse 8s ease-in-out infinite;
}

@keyframes emojiPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 1px var(--accent-primary));
    }
    50% {
        transform: scale(1.04);
        filter: drop-shadow(0 0 2px var(--accent-primary));
    }
}

/* Sound Toggle Button */
.cta-sound-toggle {
    background: none;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.35rem 0.5rem;
    margin-left: 0.75rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2rem;
}

.cta-sound-toggle:hover {
    background: rgba(0, 255, 136, 0.15);
    box-shadow: 0 0 8px var(--accent-primary);
    transform: scale(1.05);
}

.cta-sound-toggle:active {
    transform: scale(0.95);
}

/* Portal effect on hover */
.cta-emoji-portal {
    animation: emojiPortal 0.6s ease-out !important;
}

@keyframes emojiPortal {
    0% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 8px var(--accent-primary));
    }
    50% {
        transform: scale(1.3) rotate(180deg);
        filter: drop-shadow(0 0 16px var(--accent-primary)) hue-rotate(60deg);
    }
    100% {
        transform: scale(1.2) rotate(360deg);
        filter: drop-shadow(0 0 12px var(--accent-primary));
    }
}

/* Particle burst effect */
.particle-burst {
    position: fixed;
    pointer-events: none;
    font-size: 2rem;
    z-index: 9999;
    animation: particleFloat 1.5s ease-out forwards;
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.3) translateY(-100px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .era-nav {
        flex-direction: column;
    }

    .era-nav .btn {
        width: 100%;
    }

    .terminal-content {
        padding: 1.5rem;
    }
}
