/* ==========================================
   公共样式 - 小红书爆文工具
   ========================================== */

/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #FFE5EC 0%, #FFF0F5 50%, #FFE5EC 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    color: #333;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==================== 导航栏样式 ==================== */
.navbar {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: bold;
    color: #FF2442;
}

.logo-icon {
    font-size: 24px;
}

/* 导航菜单 */
.navbar-menu {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    text-decoration: none;
    color: #666;
    border-radius: 20px;
    transition: all 0.3s;
}

.nav-link:hover {
    background: #FFF0F5;
    color: #FF2442;
    transform: translateY(-2px);
}

.nav-link.active {
    background: linear-gradient(135deg, #FF2442 0%, #FF6B9D 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 36, 66, 0.3);
}

.nav-icon {
    font-size: 18px;
}

.nav-label {
    font-size: 14px;
    font-weight: 500;
}

/* 右侧区域 */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 配额徽章 */
.quota-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #FFF0F5;
    border: 1px solid #FFE5EC;
    border-radius: 20px;
    font-size: 13px;
}

.quota-label {
    color: #666;
}

.quota-value {
    font-weight: bold;
    color: #FF2442;
}

/* 用户菜单 */
.user-menu {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.user-button:hover {
    background: #FFF0F5;
    border-color: #FF2442;
}

.dropdown-arrow {
    font-size: 10px;
    color: #999;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    list-style: none;
    overflow: hidden;
}

.user-menu:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 16px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background 0.2s;
}

.dropdown-menu li a:hover {
    background: #f5f5f5;
}

/* 登录按钮 */
.btn-login {
    padding: 8px 20px;
    background: linear-gradient(135deg, #FF2442 0%, #FF6B9D 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(255, 36, 66, 0.2);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 36, 66, 0.3);
}

/* ==================== 主内容区 ==================== */
.main-content {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
    min-height: calc(100vh - 80px);
}

/* ==================== 页面头部 ==================== */
.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 28px;
    font-weight: bold;
    color: #FF2442;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(255, 36, 66, 0.1);
}

.page-subtitle {
    font-size: 14px;
    color: #666;
}

/* ==================== 卡片样式 ==================== */
.card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(255, 36, 66, 0.08);
    margin-bottom: 20px;
    transition: all 0.3s;
    border: 1px solid rgba(255, 36, 66, 0.05);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(255, 36, 66, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    color: #FF2442;
}

/* ==================== 按钮样式 ==================== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #FF2442 0%, #FF6B9D 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 36, 66, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 36, 66, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* ==================== 操作按钮样式 ==================== */
/* 查看按钮 - 蓝色 */
.btn-view {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.2);
}

.btn-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

/* 改写按钮 - 橙色 */
.btn-rewrite {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, #FF9500 0%, #FF5E3A 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(255, 149, 0, 0.2);
}

.btn-rewrite:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 149, 0, 0.3);
}

/* 配图按钮 - 粉色 */
.btn-image {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, #FF2442 0%, #FF6B9D 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(255, 36, 66, 0.2);
}

.btn-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 36, 66, 0.3);
}

/* 删除按钮 - 红色 */
.btn-delete {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, #FF4757 0%, #FF6B81 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(255, 71, 87, 0.2);
}

.btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.3);
}

/* 按钮间距 */
.btn-gap {
    margin-right: 8px;
}

.btn-gap:last-child {
    margin-right: 0;
}

/* ==================== Element Plus 操作按钮样式 ==================== */
/* 覆盖 Element Plus text 按钮的默认样式 */
.action-btn {
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.3s !important;
    position: relative;
    overflow: hidden;
    margin-left: 8px !important;
}

.action-btn:first-child {
    margin-left: 0 !important;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.action-btn:hover::before {
    opacity: 0.1;
}

/* 查看按钮 */
.btn-view-action {
    color: #667eea !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%) !important;
}

.btn-view-action:hover {
    color: #5568d3 !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%) !important;
    transform: translateY(-1px);
}

/* 改写按钮 */
.btn-rewrite-action {
    color: #FF9500 !important;
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.1) 0%, rgba(255, 94, 58, 0.1) 100%) !important;
}

.btn-rewrite-action:hover {
    color: #FF5E3A !important;
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.2) 0%, rgba(255, 94, 58, 0.2) 100%) !important;
    transform: translateY(-1px);
}

/* 配图按钮 */
.btn-image-action {
    color: #FF2442 !important;
    background: linear-gradient(135deg, rgba(255, 36, 66, 0.1) 0%, rgba(255, 107, 157, 0.1) 100%) !important;
}

.btn-image-action:hover {
    color: #FF6B9D !important;
    background: linear-gradient(135deg, rgba(255, 36, 66, 0.2) 0%, rgba(255, 107, 157, 0.2) 100%) !important;
    transform: translateY(-1px);
}

/* 删除按钮 */
.btn-delete-action {
    color: #FF4757 !important;
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.1) 0%, rgba(255, 107, 129, 0.1) 100%) !important;
}

.btn-delete-action:hover {
    color: #FF6B81 !important;
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.2) 0%, rgba(255, 107, 129, 0.2) 100%) !important;
    transform: translateY(-1px);
}

/* ==================== 表格样式 ==================== */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: #f8f9fa;
}

th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

tbody tr:hover {
    background: #f8f9fa;
}

/* ==================== 表单样式 ==================== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #495057;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #FF2442;
    box-shadow: 0 0 0 3px rgba(255, 36, 66, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ==================== 工具栏 ==================== */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(255, 36, 66, 0.08);
    border: 1px solid rgba(255, 36, 66, 0.05);
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 16px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    color: #495057;
    background: white;
}

.pagination a:hover {
    background: #f8f9fa;
}

.pagination .active {
    background: linear-gradient(135deg, #FF2442 0%, #FF6B9D 100%);
    color: white;
    border-color: transparent;
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(255, 36, 66, 0.08);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-text {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 20px;
}

/* ==================== 加载状态 ==================== */
.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #FF2442;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .navbar-container {
        padding: 0 16px;
    }

    .navbar-menu {
        gap: 2px;
    }

    .nav-label {
        display: none;
    }

    .nav-link {
        padding: 8px 12px;
    }

    .quota-label {
        display: none;
    }

    .main-content {
        padding: 0 16px;
    }

    .toolbar {
        flex-direction: column;
        gap: 12px;
    }

    .toolbar-left,
    .toolbar-right {
        width: 100%;
        justify-content: center;
    }
}

/* ==================== 页脚样式 ==================== */
.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 24px 0;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-container p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* ==================== 辅助类 ==================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: #6c757d; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
