/* Beryllium Atom Animated Background */
.atom-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.35;
}

.atom-nucleus {
    position: absolute;
    width: 90px;
    height: 90px;
    background: radial-gradient(circle at 38% 38%, #c8e8ff, #3d5a8a 55%, #192c46);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 700;
    box-shadow:
        0 0 20px rgba(61, 90, 138, 1),
        0 0 60px rgba(61, 90, 138, 0.7),
        0 0 120px rgba(61, 90, 138, 0.4);
    z-index: 10;
}

.atom-orbit {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(122, 184, 255, 0.7);
    box-shadow: 0 0 10px rgba(122, 184, 255, 0.3);
}

.atom-orbit-1 {
    width: 320px;
    height: 320px;
    margin-left: -160px;
    margin-top: -160px;
    animation: atom-spin-1 3.5s linear infinite;
}

.atom-orbit-2 {
    width: 560px;
    height: 560px;
    margin-left: -280px;
    margin-top: -280px;
    animation: atom-spin-2 7s linear infinite;
}

@keyframes atom-spin-1 {
    from { transform: perspective(500px) rotateX(75deg) rotateZ(0deg); }
    to   { transform: perspective(500px) rotateX(75deg) rotateZ(360deg); }
}

@keyframes atom-spin-2 {
    from { transform: perspective(500px) rotateX(75deg) rotateZ(90deg); }
    to   { transform: perspective(500px) rotateX(75deg) rotateZ(450deg); }
}

.atom-electron {
    position: absolute;
    width: 16px;
    height: 16px;
    background: #7ab8ff;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    box-shadow:
        0 0 10px #7ab8ff,
        0 0 24px rgba(122, 184, 255, 0.8),
        0 0 50px rgba(122, 184, 255, 0.4);
}

.atom-electron:first-child {
    left: -8px;
}

.atom-electron:last-child {
    right: -8px;
}

.atom-reaction-overlay {
    align-items: center;
    background: #fff;
    color: #111827;
    display: flex;
    inset: 0;
    justify-content: center;
    opacity: 0;
    padding: 24px;
    pointer-events: auto;
    position: fixed;
    transition: opacity 0.6s ease-in;
    z-index: 99999;
}

.atom-reaction-overlay-visible {
    opacity: 1;
}

.atom-reaction-panel {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(17, 24, 39, 0.12);
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(17, 24, 39, 0.18);
    max-width: 440px;
    padding: 28px;
    text-align: center;
}

.atom-reaction-kicker {
    color: #3d5a8a;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.atom-reaction-panel h2 {
    color: #111827;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 12px;
}

.atom-reaction-panel p {
    color: #4b5563;
    line-height: 1.55;
    margin: 0;
}

.atom-reaction-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 22px;
}

.atom-reaction-button {
    background: #e5e7eb;
    border: 1px solid rgba(17, 24, 39, 0.14);
    border-radius: 8px;
    color: #111827;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    min-height: 42px;
    padding: 0 16px;
}

.atom-reaction-button:hover {
    background: #d1d5db;
}

.atom-reaction-button-primary {
    background: #3d5a8a;
    border-color: #3d5a8a;
    color: #fff;
}

.atom-reaction-button-primary:hover {
    background: #324d7a;
}

@media (max-width: 420px) {
    .atom-reaction-actions {
        flex-direction: column;
    }

    .atom-reaction-button {
        width: 100%;
    }
}
