/* ========== 全局 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", "Microsoft YaHei", sans-serif;
}

body {
    background: #f7f9fc;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

/* ========== 顶部导航 ========== */
.navbar {
    background: #ffffff;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .logo {
    font-size: 22px;
    font-weight: bold;
    color: #4A5FC1;
}

.nav-links {
    float: right;
}

.nav-links a {
    margin-left: 20px;
    font-size: 16px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: 0.3s;
}

.nav-links a:hover {
    background: #eef2ff;
}

/* 登录 / 注册按钮 */
.btn-login, .btn-register, .btn-logout {
    background: #4A5FC1;
    color: #fff !important;
    padding: 8px 14px;
}

.btn-login:hover, .btn-register:hover, .btn-logout:hover {
    background: #3f51b5;
}

/* ========== 页面标题 ========== */
.page-title {
    font-size: 28px;
    margin: 25px 0;
    color: #333;
}

/* ========== 作品网格 ========== */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

.work-card {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: 0.3s;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.work-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
}

.work-card h3 {
    font-size: 20px;
    margin-top: 10px;
}

.work-card p {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
}

/* ========== Dashboard 列表 ========== */
.dashboard-list {
    margin-top: 25px;
}

.dashboard-item {
    background: #fff;
    display: flex;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    align-items: center;
    transition: 0.3s;
}

.dashboard-item:hover {
    transform: translateY(-3px);
}

.dash-img {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 20px;
}

.dash-info {
    flex: 1;
}

.dash-actions a {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 6px;
    margin-left: 8px;
    transition: 0.3s;
}

/* 按钮风格 */
.btn-primary {
    background: #4A5FC1;
    color: #fff !important;
    padding: 10px 16px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 10px;
}

.btn-primary:hover {
    background: #3f51b5;
}

.btn-secondary {
    background: #eeeeee;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: #ff6b6b;
    color: #fff !important;
}

.btn-danger:hover {
    background: #ef4a4a;
}

/* ========== 表单样式 ========== */
.form-container {
    max-width: 550px;
    margin: 35px auto;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.form-box label {
    font-weight: bold;
    margin-top: 15px;
    display: block;
}

.form-box input,
.form-box textarea {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: 0.3s;
}

.form-box input:focus,
.form-box textarea:focus {
    outline: none;
    border-color: #4A5FC1;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.error {
    color: #ff5252;
    margin-bottom: 10px;
}

.success {
    color: #4caf50;
    margin-bottom: 10px;
}

.preview-img {
    width: 100%;
    max-width: 260px;
    margin: 10px 0;
    border-radius: 8px;
}

/* ========== 页脚 ========== */
.footer {
    text-align: center;
    padding: 25px;
    margin-top: 40px;
    color: #777;
}
