/* 管理后台样式 */

/* 登录页面 */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-logo {
    font-size: 48px;
    margin-bottom: 20px;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

.error-msg {
    color: var(--accent-red);
    font-size: 14px;
    margin-top: 16px;
}

/* 管理界面 */
.admin-container {
    display: none;
    min-height: 100vh;
}

.admin-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
}

.admin-actions {
    display: flex;
    gap: 12px;
}

.admin-main {
    display: flex;
    gap: 24px;
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

/* 面板 */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-title {
    font-size: 16px;
    font-weight: 600;
}

.panel-content {
    padding: 16px;
    max-height: 600px;
    overflow-y: auto;
}

/* 分类面板 */
.categories-panel {
    width: 280px;
    flex-shrink: 0;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 8px;
}

.category-item:hover {
    background: var(--bg-card-hover);
}

.category-item.active {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid var(--accent-cyan);
}

.cat-icon {
    font-size: 20px;
}

.cat-name {
    flex: 1;
    font-size: 14px;
}

.cat-count {
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 12px;
    color: var(--text-muted);
}

.cat-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.category-item:hover .cat-actions {
    opacity: 1;
}

/* 链接面板 */
.links-panel {
    flex: 1;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 12px;
    transition: background 0.2s;
}

.link-item:hover {
    background: var(--bg-card-hover);
}

.link-item .icon {
    font-size: 24px;
}

.link-item .content {
    flex: 1;
    min-width: 0;
}

.link-item .title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
}

.link-item .url {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-item .actions {
    display: flex;
    gap: 8px;
}

/* 响应式 */
@media (max-width: 768px) {
    .admin-main {
        flex-direction: column;
    }

    .categories-panel {
        width: 100%;
    }
}