body {
    margin: 0;
    padding: 0;
    background-color: #000;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* 添加CSS变量的初始值 */
:root {
    --blackhole-glow: 0 0 25px 5px rgba(255, 255, 255, 0.4);
    --blackhole-inner-glow: 0 0 20px 8px rgba(255, 255, 255, 0.3);
    --blackhole-animation-duration: 8s;
}

.blackhole-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    width: 250px;
    height: 250px;
}

/* 黑洞主体 - 更加逼真的设计 */
.blackhole-ring {
    width: 200px;
    height: 200px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: spin var(--blackhole-animation-duration) linear infinite;
    overflow: visible;
    /* 添加过渡效果 */
    transition: width 1.5s cubic-bezier(0.25, 0.1, 0.25, 1.0),
                height 1.5s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

/* 黑洞事件视界 - 内部黑色区域 */
.blackhole-ring::before {
    content: '';
    position: absolute;
    width: 85%;
    height: 85%;
    background-color: #000;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 40px 5px rgba(0, 0, 0, 0.9);
    z-index: 2;
    transition: all 1.5s ease;
}

/* 吸积盘 - 外部发光环 */
.blackhole-ring::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.7) 35%,
        rgba(255, 255, 255, 0.5) 45%,
        rgba(255, 255, 255, 0.3) 55%, 
        rgba(255, 255, 255, 0.15) 70%,
        rgba(255, 255, 255, 0.05) 85%,
        transparent 95%
    );
    box-shadow: 
        var(--blackhole-glow),
        inset var(--blackhole-inner-glow);
    z-index: 1;
    filter: blur(3px);
    /* 添加过渡效果 */
    transition: box-shadow 1.5s ease, background 1.5s ease;
}

/* 光扭曲效果 - 额外的光晕层 */
.blackhole-container::before {
    content: '';
    position: absolute;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(0, 0, 0, 0.9) 40%,
        rgba(50, 50, 50, 0.6) 60%,
        rgba(20, 20, 20, 0.3) 80%,
        transparent 95%
    );
    filter: blur(10px);
    z-index: 0;
    /* 添加过渡效果 */
    transition: width 1.5s ease, height 1.5s ease, background 1.5s ease;
}

/* 引力透镜效果 - 周围扭曲的区域 */
.blackhole-container::after {
    content: '';
    position: absolute;
    width: 290px;
    height: 290px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        transparent 50%,
        rgba(40, 40, 40, 0.15) 60%,
        rgba(30, 30, 30, 0.1) 80%,
        rgba(20, 20, 20, 0.05) 90%,
        transparent 100%
    );
    filter: blur(12px);
    z-index: 0;
    opacity: 0.7;
    /* 添加过渡效果 */
    transition: width 1.5s ease, height 1.5s ease, background 1.5s ease;
}

/* 黑洞发光增强动画 */
.blackhole-glowing::after {
    box-shadow: 
        var(--blackhole-glow),
        inset var(--blackhole-inner-glow);
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.8) 35%,
        rgba(255, 255, 255, 0.6) 45%,
        rgba(255, 255, 255, 0.4) 55%, 
        rgba(255, 255, 255, 0.25) 70%,
        rgba(255, 255, 255, 0.15) 85%,
        transparent 95%
    );
    filter: blur(4px);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

#numberInput {
    position: absolute;
    padding: 10px 15px;
    font-size: 18px;
    text-align: center;
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    outline: none;
    width: 180px;
    height: 24px;
    z-index: 3;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    font-family: 'Arial', sans-serif;
    letter-spacing: 0.5px;
}

#numberInput::placeholder {
    color: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

#numberInput:focus {
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2), inset 0 0 10px rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.5);
}

/* 粒子画布样式 */
#particleCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 状态消息样式 */
.status-message {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    pointer-events: none;
    z-index: 10;
}

.status-message.show {
    opacity: 1;
}

/* 观测报告样式 */
.observation-report {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    z-index: 100;
    overflow-y: auto;
    font-family: 'Arial', sans-serif;
}

.observation-report h1 {
    font-size: 28px;
    margin-bottom: 25px;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    letter-spacing: 3px;
}

