/* static/css/common.css */

/* 基础样式重置与全局设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #f5f7ff 0%, #eef2ff 100%);
    color: #333;
    min-height: 100vh;
    padding-bottom: 60px;
    background-image:
        radial-gradient(#c7d2fe 0.5px, transparent 0.5px),
        radial-gradient(#c7d2fe 0.5px, #f5f7ff 0.5px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    line-height: 1.6;
}

/* 导航栏 */
.nav-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(124, 135, 255, 0.1);
    border-bottom: 1px solid rgba(199, 210, 254, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 2rem;
    position: relative;
}

.nav-content {
    display: flex;
    align-items: center;
    padding-right: 180px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.char-icon {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: none;
    transition: transform 0.3s ease;
}

.char-icon:hover {
    transform: scale(1.05);
}

.user-name {
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-left.hidden {
    display: none;
}

.nav-left.hidden~.nav-right {
    padding-right: 2rem;
}

.nav-right {
    position: absolute;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    z-index: 1;
}

.nav-right ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-right a {
    text-decoration: none;
    color: #5b67c9;
    font-weight: 500;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.nav-right a:hover {
    color: #7c87ff;
    background: rgba(199, 210, 254, 0.2);
    transform: translateY(-1px);
}

/* 内容区 */
.content-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(124, 135, 255, 0.08);
    border: 1px solid rgba(199, 210, 254, 0.2);
}

.content-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(199, 210, 254, 0.3);
}

.content-header h1 {
    color: #5b67c9;
    font-size: 1.6rem;
    font-weight: 600;
}

/* 提示消息 */
.flash-message {
    padding: 1rem;
    margin: 1rem 0;
    background: rgba(224, 231, 255, 0.7);
    color: #5b67c9;
    border-radius: 8px;
    border-left: 3px solid #7c87ff;
    animation: fadeIn 0.5s ease;
}

/* 页脚 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    color: #94a3b8;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid rgba(199, 210, 254, 0.3);
    margin: 0 auto;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 600px) {
    .nav-container {
        padding: 0.8rem 1.5rem;
    }

    .char-icon {
        width: 65px;
        height: 65px;
    }

    .nav-right ul {
        gap: 1rem;
    }

    .nav-right a {
        font-size: 1rem;
        padding: 0.5rem 0.8rem;
    }

    .nav-right {
        right: 1.5rem;
    }

    .nav-left.hidden~.nav-content {
        padding-right: 0;
    }

    .content-container {
        margin: 1rem;
        padding: 1.5rem;
    }
}