/* 古朴风格CSS变量 */
:root {
    --primary: #8B1A1A;
    --primary-dark: #6d1515;
    --gold: #C9A84C;
    --gold-light: #e8d5a3;
    --text: #3d3d3d;
    --text-muted: #5a5a5a;
    --bg: #f5f0e6;
    --bg-alt: #ebe3d3;
    --border: #d4c9b5;
    --white: #fff;
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: linear-gradient(to bottom, #f5f0e6 0%, #ede4d4 100%);
    min-height: 100vh;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, #8B1A1A 0%, #6d1515 100%);
    color: white;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.nav-links {
    display: flex;
    gap: 5px;
}

.nav-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255,255,255,0.15);
    color: white;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-menu {
    position: relative;
}

.user-menu .username {
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background 0.3s;
}

.user-menu:hover .username {
    background: rgba(255,255,255,0.15);
}

.user-menu .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 150px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border-radius: 4px;
    margin-top: 5px;
    overflow: hidden;
}

.user-menu:hover .dropdown {
    display: block;
}

.user-menu .dropdown a {
    display: block;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

.user-menu .dropdown a:hover {
    background: #f5f5f5;
}

.btn-login,
.btn-register {
    padding: 6px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-login {
    color: white;
    border: 1px solid rgba(255,255,255,0.5);
}

.btn-login:hover {
    background: rgba(255,255,255,0.15);
}

.btn-register {
    background: #C9A84C;
    color: #2c1810;
}

.btn-register:hover {
    background: #d4b55d;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: #8B1A1A;
    padding: 10px;
    z-index: 99;
}

.mobile-menu a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-menu.active {
    display: block;
}

/* 消息提示 */
.flash-messages {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
}

.alert-error {
    background: linear-gradient(135deg, #fdf2f2 0%, #fce4e4 100%);
    color: #8B1A1A;
    border: 1px solid #d4a5a5;
}

.alert-success {
    background: linear-gradient(135deg, #f2f9f2 0%, #e4f5e4 100%);
    color: #2d5a2d;
    border: 1px solid #a5c4a5;
}

.alert button {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: inherit;
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, #3d2a1a 0%, #2c3e50 100%);
    color: #e8d5a3;
    padding: 30px;
    text-align: center;
    border-top: 3px solid #8B1A1A;
}

.footer-content p {
    margin: 5px 0;
    opacity: 0.9;
}

/* 响应式 */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 15px;
    }

    .nav-logo {
        width: 44px;
        height: 44px;
    }

    .nav-brand span {
        display: none;
    }
}
