* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #0a0e17;
    color: #e0e0ff;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Vanta.js背景容器 */
#vanta-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* 登录遮罩层 */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 10, 20, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.8s ease;
}

.login-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 登录框 */
.login-container {
    background: rgba(15, 25, 45, 0.85);
    border-radius: 20px;
    padding: 40px 50px;
    width: 90%;
    max-width: 450px;
    border: 1px solid rgba(0, 180, 255, 0.3);
    box-shadow: 
        0 0 60px rgba(0, 100, 255, 0.3),
        inset 0 0 30px rgba(0, 200, 255, 0.05);
    position: relative;
    overflow: hidden;
    animation: breathing 4s infinite ease-in-out;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #00f3ff, #0080ff, #a100ff);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #00f3ff, #0080ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 1px;
    font-weight: 700;
}

.login-header p {
    font-size: 1rem;
    opacity: 0.7;
}

/* 登录表单 */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #a0c8ff;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(10, 20, 40, 0.7);
    border: 1px solid rgba(0, 150, 255, 0.4);
    border-radius: 10px;
    color: #e0e0ff;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #00f3ff;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.form-input::placeholder {
    color: #6688aa;
}

/* 登录按钮 */
.login-btn {
    background: linear-gradient(90deg, #0080ff, #00a2ff);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    background: linear-gradient(90deg, #00a2ff, #00c3ff);
    box-shadow: 0 0 20px rgba(0, 162, 255, 0.5);
    transform: translateY(-3px);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
}

.login-btn:hover::after {
    left: 100%;
}

/* 错误提示 */
.error-message {
    color: #ff5577;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 15px;
    min-height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* 演示账号提示 */
.demo-accounts {
    margin-top: 25px;
    padding: 15px;
    background: rgba(10, 30, 60, 0.5);
    border-radius: 10px;
    border-left: 3px solid #00a2ff;
}

.demo-accounts h4 {
    color: #00c3ff;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.demo-accounts p {
    font-size: 0.85rem;
    opacity: 0.8;
    line-height: 1.4;
}

/* 科技感标题 */
.header {
    text-align: center;
    padding: 2.5rem 1rem 1.5rem;
    position: relative;
    z-index: 10;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.header.visible {
    opacity: 1;
    transform: translateY(0);
}

.header h1 {
    font-size: 3.2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #00f3ff, #0080ff, #a100ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 15px rgba(0, 131, 255, 0.3);
    letter-spacing: 1.5px;
    font-weight: 800;
    position: relative;
    display: inline-block;
}

.header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 10%;
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00f3ff, #0080ff, transparent);
    border-radius: 2px;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0.8rem auto;
    line-height: 1.5;
}

/* 主内容容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    position: relative;
    z-index: 10;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
    display: flex;
    gap: 25px;
}

.container.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 侧边导航栏 */
.sidebar {
    width: 220px;
    flex-shrink: 0;
    background: rgba(10, 20, 40, 0.75);
    border-radius: 18px;
    padding: 20px 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 150, 255, 0.2);
    box-shadow: 
        0 0 40px rgba(0, 100, 255, 0.15),
        inset 0 0 20px rgba(0, 200, 255, 0.05);
    position: relative;
    overflow: hidden;
    animation: breathing 4s infinite ease-in-out;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar h3 {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 180, 255, 0.3);
    font-size: 1.3rem;
    color: #00f3ff;
    letter-spacing: 1px;
}

.subject-btn {
    background: rgba(15, 30, 60, 0.7);
    border: 1px solid rgba(0, 150, 255, 0.3);
    border-radius: 12px;
    color: #c0d5ff;
    padding: 14px 15px;
    font-size: 1.05rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subject-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 180, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.subject-btn:hover {
    background: rgba(25, 45, 85, 0.8);
    border-color: rgba(0, 200, 255, 0.5);
    color: #ffffff;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 100, 255, 0.2);
}

.subject-btn:hover::before {
    left: 100%;
}

.subject-btn.active {
    background: linear-gradient(90deg, rgba(0, 128, 255, 0.3), rgba(0, 200, 255, 0.2));
    border-color: #00f3ff;
    color: #00f3ff;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

.subject-btn.active::after {
    content: '';
    position: absolute;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #00f3ff;
    box-shadow: 0 0 10px #00f3ff;
    animation: pulse 1.5s infinite;
}

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

/* 右侧内容区域 */
.main-content {
    flex: 1;
}

/* 呼吸灯效果的面板 */
.panel {
    background: rgba(10, 20, 40, 0.75);
    border-radius: 18px;
    padding: 25px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 150, 255, 0.2);
    box-shadow: 
        0 0 40px rgba(0, 100, 255, 0.15),
        inset 0 0 20px rgba(0, 200, 255, 0.05);
    position: relative;
    overflow: hidden;
    animation: breathing 4s infinite ease-in-out;
    height: 100%;
    min-height: 1000px; /* 从750px改为1000px */
}

/* 呼吸灯动画 */
@keyframes breathing {
    0%, 100% {
        box-shadow: 
            0 0 40px rgba(0, 100, 255, 0.15),
            inset 0 0 20px rgba(0, 200, 255, 0.05);
        border-color: rgba(0, 150, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 0 60px rgba(0, 150, 255, 0.25),
            inset 0 0 25px rgba(0, 225, 255, 0.1);
        border-color: rgba(0, 200, 255, 0.35);
    }
}

/* iframe容器 */
.iframe-container {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    height: 1000px; /* 从750px改为1000px */
    border: 1px solid rgba(0, 180, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    display: block;
    background-color: #0a0e17;
    overflow: auto;
}

/* 当前学科显示 */
.current-subject {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(0, 100, 255, 0.1);
    border: 1px solid rgba(0, 180, 255, 0.2);
}

.current-subject h3 {
    color: #00f3ff;
    font-size: 1.4rem;
    letter-spacing: 1px;
}

.current-subject p {
    opacity: 0.8;
    font-size: 0.95rem;
    margin-top: 5px;
}

/* 机器人助手提示 */
.ai-helper {
    background: linear-gradient(90deg, rgba(0, 128, 255, 0.1), rgba(0, 200, 255, 0.05));
    border: 1px solid rgba(0, 180, 255, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: pulse-glow 2s infinite ease-in-out;
}

.ai-icon {
    font-size: 2rem;
    animation: float 3s infinite ease-in-out;
}

.ai-text {
    font-size: 1.1rem;
    color: #00f3ff;
    font-weight: 500;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 243, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* 浮动科技元素 */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.floating-element {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #00f3ff;
    border-radius: 50%;
    box-shadow: 0 0 15px #00f3ff;
    opacity: 0.7;
}

/* 粒子效果容器 */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

/* 科技感装饰线 */
.tech-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00f3ff, transparent);
    opacity: 0.3;
    z-index: 1;
}

.line-1 {
    top: 20%;
    left: 5%;
    width: 90%;
}

.line-2 {
    bottom: 20%;
    left: 5%;
    width: 90%;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 15px;
    }
    
    .sidebar h3 {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .subject-btn {
        flex: 1;
        min-width: calc(33.333% - 10px);
        padding: 12px 10px;
        font-size: 1rem;
    }
    
    .iframe-container {
        height: 1000px; /* 从650px改为900px */
    }
    
    .panel {
        min-height: 950px; /* 从700px改为950px */
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5rem;
    }
    
    .iframe-container {
        height: 1000px; /* 从550px改为800px */
    }
    
    .panel {
        padding: 20px 15px;
        min-height: 850px; /* 从600px改为850px */
    }
    
    .login-container {
        padding: 30px 25px;
        margin: 20px;
    }
    
    .login-header h2 {
        font-size: 1.8rem;
    }
    
    .subject-btn {
        min-width: calc(50% - 10px);
        font-size: 0.95rem;
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .iframe-container {
        height: 1000px; /* 从450px改为700px */
    }
    
    .panel {
        min-height: 750px; /* 从500px改为750px */
    }
    
    .login-container {
        padding: 25px 20px;
    }
    
    .sidebar {
        padding: 12px 10px;
        gap: 8px;
    }
    
    .subject-btn {
        min-width: 100%;
        font-size: 0.9rem;
        padding: 12px 10px;
    }
}

/* 闪烁光标效果 */
.cursor {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background-color: #00f3ff;
    margin-left: 5px;
    vertical-align: middle;
    animation: blink 1s infinite;
    box-shadow: 0 0 10px #00f3ff;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 悬浮效果 */
.panel:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

.footer {
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    opacity: 0.7;
    position: relative;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.8s ease 0.5s;
}

.footer.visible {
    opacity: 1;
}

/* 退出按钮 */
.logout-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(10, 25, 50, 0.7);
    border: 1px solid rgba(0, 150, 255, 0.4);
    color: #a0c8ff;
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 50;
    transition: all 0.3s ease;
    display: none;
}

.logout-btn:hover {
    background: rgba(20, 40, 80, 0.8);
    border-color: #00a2ff;
    color: #00f3ff;
}

/* 我的规划按钮 */
#myplan-btn {
    position: fixed;
    top: 20px;
    right: 120px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: #00f3ff;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    z-index: 50;
    transition: all 0.3s ease;
    display: none;
}
#myplan-btn:hover {
    background: rgba(0, 243, 255, 0.2);
    border-color: #00f3ff;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}