/* 个人中心页面样式 */

/* 魔法书房背景 */
.magic-study {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://trae-api-cn.mchost.guru/api/ide/v1/text_to_image?prompt=magic%20study%20room%2C%20bookshelves%2C%20magical%20books%2C%20warm%20lighting%2C%20detailed%20illustration&image_size=landscape_16_9') no-repeat center/cover;
    filter: brightness(0.7);
    animation: studyLights 15s ease-in-out infinite;
}

@keyframes studyLights {
    0%, 100% {
        filter: brightness(0.7) saturate(1);
    }
    50% {
        filter: brightness(0.8) saturate(1.2);
    }
}

/* 个人中心容器 */
.personal-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    padding: 2rem;
    min-height: 70vh;
    position: relative;
    z-index: 2;
}

/* 个人信息 */
.personal-info {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.魔法书 {
    width: 100%;
    background-color: rgba(139, 69, 19, 0.9);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: bookFloat 3s ease-in-out infinite;
    border: 3px solid #8B4513;
}

@keyframes bookFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-5px) rotate(0.5deg);
    }
}

.魔法书封面 {
    background-color: #8B4513;
    padding: 1.5rem;
    text-align: center;
    border-bottom: 2px solid #654321;
}

.魔法书封面 h2 {
    color: #FFD700;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.魔法书内容 {
    padding: 2rem;
    background-color: rgba(245, 245, 220, 0.9);
    color: #333;
}

.avatar-section {
    text-align: center;
    margin-bottom: 2rem;
}

.avatar-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
}

.avatar-frame {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 3px solid #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    animation: frameGlow 2s ease-in-out infinite;
}

@keyframes frameGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 1);
    }
}

.avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-section h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.avatar-section p {
    font-size: 1rem;
    color: #666;
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    border-left: 3px solid #FFD700;
}

.info-label {
    font-weight: bold;
    color: #333;
}

.info-value {
    color: #666;
}

/* 右侧内容区域 */
.personal-content {
    background-color: rgba(30, 30, 30, 0.8);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* 标签页导航 */
.tab-navigation {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 1rem;
}

.tab-button {
    padding: 0.8rem 1.5rem;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: #F5F5F5;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.tab-button:hover {
    background-color: rgba(255, 215, 0, 0.2);
    color: #FFD700;
}

.tab-button.active {
    background-color: rgba(255, 215, 0, 0.3);
    color: #FFD700;
    font-weight: bold;
}

/* 标签页内容 */
.tab-content {
    min-height: 400px;
}

.tab-pane {
    display: none;
    animation: tabFadeIn 0.5s ease-out forwards;
}

.tab-pane.active {
    display: block;
}

@keyframes tabFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 魔法日记 */
.魔法日记 {
    background-color: rgba(245, 245, 220, 0.9);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: diaryFloat 4s ease-in-out infinite;
}

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

.魔法日记 h3 {
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #FFD700;
}

.history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.history-room {
    font-weight: bold;
    color: #333;
}

.history-time {
    color: #666;
}

.history-message {
    color: #333;
    line-height: 1.4;
}

/* 设置表单 */
.settings-form {
    background-color: rgba(245, 245, 220, 0.9);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.settings-form h3 {
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
}

.setting-item {
    margin-bottom: 1.5rem;
}

.setting-item label {
    display: block;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.8rem;
}

.setting-options {
    margin-bottom: 0.5rem;
}

.setting-options input[type="checkbox"] {
    margin-right: 0.5rem;
}

.setting-options label {
    font-weight: normal;
    color: #666;
    margin-bottom: 0;
    display: inline;
}

.theme-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.theme-option {
    padding: 0.8rem 1.5rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.5);
}

.theme-option:hover {
    background-color: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
}

.theme-option.active {
    background-color: rgba(255, 215, 0, 0.4);
    border-color: #FFD700;
    font-weight: bold;
}

.save-button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    background-color: #FFD700;
    color: #121212;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.save-button:hover {
    background-color: #FFED4E;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    transform: translateY(-2px);
}

/* 学院选择 */
.学院选择-container {
    background-color: rgba(245, 245, 220, 0.9);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.学院选择-container h3 {
    color: #333;
    margin-bottom: 1rem;
}

.学院选择-container p {
    color: #666;
    margin-bottom: 2rem;
}

.学院选择-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.学院选择-item {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    border: 2px solid transparent;
}

.学院选择-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: #FFD700;
}

.学院选择-item .学院徽章 {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
}

.学院选择-item .学院徽章 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.学院选择-item h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.学院选择-item p {
    color: #666;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.分院按钮 {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    background-color: #FFD700;
    color: #121212;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.分院按钮:hover {
    background-color: #FFED4E;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    transform: translateY(-2px);
}

/* 分院帽动画 */
#分院帽 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: all 0.5s ease;
}

#分院帽.hidden {
    display: none;
}

.分院帽-content {
    text-align: center;
    animation: hatFloat 3s ease-in-out infinite;
}

@keyframes hatFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

.分院帽-content img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    margin-bottom: 1.5rem;
}

.分院帽-text {
    color: #FFD700;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: textGlow 2s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 215, 0, 1);
    }
}

/* 响应式设计 */
@media (max-width: 992px) {
    .personal-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .魔法书 {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .personal-container {
        padding: 1rem;
    }
    
    .personal-content {
        padding: 1.5rem;
    }
    
    .tab-navigation {
        flex-wrap: wrap;
    }
    
    .tab-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .魔法日记,
    .settings-form,
    .学院选择-container {
        padding: 1.5rem;
    }
    
    .学院选择-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .学院选择-grid {
        grid-template-columns: 1fr;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}