/* === static/blog/css/index.css === */

/* 1. 全局重置与背景 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* 统一的深蓝渐变背景 */
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    color: #333;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 2. 顶部导航栏 (毛玻璃) */
.glass-nav {
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-brand {
    font-size: 1.5em;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95em;
    padding: 8px 12px;
    border-radius: 6px;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-2px);
}

/* 用户菜单 */
.user-menu {
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.btn-auth {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9em;
}

.btn-login {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-register {
    background: #00d2ff;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 3. 主容器 */
.main-container {
    max-width: 1100px;
    width: 90%;
    margin: 30px auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 4. 消息提示 */
.messages {
    margin-bottom: 20px;
}

.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.5s ease;
}

.alert-success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.alert-error, .alert-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.alert-info {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 5. 通用卡片样式 (关键！子页面要用这个) */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    color: #333;
}

/* 6. 页脚 */
.footer {
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
    font-size: 0.9em;
}