/* ============================================
   AlienIntroductions.com - Page-Specific Styles
   ============================================ */

/* ── Timeline Page ── */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
    transform: translateX(-50%);
}

.timeline-era {
    text-align: center;
    position: relative;
    z-index: 2;
    margin: 2rem 0;
}

.timeline-era-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-cyan);
    background: var(--bg-deep);
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--accent-cyan);
    border-radius: 20px;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}
.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
    padding-right: calc(50% + 2rem);
    text-align: right;
}
.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
    padding-left: calc(50% + 2rem);
}

.timeline-node {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: var(--bg-deep);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 10px var(--glow-cyan);
}

.timeline-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 1.25rem;
    max-width: 100%;
    transition: all var(--transition);
}
.timeline-card:hover {
    border-color: var(--border-light);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
}

.timeline-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.timeline-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ── Sightings Map ── */
.map-container {
    width: 100%;
    height: 450px;
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 2rem;
    background: var(--bg-surface);
}

/* ── Glossary ── */
.glossary-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.glossary-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.glossary-letter:hover, .glossary-letter.has-entries {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    background: var(--glow-cyan);
}

.glossary-group {
    margin-bottom: 2rem;
}

.glossary-group-letter {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.glossary-item {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(30, 42, 74, 0.4);
}
.glossary-item:last-child {
    border-bottom: none;
}

.glossary-term {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.glossary-definition {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ── FAQ ── */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: border-color var(--transition);
}
.faq-item.open {
    border-color: var(--border-light);
}

.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: color var(--transition);
}
.faq-question:hover {
    color: var(--accent-cyan);
}

.faq-arrow {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform var(--transition);
}
.faq-item.open .faq-arrow {
    transform: rotate(180deg);
    color: var(--accent-cyan);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.faq-item.open .faq-answer {
    max-height: 500px;
}

.faq-answer-inner {
    padding: 0 1.5rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ═══════════════════════════════════════════
   ALIEN TV — Organic Bioluminescent Design
   ═══════════════════════════════════════════ */

.alien-tv-scene {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.5rem 4rem;
    position: relative;
    overflow: hidden;
}

/* ── Floating particles ── */
.atv-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.atv-particle {
    position: absolute;
    bottom: -10px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 6px var(--accent-cyan);
    animation: atvParticleFloat linear infinite;
}
@keyframes atvParticleFloat {
    0%   { transform: translateY(0) translateX(0); opacity: 0; }
    10%  { opacity: 0.5; }
    90%  { opacity: 0.3; }
    100% { transform: translateY(-80vh) translateX(30px); opacity: 0; }
}

/* ── Main TV container ── */
.alien-tv {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: drop-shadow(0 0 60px rgba(0, 212, 255, 0.08));
}

/* ── Top crest with eye ── */
.atv-crest {
    position: relative;
    width: 120px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    margin-bottom: -8px;
}

.atv-crest-eye {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%,
        rgba(0, 212, 255, 0.4),
        rgba(0, 212, 255, 0.15) 50%,
        rgba(11, 13, 23, 0.9) 70%);
    border: 2px solid rgba(0, 212, 255, 0.4);
    box-shadow:
        0 0 15px rgba(0, 212, 255, 0.3),
        0 0 30px rgba(0, 212, 255, 0.1),
        inset 0 0 10px rgba(0, 212, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: atvEyePulse 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
}
@keyframes atvEyePulse {
    0%, 100% { box-shadow: 0 0 15px rgba(0,212,255,0.3), 0 0 30px rgba(0,212,255,0.1), inset 0 0 10px rgba(0,212,255,0.2); }
    50%      { box-shadow: 0 0 25px rgba(0,212,255,0.5), 0 0 50px rgba(0,212,255,0.2), inset 0 0 15px rgba(0,212,255,0.3); }
}

.atv-crest-eye-pupil {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan), 0 0 20px rgba(0, 212, 255, 0.5);
    animation: atvPupilShift 5s ease-in-out infinite;
}
@keyframes atvPupilShift {
    0%, 100% { transform: translate(0, 0); }
    25%      { transform: translate(3px, -2px); }
    50%      { transform: translate(-2px, 1px); }
    75%      { transform: translate(1px, 2px); }
}

/* Tendrils extending from crest */
.atv-tendril {
    position: absolute;
    top: 8px;
    width: 80px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, rgba(0,212,255,0.4), rgba(0,212,255,0.05));
}
.atv-tendril-l {
    right: 55%;
    transform: rotate(-12deg);
    transform-origin: right center;
    background: linear-gradient(270deg, rgba(0,212,255,0.4), rgba(0,212,255,0.05));
}
.atv-tendril-r {
    left: 55%;
    transform: rotate(12deg);
    transform-origin: left center;
}
.atv-tendril::before {
    content: '';
    position: absolute;
    top: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
    animation: atvNodeGlow 2s ease-in-out infinite;
}
.atv-tendril-l::before { left: 0; }
.atv-tendril-r::before { right: 0; animation-delay: 0.5s; }

/* ── Main body ── */
.atv-body {
    position: relative;
    width: min(900px, 90vw);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(0, 212, 255, 0.06), transparent 60%),
        linear-gradient(180deg,
            rgba(18, 24, 41, 0.95),
            rgba(14, 18, 37, 0.98) 30%,
            rgba(11, 13, 23, 0.99));
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 30px 30px 40px 40px;
    padding: 20px;
    box-shadow:
        0 0 40px rgba(0, 212, 255, 0.05),
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(0, 212, 255, 0.1),
        inset 0 -1px 0 rgba(0, 212, 255, 0.05);
}

