/* components.css - 界面组件样式 */

/* 侧边栏切换按钮 */
.sidebar-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 101;
    margin-right: 15px;
  }
  
  .toggle-line {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
  }
  
  .sidebar-toggle.active .toggle-line:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
  }
  
  .sidebar-toggle.active .toggle-line:nth-child(2) {
    opacity: 0;
  }
  
  .sidebar-toggle.active .toggle-line:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
  }
  
  /* 搜索栏 */
  .search-bar {
    position: relative;
    margin-right: 15px;
  }
  
  .search-bar input {
    width: 200px;
    padding: 8px 15px;
    padding-right: 40px;
    background: var(--transparent-light);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
  }
  
  .search-bar input:focus {
    width: 250px;
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--border-color-dark);
    outline: none;
  }
  
  .search-bar input::placeholder {
    color: rgba(240, 230, 210, 0.7);
  }
  
  .search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 1rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
  }
  
  .search-btn:hover {
    background: rgba(194, 139, 55, 0.2);
  }
  
  /* 操作按钮 */
  .action-btn {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
  }
  
  .action-btn:hover {
    background: rgba(194, 139, 55, 0.2);
    color: var(--primary-color);
  }
  
  /* 通知红点 */
  .notification-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 10px;
    height: 10px;
    background: var(--error-color);
    border-radius: 50%;
    border: 2px solid rgba(20, 11, 46, 0.95);
    z-index: 5;
  }
  
  /* 用户资料 */
  .user-profile {
    display: flex;
    align-items: center;
    margin-left: 15px;
    padding: 5px 10px;
    border-radius: 20px;
    background: rgba(20, 11, 46, 0.5);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .user-profile:hover {
    background: rgba(20, 11, 46, 0.8);
    border-color: var(--border-color-dark);
  }
  
  .avatar {
    position: relative;
    margin-right: 10px;
  }
  
  .avatar-circle {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--text-color);
    border: 2px solid rgba(194, 139, 55, 0.6);
  }
  
  .avatar-circle.small {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
  
  .status-indicator {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    bottom: 0;
    right: 0;
    border: 2px solid var(--bg-dark);
  }
  
  .status-indicator.online {
    background: var(--success-color);
  }
  
  .status-indicator.offline {
    background: #999;
  }
  
  .status-indicator.busy {
    background: var(--error-color);
  }
  
  .user-info {
    margin-right: 10px;
  }
  
  .username {
    font-weight: bold;
    font-size: 0.95rem;
  }
  
  .uid {
    color: var(--primary-color);
    font-size: 0.85rem;
    margin-left: 5px;
  }
  
  .profile-menu-btn {
    font-size: 1.2rem;
    color: var(--primary-color);
  }
  
  /* 分类列表 */
  .category-list {
    list-style: none;
  }
  
  .category-item {
    margin-bottom: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
  }
  
  .category-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
  }
  
  .category-item:hover {
    background: rgba(194, 139, 55, 0.1);
  }
  
  .category-item.active {
    background: rgba(194, 139, 55, 0.2);
  }
  
  .category-item.active a {
    color: var(--primary-color);
    font-weight: bold;
  }
  
  .count {
    background: rgba(194, 139, 55, 0.2);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
  }
  
  /* 标签云 */
  .tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .tag {
    display: inline-block;
    padding: 5px 10px;
    background: rgba(194, 139, 55, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    color: var(--primary-color);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
  }
  
  .tag:hover {
    background: rgba(194, 139, 55, 0.2);
    transform: translateY(-2px);
  }
  
  /* 炼金师排行 */
  .top-alchemists {
    list-style: none;
  }
  
  .alchemist-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: rgba(20, 11, 46, 0.3);
    transition: all 0.3s ease;
  }
  
  .alchemist-item:hover {
    background: rgba(20, 11, 46, 0.5);
  }
  
  .rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
  }
  
  .rank.gold {
    background: var(--gold-color);
    color: var(--bg-dark);
  }
  
  .rank.silver {
    background: var(--silver-color);
    color: var(--bg-dark);
  }
  
  .rank.bronze {
    background: var(--bronze-color);
    color: var(--bg-dark);
  }
  
  .avatar-circle.gold {
    background: var(--gold-color);
    border-color: #FFD700;
  }
  
  .avatar-circle.silver {
    background: var(--silver-color);
    border-color: #C0C0C0;
  }
  
  .avatar-circle.bronze {
    background: var(--bronze-color);
    border-color: #CD7F32;
  }
  
  .alchemist-avatar {
    margin-right: 10px;
  }
  
  .alchemist-name {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 3px;
  }
  
  .alchemist-level {
    font-size: 0.75rem;
    color: var(--text-muted);
  }
  
  /* 操作按钮 */
  .action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
  }
  
  .primary-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    border: none;
    color: var(--bg-dark);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
  }
  
  .primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(194, 139, 55, 0.3);
  }
  
  .btn-icon {
    margin-right: 8px;
  }
  
  .secondary-btn {
    background: var(--transparent-dark);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .secondary-btn:hover {
    background: rgba(20, 11, 46, 1);
    border-color: var(--border-color-dark);
  }
  
  .filter-controls {
    display: flex;
    align-items: center;
  }
  
  .filter-select {
    background: var(--transparent-dark);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 8px;
    margin-right: 10px;
    cursor: pointer;
  }
  
  .filter-select:focus {
    outline: none;
    border-color: var(--border-color-dark);
  }
  
  .view-toggles {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
  }
  
  .view-toggle {
    background: var(--transparent-dark);
    border: none;
    color: var(--text-muted);
    width: 40px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .view-toggle:hover {
    color: var(--text-color);
  }
  
  .view-toggle.active {
    background: rgba(194, 139, 55, 0.2);
    color: var(--primary-color);
  }
  
  /* 置顶文章 */
  .pinned-post {
    display: flex;
    background: rgba(194, 139, 55, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
  }
  
  .pin-indicator {
    min-width: 80px;
    padding: 5px 10px;
    background: rgba(194, 139, 55, 0.2);
    color: var(--primary-color);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
  }
  
  .post-content {
    flex: 1;
  }
  
  .post-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-color);
  }
  
  .post-meta {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
  }
  
  .post-meta > * {
    margin-right: 15px;
  }
  
  .post-author {
    color: var(--primary-color);
  }
  
  .post-category {
    background: rgba(194, 139, 55, 0.2);
    color: var(--primary-color);
    padding: 3px 8px;
    border-radius: 4px;
  }
  
  .post-excerpt {
    margin-bottom: 15px;
    line-height: 1.5;
  }
  
  .post-stats {
    display: flex;
    align-items: center;
  }
  
  .stat-item {
    display: flex;
    align-items: center;
    margin-right: 15px;
    color: var(--text-muted);
    font-size: 0.85rem;
  }
  
  .stat-icon {
    margin-right: 5px;
  }
  
  /* 文章卡片列表 */
  .post-list {
    display: grid;
    gap: 20px;
  }
  
  .post-list.card-view {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
  
  .post-list.list-view {
    grid-template-columns: 1fr;
  }
  
  .post-card {
    background: rgba(30, 21, 72, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
  }
  
  .post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--border-color-dark);
  }
  
  .post-card.featured {
    border-color: rgba(194, 139, 55, 0.8);
    box-shadow: 0 0 15px rgba(194, 139, 55, 0.3);
  }
  
  .featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    color: var(--bg-dark);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
  }
  
  .post-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-color-light);
  }
  
  .post-category-tag {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(194, 139, 55, 0.2);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 10px;
  }
  
  .post-header .post-title {
    font-size: 1.1rem;
    margin-bottom: 0;
    line-height: 1.4;
  }
  
  .post-body {
    padding: 15px;
    flex: 1;
  }
  
  .post-body .post-excerpt {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .post-footer {
    padding: 15px;
    border-top: 1px solid var(--border-color-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .author-info {
    display: flex;
    align-items: center;
  }
  
  .author-avatar {
    margin-right: 8px;
  }
  
  .author-name {
    font-size: 0.85rem;
    font-weight: bold;
  }
  
  .post-footer .post-meta {
    margin-bottom: 0;
    text-align: right;
  }
  
  .post-footer .post-date {
    display: block;
    margin-right: 0;
    margin-bottom: 5px;
  }
  
  .post-footer .post-stats {
    justify-content: flex-end;
  }
  
  .post-footer .stat-item {
    font-size: 0.75rem;
    margin-right: 8px;
  }
  
  .post-footer .stat-item:last-child {
    margin-right: 0;
  }
  
  /* 分页 */
  .pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
  }
  
  .page-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    margin: 0 5px;
    background: rgba(30, 21, 72, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
  }
  
  .page-item:hover {
    background: rgba(194, 139, 55, 0.2);
    color: var(--primary-color);
  }
  
  .page-item.active {
    background: rgba(194, 139, 55, 0.3);
    color: var(--primary-color);
    font-weight: bold;
    border-color: var(--border-color-dark);
  }
  
  .page-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .page-item.disabled:hover {
    background: rgba(30, 21, 72, 0.6);
    color: var(--text-color);
  }
  
  /* 通知项样式 */
  .notification-item {
    background: rgba(30, 21, 72, 0.6);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    gap: 15px;
    position: relative;
    transition: all 0.3s ease;
  }
  
  .notification-item:hover {
    background: rgba(49, 27, 146, 0.6);
  }
  
  .notification-item.unread::before {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
  }
  
  .notification-icon {
    width: 40px;
    height: 40px;
    background: rgba(194, 139, 55, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
  }
  
  .notification-icon.comment {
    background: rgba(0, 150, 255, 0.2);
    color: var(--info-color);
  }
  
  .notification-icon.like {
    background: rgba(255, 61, 61, 0.2);
    color: #ff3d3d;
  }
  
  .notification-icon.system {
    background: rgba(194, 139, 55, 0.2);
    color: var(--primary-color);
  }
  
  .notification-icon.mention {
    background: rgba(153, 102, 255, 0.2);
    color: #9966ff;
  }
  
  .notification-content {
    flex: 1;
  }
  
  .notification-title {
    font-weight: bold;
    margin-bottom: 5px;
  }
  
  .notification-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
  }
  
  .notification-time {
    font-size: 0.8rem;
    color: #777;
  }
  
  /* 按钮样式 */
  .close-panel-btn,
  .close-modal-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .close-panel-btn:hover,
  .close-modal-btn:hover {
    color: var(--primary-color);
  }
  
  /* 表单样式 */
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-size: 0.9rem;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(20, 11, 46, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
  }
  
  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus {
    outline: none;
    border-color: var(--border-color-dark);
    background: rgba(20, 11, 46, 0.8);
  }
  
  .editor-toolbar {
    display: flex;
    padding: 10px;
    background: rgba(20, 11, 46, 0.6);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
  }
  
  .toolbar-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    min-width: 30px;
    height: 30px;
    margin-right: 5px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .toolbar-btn:hover {
    background: rgba(194, 139, 55, 0.2);
    color: var(--primary-color);
  }
  
  .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
  }