/* 广义相对论网页样式 */

/* 基础重置和字体 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 星空背景效果 */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"%3E%3Ccircle cx=\"20\" cy=\"20\" r=\"0.5\" fill=\"white\" opacity=\"0.8\"/%3E%3Ccircle cx=\"80\" cy=\"30\" r=\"0.3\" fill=\"white\" opacity=\"0.6\"/%3E%3Ccircle cx=\"40\" cy=\"60\" r=\"0.4\" fill=\"white\" opacity=\"0.7\"/%3E%3Ccircle cx=\"90\" cy=\"80\" r=\"0.2\" fill=\"white\" opacity=\"0.5\"/%3E%3Ccircle cx=\"10\" cy=\"90\" r=\"0.3\" fill=\"white\" opacity=\"0.6\"/%3E%3C/svg%3E") repeat;
    animation: move-stars 120s linear infinite;
    z-index: -2;
}

.twinkling {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"%3E%3Ccircle cx=\"25\" cy=\"25\" r=\"0.2\" fill=\"white\" opacity=\"0.8\"/%3E%3Ccircle cx=\"75\" cy=\"15\" r=\"0.3\" fill=\"white\" opacity=\"0.6\"/%3E%3Ccircle cx=\"60\" cy=\"70\" r=\"0.2\" fill=\"white\" opacity=\"0.7\"/%3E%3C/svg%3E") repeat;
    animation: move-twinkle 100s linear infinite;
    z-index: -1;
}

@keyframes move-stars {
    from { transform: translateY(0px); }
    to { transform: translateY(-2000px); }
}

@keyframes move-twinkle {
    from { transform: translateY(0px); }
    to { transform: translateY(-1000px); }
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部英雄区域 */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(255, 119, 198, 0.2) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(255, 255, 255, 0.5); }
    to { text-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 255, 255, 0.3); }
}

.einstein-quote {
    font-size: 1.2rem;
    font-style: italic;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.quote-author {
    display: block;
    font-size: 1rem;
    margin-top: 1rem;
    opacity: 0.8;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* 主要内容区域 */
main {
    position: relative;
    z-index: 1;
}

section {
    padding: 5rem 0;
    position: relative;
}

section:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 介绍部分 */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.intro-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #e0e0e0;
}

.highlight-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    border-radius: 15px;
    margin-top: 2rem;
}

.highlight-box h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.highlight-box ul {
    list-style: none;
}

.highlight-box li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.highlight-box li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #ffffff;
    font-weight: bold;
}

/* 时空演示 */
.spacetime-demo {
    width: 400px;
    height: 400px;
    position: relative;
    margin: 0 auto;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 20px;
    overflow: hidden;
}

.grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: grid-warp 3s ease-in-out infinite;
}

@keyframes grid-warp {
    0%, 100% { transform: perspective(400px) rotateX(0deg); }
    50% { transform: perspective(400px) rotateX(10deg) scale(1.1); }
}

.mass-object {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #ffeb3b 0%, #ff9800 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: mass-pulse 2s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(255, 235, 59, 0.5);
}

@keyframes mass-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

.orbit-path {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: orbit-rotate 10s linear infinite;
}

.orbit-path::before {
    content: "";
    position: absolute;
    top: -5px;
    left: calc(50% - 5px);
    width: 10px;
    height: 10px;
    background: #64b5f6;
    border-radius: 50%;
    animation: orbit-object 10s linear infinite;
}

@keyframes orbit-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes orbit-object {
    from { transform: rotate(0deg) translateX(100px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(100px) rotate(-360deg); }
}

/* 方程式部分 */
.equation-showcase {
    text-align: center;
    padding: 3rem 0;
}

.main-equation {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: equation-glow 3s ease-in-out infinite alternate;
}

@keyframes equation-glow {
    from { filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.5)); }
    to { filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.8)); }
}

.equation-explanation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.explanation-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.explanation-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 预言验证卡片 */
.predictions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.prediction-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.prediction-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.prediction-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.prediction-card h3 {
    margin-bottom: 1rem;
    color: #667eea;
}

.prediction-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #64b5f6;
    margin-top: 1rem;
    padding: 0.5rem;
    background: rgba(100, 181, 246, 0.1);
    border-radius: 5px;
}

/* 应用时间线 */
.applications-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.applications-timeline::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, #667eea, #764ba2);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-year {
    flex: 0 0 120px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.5rem;
    border-radius: 10px;
    position: relative;
    z-index: 1;
}

.timeline-content {
    flex: 1;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin: 0 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-content h3 {
    margin-bottom: 0.5rem;
    color: #64b5f6;
}

/* 交互演示 */
.demo-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-controls {
    margin-bottom: 2rem;
}

.demo-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.demo-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.5);
}

.demo-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.demo-canvas {
    margin: 2rem 0;
    border-radius: 10px;
    overflow: hidden;
}

#relativityCanvas {
    width: 100%;
    max-width: 800px;
    height: 400px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 页脚 */
footer {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 3rem 0 1rem;
    margin-top: 5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #64b5f6;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #64b5f6;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #b0b0b0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .intro-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .spacetime-demo {
        width: 300px;
        height: 300px;
    }
    
    .main-equation {
        font-size: 2rem;
    }
    
    .applications-timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 60px;
    }
    
    .timeline-year {
        position: absolute;
        left: 0;
        top: 0;
        flex: none;
        width: 80px;
        font-size: 1rem;
    }
    
    .timeline-content {
        margin: 1rem 0 0 0;
    }
    
    .container {
        padding: 0 15px;
    }
}
