/* ===== 全局样式 ===== */
* { margin:0; padding:0; box-sizing:border-box; }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f5f7fb;
    color: #1a2332;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
}
a { color: #5b6ef7; text-decoration: none; }
a:hover { opacity:0.8; }

/* ===== 通用卡片 ===== */
.card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    padding: 32px 36px;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    border: 1px solid #e2e8f0;
}

/* ===== 导航栏 ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}
.navbar .logo {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #5b6ef7, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.navbar .actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f1f4f9;
    color: #1a2332;
}
.btn-primary {
    background: linear-gradient(135deg, #5b6ef7, #8b5cf6);
    color: #fff;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(91,110,247,0.3); }
.btn-success {
    background: #22c55e;
    color: #fff;
}
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(34,197,94,0.3); }
.btn-danger {
    background: #ef4444;
    color: #fff;
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(239,68,68,0.3); }
.btn-outline {
    background: transparent;
    border: 1px solid #e2e8f0;
}
.btn-outline:hover { background: #f0f2f7; }
.btn-sm { padding: 6px 16px; font-size: 13px; }

/* ===== 输入框 ===== */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #5a6a7e;
    font-size: 14px;
}
input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #f1f4f9;
    color: #1a2332;
    font-size: 15px;
    transition: 0.2s;
    outline: none;
}
input:focus, select:focus, textarea:focus {
    border-color: #5b6ef7;
    box-shadow: 0 0 0 4px rgba(91,110,247,0.1);
}
input::placeholder { color: #5a6a7e; opacity:0.6; }

/* ===== 网格（媒体列表） ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
    margin: 20px 0;
}
.card-item {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: 0.25s;
}
.card-item:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.08); }
.card-item img, .card-item video {
    width: 100%;
    display: block;
    aspect-ratio: 3/4;
    object-fit: cover;
    background: #f1f4f9;
}
.card-item .info {
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #5a6a7e;
    background: #ffffff;
}
.card-item .info .actions a {
    font-size: 16px;
    margin-left: 8px;
    transition: 0.2s;
}
.card-item .info .actions a:hover { transform: scale(1.2); }

/* ===== 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 24px;
}
.pagination a, .pagination span {
    padding: 6px 14px;
    border-radius: 30px;
    background: #f1f4f9;
    color: #1a2332;
    font-size: 14px;
    transition: 0.2s;
}
.pagination a:hover { background: #5b6ef7; color: #fff; }
.pagination .current {
    background: #5b6ef7;
    color: #fff;
    font-weight: 600;
}

/* ===== 模态框 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: #ffffff;
    border-radius: 24px;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
    animation: zoomIn 0.25s ease;
}
.modal-content img, .modal-content video {
    display: block;
    max-width: 100%;
    max-height: 85vh;
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 18px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 22px;
    cursor: pointer;
    transition: 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.3); transform: rotate(90deg); }

/* ===== Toast ===== */
.toast {
    background: #ffffff;
    border-left: 4px solid #5b6ef7;
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

/* ===== 空状态 ===== */
.empty {
    text-align: center;
    padding: 40px 20px;
    color: #5a6a7e;
    font-size: 18px;
}

/* ===== 响应式 ===== */
@media (max-width: 640px) {
    .card { padding: 20px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .navbar { flex-direction: column; align-items: stretch; gap: 12px; }
    .navbar .actions { justify-content: flex-start; }
}

/* ===== 动画 ===== */
@keyframes zoomIn {
    from { opacity:0; transform:scale(0.92); }
    to { opacity:1; transform:scale(1); }
}