/* ===== Orbital Timeline Styles ===== */

.orbital-timeline-wrapper {
    width: 100%;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    overflow: visible;
    position: relative;
    color: #fff;
    font-family: 'Inter', sans-serif;
}

.orbital-scene {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Center Core */
.orbital-core {
    position: absolute;
    width: 64px;
    height: 64px;
    z-index: 10;
}

.core-inner {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    backdrop-filter: blur(8px);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.core-pulse-1,
.core-pulse-2 {
    position: absolute;
    inset: -20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: core-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.core-pulse-2 {
    animation-delay: 0.5s;
    border-color: rgba(255, 255, 255, 0.1);
}

@keyframes core-ping {
    75%, 100% { transform: scale(2.5); opacity: 0; }
}

/* Orbit Path */
.orbital-path {
    position: absolute;
    width: 400px;
    height: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Nodes Container */
.nodes-container {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Nodes */
.orbital-node {
    position: absolute;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 0;
    height: 0;
    overflow: visible;
    pointer-events: none;
    /* No transition so it doesn't fight with JS positioning */
}

.orbital-timeline-wrapper.is-rotating .orbital-node {
    transition: none;
}

.node-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(22, 22, 42, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    margin-top: -20px;
    flex-shrink: 0;
    pointer-events: auto;
}

.node-glow {
    position: absolute;
    width: 60px;
    height: 60px;
    top: -30px;
    left: -30px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: scale(calc(1 + var(--energy) / 200));
    pointer-events: none;
}

.node-label {
    margin-top: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    pointer-events: none;
}

/* ===== Node States ===== */
.orbital-node.expanded {
    opacity: 1 !important;
    z-index: 1000 !important;
}

.orbital-node.expanded .node-circle {
    background: #fff;
    color: #000;
    transform: scale(1.5);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.orbital-node.related .node-circle {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.2);
}

.orbital-node.pulse .node-circle {
    animation: node-pulse 1s infinite alternate;
}

@keyframes node-pulse {
    from { transform: scale(1); opacity: 0.6; }
    to { transform: scale(1.1); opacity: 1; }
}

/* ===== Detail Card — sits directly below the label ===== */
.node-card {
    /* Positioned right after the label in the flex flow */
    margin-top: 8px;
    width: 240px;
    background: rgba(10, 10, 18, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 1.25rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(8px);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

.orbital-node.expanded .node-card {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.node-card .card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #fff;
}

.node-card .card-desc {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin: 0;
}

/* ===== Mobile ===== */
@media (max-width: 600px) {
    .orbital-timeline-wrapper {
        height: 500px;
    }

    .orbital-path {
        width: 300px;
        height: 300px;
    }

    .node-card {
        width: 200px;
        padding: 1rem;
    }
}
