* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(-45deg, #0f2027, #203a43, #2c5364);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.teaching-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 1200px;
    margin: 30px auto;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.teaching-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    z-index: -1;
    pointer-events: none;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 500;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 150, 255, 0.5);
}

.geometry-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.btn-geometry {
    padding: 12px 20px;
    background: rgba(79, 195, 247, 0.2);
    border: 1px solid rgba(79, 195, 247, 0.5);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-geometry:hover {
    background: rgba(79, 195, 247, 0.4);
    transform: translateY(-2px);
}

.btn-geometry.active {
    background: linear-gradient(45deg, #4fc3f7, #2196f3);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
}

.view-controls {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.view-controls button {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.view-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.geometry-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.model-container {
    width: 100%;
    height: 500px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.model-container .loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
}

.geometry-description {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 25px;
    line-height: 1.8;
}

.geometry-description h2 {
    margin-bottom: 20px;
    color: #4fc3f7;
    font-size: 24px;
    border-bottom: 1px solid rgba(79, 195, 247, 0.5);
    padding-bottom: 10px;
}

.geometry-description h3 {
    margin: 15px 0 10px;
    color: #4fc3f7;
    font-size: 20px;
}

.geometry-description p {
    margin-bottom: 15px;
}

.geometry-description ul {
    margin-left: 25px;
    margin-bottom: 20px;
}

.geometry-description li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
}

.geometry-description li:before {
    content: "•";
    color: #4fc3f7;
    position: absolute;
    left: 0;
}

.geometry-description .formula {
    background: rgba(79, 195, 247, 0.1);
    border-left: 3px solid #4fc3f7;
    padding: 10px 15px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    border-radius: 0 5px 5px 0;
}

.interaction-guide {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* 动态背景元素 */
.dynamic-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.line {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    transform-origin: left center;
    animation: lineMove 10s linear infinite;
}

@keyframes lineMove {
    0% {
        transform: translateX(-100%) rotate(0deg);
    }
    100% {
        transform: translateX(100vw) rotate(360deg);
    }
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.1;
    }
    25% {
        transform: translate(50px, 50px) rotate(90deg);
        opacity: 0.3;
    }
    50% {
        transform: translate(100px, 0) rotate(180deg);
        opacity: 0.1;
    }
    75% {
        transform: translate(50px, -50px) rotate(270deg);
        opacity: 0.3;
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
        opacity: 0.1;
    }
}

@media (max-width: 768px) {
    .teaching-container {
        padding: 20px;
        width: 95%;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .geometry-controls {
        gap: 8px;
    }
    
    .btn-geometry {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .model-container {
        height: 350px;
    }
    
    .geometry-description {
        padding: 15px;
    }
    
    .geometry-description h2 {
        font-size: 20px;
    }
    
    .view-controls {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
}