/* 加载动画 */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 原子动画 */
.atom-animation {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
}

.nucleus {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #ffd700, #ffed4e);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    animation: pulse 2s ease-in-out infinite;
}

.electron {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #00d2ff, #3a7bd5);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform-origin: 0 0;
}

.electron1 {
    animation: orbit1 3s linear infinite;
}

.electron2 {
    animation: orbit2 4s linear infinite;
}

.electron3 {
    animation: orbit3 5s linear infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

@keyframes orbit1 {
    from { transform: rotate(0deg) translateX(40px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(40px) rotate(-360deg); }
}

@keyframes orbit2 {
    from { transform: rotate(120deg) translateX(55px) rotate(-120deg); }
    to { transform: rotate(480deg) translateX(55px) rotate(-480deg); }
}

@keyframes orbit3 {
    from { transform: rotate(240deg) translateX(70px) rotate(-240deg); }
    to { transform: rotate(600deg) translateX(70px) rotate(-600deg); }
}

/* 卡片进入动画 */
.scientist-card {
    animation: slideInUp 0.6s ease-out forwards;
}

.scientist-card:nth-child(1) { animation-delay: 0.1s; }
.scientist-card:nth-child(2) { animation-delay: 0.2s; }
.scientist-card:nth-child(3) { animation-delay: 0.3s; }
.scientist-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 页面切换动画 */
.page-transition {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 核反应动画 */
.nuclear-reaction {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    margin: 20px 0;
}

.particle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

.alpha-particle {
    background: radial-gradient(circle, #ff6b6b, #ee5a24);
}

.beta-particle {
    background: radial-gradient(circle, #4834d4, #686de0);
}

.nucleus-particle {
    background: radial-gradient(circle, #ffd700, #ffed4e);
}

.product-particle {
    background: radial-gradient(circle, #00d2ff, #3a7bd5);
}

.arrow {
    font-size: 2rem;
    color: #fff;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

/* 交互元素动画 */
.draggable {
    cursor: grab;
    transition: all 0.3s ease;
}

.draggable:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.dragging {
    cursor: grabbing;
    transform: scale(1.2);
    z-index: 1000;
    opacity: 0.8;
}

.drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    padding: 20px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.drop-zone.active {
    border-color: #00d2ff;
    background: rgba(0, 210, 255, 0.1);
}

.drop-zone.correct {
    border-color: #4ecdc4;
    background: rgba(78, 205, 196, 0.2);
    animation: correctPulse 0.5s ease-in-out;
}

.drop-zone.incorrect {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.2);
    animation: incorrectShake 0.5s ease-in-out;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes incorrectShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 链式反应动画 */
.chain-reaction {
    position: relative;
    width: 100%;
    height: 300px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    overflow: hidden;
}

.neutron {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    animation: neutronMove 2s linear;
}

.fission-nucleus {
    position: absolute;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, #ffd700, #ffed4e);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.fission-nucleus.splitting {
    animation: split 0.5s ease-in-out;
}

@keyframes neutronMove {
    from { transform: translateX(0); }
    to { transform: translateX(200px); }
}

@keyframes split {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); background: #ff6b6b; }
    100% { transform: scale(0); }
}

/* 聚变动画 */
.fusion-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    position: relative;
}

.fusion-nucleus {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    margin: 0 10px;
    animation: fusionApproach 3s ease-in-out infinite;
}

.deuterium {
    background: radial-gradient(circle, #4834d4, #686de0);
}

.tritium {
    background: radial-gradient(circle, #ff6b6b, #ee5a24);
}

@keyframes fusionApproach {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-20px); }
}

/* 响应式动画调整 */
@media (max-width: 768px) {
    .nuclear-reaction {
        flex-direction: column;
        gap: 15px;
    }
    
    .arrow {
        transform: rotate(90deg);
    }
    
    .atom-animation {
        width: 100px;
        height: 100px;
    }
    
    .chain-reaction {
        height: 200px;
    }
} 