.observation-report .content {
    font-size: 18px;
    line-height: 1.6;
    max-width: 90%;
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.share-button {
    padding: 12px 24px;
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.share-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* 输入框抖动和缩小动画 */
@keyframes inputShake {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    25% { transform: translate(-50%, -50%) translateY(-5px); }
    75% { transform: translate(-50%, -50%) translateY(5px); }
}

@keyframes growingShake {
    0% { transform: translate(-50%, -50%) translateY(0); }
    3.33% { transform: translate(-50%, -50%) translateY(-1px); }
    6.66% { transform: translate(-50%, -50%) translateY(1px); }
    10% { transform: translate(-50%, -50%) translateY(-1px); }
    13.33% { transform: translate(-50%, -50%) translateY(1px); }
    16.66% { transform: translate(-50%, -50%) translateY(-2px); }
    20% { transform: translate(-50%, -50%) translateY(2px); }
    23.33% { transform: translate(-50%, -50%) translateY(-2px); }
    26.66% { transform: translate(-50%, -50%) translateY(2px); }
    30% { transform: translate(-50%, -50%) translateY(-2px); }
    33.33% { transform: translate(-50%, -50%) translateY(2px); }
    36.66% { transform: translate(-50%, -50%) translateY(-3px); }
    40% { transform: translate(-50%, -50%) translateY(3px); }
    43.33% { transform: translate(-50%, -50%) translateY(-3px); }
    46.66% { transform: translate(-50%, -50%) translateY(3px); }
    50% { transform: translate(-50%, -50%) translateY(-3px); }
    53.33% { transform: translate(-50%, -50%) translateY(3px); }
    56.66% { transform: translate(-50%, -50%) translateY(-4px); }
    60% { transform: translate(-50%, -50%) translateY(4px); }
    63.33% { transform: translate(-50%, -50%) translateY(-4px); }
    66.66% { transform: translate(-50%, -50%) translateY(4px); }
    70% { transform: translate(-50%, -50%) translateY(-4px); }
    73.33% { transform: translate(-50%, -50%) translateY(4px); }
    76.66% { transform: translate(-50%, -50%) translateY(-5px); }
    80% { transform: translate(-50%, -50%) translateY(5px); }
    83.33% { transform: translate(-50%, -50%) translateY(-5px); }
    86.66% { transform: translate(-50%, -50%) translateY(5px); }
    90% { transform: translate(-50%, -50%) translateY(-5px); }
    93.33% { transform: translate(-50%, -50%) translateY(5px); }
    96.66% { transform: translate(-50%, -50%) translateY(-5px); }
    100% { transform: translate(-50%, -50%) translateY(0); }
}

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

@keyframes inputShrink {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.9; }
}

/* 黑洞扩大动画 - 加快速度 */
.blackhole-expanding {
    animation: blackholeExpand 0.8s cubic-bezier(0.25, 0.1, 0.25, 1.0) forwards !important;
}

/* 黑洞扩大动画 */
@keyframes blackholeExpand {
    0% { 
        width: 280px; 
        height: 280px; 
    }
    100% { 
        width: 300vh; 
        height: 300vh; 
    }
}

/* 淡入动画 */
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* 让报告内容在小屏幕上更好看 */
.report-text {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.report-text p {
    margin: 10px 0;
}

.highlighted {
    color: #77aaff;
    text-shadow: 0 0 5px rgba(119, 170, 255, 0.4);
}

/* 响应式设计 - 适配移动设备 */
@media (max-width: 768px) {
    .blackhole-ring {
        width: 180px;
        height: 180px;
    }
    
    #numberInput {
        width: 150px;
        font-size: 16px;
        padding: 8px 12px;
    }
    
    .observation-report h1 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .observation-report .content {
        font-size: 16px;
        padding: 15px;
        max-width: 95%;
        margin-bottom: 20px;
        overflow-x: hidden;
    }
    
    .share-button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .report-text {
        max-width: 100%;
        padding: 0 5px;
    }
}

@media (max-width: 480px) {
    .blackhole-ring {
        width: 150px;
        height: 150px;
    }
    
    #numberInput {
        width: 120px;
        font-size: 14px;
        padding: 8px 10px;
        height: 20px;
    }
    
    .observation-report {
        padding: 15px 10px;
        justify-content: flex-start;
        padding-top: 40px;
    }
    
    .observation-report h1 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .observation-report .content {
        font-size: 14px;
        padding: 12px;
        line-height: 1.4;
        max-width: 100%;
        margin-bottom: 15px;
    }
    
    .share-button {
        padding: 8px 16px;
        font-size: 13px;
        margin-top: 10px;
    }
    
    /* 改善移动端的报告文本显示 */
    .report-text {
        font-size: 14px;
    }
    
    .report-text p {
        margin: 8px 0;
    }
    
    /* 确保科学数据和表格在移动设备上不会溢出 */
    .report-text table, 
    .report-text pre {
        max-width: 100%;
        overflow-x: auto;
        font-size: 12px;
    }
}

/* 处理超小屏幕 */
@media (max-width: 320px) {
    .blackhole-ring {
        width: 130px;
        height: 130px;
    }
    
    #numberInput {
        width: 100px;
        font-size: 13px;
    }
    
    .observation-report h1 {
        font-size: 18px;
    }
    
    .observation-report .content {
        font-size: 13px;
        padding: 10px;
    }
    
    /* 调整诗歌和特殊格式文本在小屏幕上的显示 */
    .report-text p[style*="font-style:italic; font-size:20px"] {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }
}

/* 改善移动端观测报告的滚动体验 */
.observation-report {
    -webkit-overflow-scrolling: touch;
}

/* 确保报告内的所有内容都能在移动设备上正确显示 */
.observation-report .content {
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
    box-sizing: border-box;
}

/* 优化移动设备上的分享按钮触摸区域 */
.share-button {
    min-height: 44px; /* 确保触摸区域足够大 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 确保状态消息在移动设备上可见 */
#shareStatus {
    width: 100%;
    text-align: center;
    padding: 0 10px;
    box-sizing: border-box;
}