/* Organic ridges along the sides */
.atv-ridge {
    position: absolute;
    top: 15%;
    bottom: 20%;
    width: 6px;
    border-radius: 4px;
    z-index: 3;
}
.atv-ridge-l {
    left: -3px;
    background: linear-gradient(180deg,
        rgba(0,212,255,0.05), rgba(0,212,255,0.2), rgba(0,212,255,0.3), rgba(0,212,255,0.2), rgba(0,212,255,0.05));
    box-shadow: -3px 0 12px rgba(0, 212, 255, 0.15);
}
.atv-ridge-r {
    right: -3px;
    background: linear-gradient(180deg,
        rgba(0,212,255,0.05), rgba(0,212,255,0.2), rgba(0,212,255,0.3), rgba(0,212,255,0.2), rgba(0,212,255,0.05));
    box-shadow: 3px 0 12px rgba(0, 212, 255, 0.15);
}

/* Bioluminescent corner nodes */
.atv-node {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan), 0 0 20px rgba(0, 212, 255, 0.3);
    z-index: 4;
    transition: all 0.3s;
    animation: atvNodeGlow 3s ease-in-out infinite;
}
.atv-node.pulse {
    background: #fff;
    box-shadow: 0 0 20px #fff, 0 0 40px var(--accent-cyan);
    transform: scale(1.8);
}
@keyframes atvNodeGlow {
    0%, 100% { opacity: 0.6; }
    50%      { opacity: 1; }
}
.atv-node-tl { top: 14px; left: 14px; animation-delay: 0s; }
.atv-node-tr { top: 14px; right: 14px; animation-delay: 0.8s; }
.atv-node-bl { bottom: 70px; left: 14px; animation-delay: 1.6s; }
.atv-node-br { bottom: 70px; right: 14px; animation-delay: 2.4s; }

/* ── Screen housing ── */
.atv-screen-housing {
    background: #000;
    border-radius: 20px;
    padding: 4px;
    box-shadow:
        inset 0 0 40px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.1);
    overflow: hidden;
}

.atv-screen {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
}

.atv-screen iframe {
    border: none;
    position: absolute;
    z-index: 1;
    width: 160%;
    height: 160%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.atv-screen-blocker {
    position: absolute;
    inset: 0;
    z-index: 8;
    cursor: default;
    background: transparent;
}

.atv-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg,
        transparent, transparent 2px,
        rgba(0, 212, 255, 0.015) 2px,
        rgba(0, 212, 255, 0.015) 4px);
    pointer-events: none;
    z-index: 6;
    border-radius: 16px;
}

.atv-static-canvas-wrap {
    position: absolute;
    inset: 0;
    z-index: 9;
    pointer-events: none;
    border-radius: 16px;
    overflow: hidden;
}

.atv-static {
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.2s;
}
.atv-static.active {
    opacity: 1;
}

/* Loading state */
.atv-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: #000;
    border-radius: 16px;
}
.atv-loading.hidden { display: none; }

.atv-loading-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    animation: atvFloat 2s ease-in-out infinite;
}
@keyframes atvFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

.atv-loading-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-cyan);
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.atv-dots::after {
    content: '';
    animation: atvDots 1.5s steps(4) infinite;
}
@keyframes atvDots {
    0%  { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

/* Error state */
.atv-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: #000;
    color: var(--accent-red);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    border-radius: 16px;
    gap: 12px;
}
.atv-error.hidden { display: none; }

.atv-retry-btn {
    padding: 6px 16px;
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.atv-retry-btn:hover {
    background: var(--accent-red);
    color: #000;
}

/* ── Controls strip ── */
.atv-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 14px 0 6px;
}

.atv-ctrl-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.2);
    color: var(--accent-cyan);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.atv-ctrl-btn:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
    transform: scale(1.1);
}
.atv-ctrl-btn:active {
    transform: scale(0.95);
}

.atv-channel-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 70px;
}

.atv-ch-label {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.atv-ch-num {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    letter-spacing: 2px;
}

/* ── Base tendrils ── */
.atv-base {
    position: relative;
    width: 200px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -5px;
}

.atv-base-tendril {
    position: absolute;
    bottom: 0;
    width: 60px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, rgba(0,212,255,0.3), rgba(0,212,255,0.05));
}
.atv-base-tendril-l {
    right: 55%;
    transform: rotate(8deg);
    transform-origin: right center;
    background: linear-gradient(270deg, rgba(0,212,255,0.3), rgba(0,212,255,0.05));
}
.atv-base-tendril-r {
    left: 55%;
    transform: rotate(-8deg);
    transform-origin: left center;
}

.atv-base-glow {
    width: 100px;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

/* ── Info panel ── */
.atv-info {
    max-width: 600px;
    text-align: center;
    margin-top: 2rem;
    padding: 0 1rem;
}

.atv-info-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}

.atv-info-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.atv-info-meta {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .atv-body {
        width: 98vw;
        padding: 12px;
        border-radius: 20px 20px 28px 28px;
    }
    .atv-screen-housing {
        border-radius: 14px;
    }
    .atv-screen {
        border-radius: 10px;
    }
    .atv-tendril { display: none; }
    .atv-ridge { display: none; }
    .atv-crest { width: 80px; height: 40px; }
    .atv-crest-eye { width: 28px; height: 28px; }
}

/* ── About Page ── */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.about-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent-cyan);
}

.about-content h2:first-child {
    margin-top: 0;
}

.about-content p {
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

/* ── Search Results ── */
.search-results-header {
    padding: 1rem 0;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.search-result-item {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
}

.search-result-type {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.4rem;
}

.search-result-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.search-result-excerpt {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
